xs:all in schema

M

Mike Ferenduros

Hi,

I'm working on a schema for a bunch of existing XML files, and I need
to specify a list of elements that can appear in varying
quantities...I though xs:all was what I needed, but I just found out
that maxOccur can only be 0 or 1 in an xs:all list. I'd use
xs:sequence, but the elements can appear in any order.

Am I missing something? If anyone's got a minute to point me in the
right direction it'd be greatly appreciated.

Thanks in advance,
Mike Ferenduros
 
J

Jens M. Felderhoff

Hi,

I'm working on a schema for a bunch of existing XML files, and I need
to specify a list of elements that can appear in varying
quantities...I though xs:all was what I needed, but I just found out
that maxOccur can only be 0 or 1 in an xs:all list. I'd use
xs:sequence, but the elements can appear in any order.

Am I missing something? If anyone's got a minute to point me in the
right direction it'd be greatly appreciated.

Have a look at xs:choice which may serve as a workaround for the
strict constraints of xs:all.

However, watch out when defining content models using xs:choice as
some constraints may be easily broken.

Cheers

Jens
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top