Re: ASN.1 => XML Schema questions

> Not quite -- the above definition is for (a|b)*, but I'm looking for
> definitions of the form (ab|ba)*.

It seems like something that should be really easy to do, but isn't.  The
following is what I have come up with for this case:

    <complexType name='LemurWidget'>
      <choice minOccurs='0' maxOccurs='unbounded'>
        <sequence>
          <element name='foo' type='string' minOccurs='0'
maxOccurs='unbounded'/>
          <element name='bar' type='string' minOccurs='0'
maxOccurs='unbounded'/>
        </sequence>
      </choice>    
    </complexType>

The above snippet should validate the following:

    <bar>frob</bar>
    <foo>ack</foo>
    <foo>qux</foo>
    <bar>eep</bar>
    <foo>quux</foo>
    <bar>oop</bar>

-- 
Matt Di Iorio                Software Engineer
mdiiorio@iss.net         Phone: (404) 236-2748
Internet Security Systems (http://www.iss.net)

Received on Wednesday, 27 June 2001 03:24:10 UTC