this is a little offtopic, or maybe not.

so if i wanted to validate an alternating sequence of elements of
unbounded length, how would i describe it?

so, A,AB,ABA,ABAB,... etc are legal

but B,BA, AA, BB, ABB, etc are not.

this was the first implementation, but it violates UPA as far as xerces-j
2.0.0 is concerned:

<sequence>
  <element name="A" type="string"/>
    <sequence minOccurs="0" maxOccurs="unbounded">
      <element name="B" type="string"/>
      <element name="A" type="string"/>
    </sequence>
  <element name="B" type="string" minOccurs="0"/>
</sequence>


among other things. i was thinking that this was a recursion problem and
this was what i came up with after google-mining for recursion and
XMLSchema:

http://castor.exolab.org/list-archive/msg08774.html

this was my distilled contribution, but it's not correct because it would
permit AA:

<element name="AB-list-ref">
  <complexType>
    <sequence>
      <element ref="AB-list"/>
    <sequence>
  <complexType>
<element>

<element name="AB-list">
  <complexType>
    <sequence>
      <element name="A" type="string"/>
      <choice>
        <element name="B" type="string"/>
        <element ref="AB-list-ref" minOccurs="0"/>
      <choice>
    <sequence>
  <complexType>
<element>

so, mine is wrong. and i have been beating the heck out of this and not
getting anywhere.

if somebody knows of a canonical example of such a thing, i'd really like
to see it. if anybody has implemented something that sorta works, i'd love
to see that too!

one thing that has occurred to me as a sortof nifty tool: a way to express
regexps as XMLSchema:

ie, enter a regexp and get back a correct XMLSchema for same.

anybody ever seen such a beasty?


tnx for any help that anyone can provide!

johnu



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to