Go Back   Velocity Reviews > Newsgroups > XML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

XML - XML XSD question

 
Thread Tools Search this Thread
Old 05-26-2006, 02:18 AM   #1
Default XML XSD question


XML XSD question

How to define a set of elements that could be in any order and can
occur more than once??

Thanks a lot!



mavis
  Reply With Quote
Old 05-26-2006, 09:57 AM   #2
Boris Kolpackov
 
Posts: n/a
Default Re: XML XSD question

"mavis" <> writes:

> How to define a set of elements that could be in any order and can
> occur more than once??


You would use an unbounded choice of optional elements:

<choice maxOccurs="unbounded">
<element name="a" ... />
<element name="b" ... />
<element name="c" ... />
</choice>


I would, however, not recommend using it since it complicates processing
of your documents.

hth,
-boris


--
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding
  Reply With Quote
Old 05-26-2006, 05:37 PM   #3
mavis
 
Posts: n/a
Default Re: XML XSD question

Thanks!!

  Reply With Quote
Old 05-31-2006, 11:56 PM   #4
mavis
 
Posts: n/a
Default Re: XML XSD question

Do you think it will influence the processing performance??
Thanks a lot!

Mavis

Boris Kolpackov wrote:
> "mavis" <> writes:
>
> > How to define a set of elements that could be in any order and can
> > occur more than once??

>
> You would use an unbounded choice of optional elements:
>
> <choice maxOccurs="unbounded">
> <element name="a" ... />
> <element name="b" ... />
> <element name="c" ... />
> </choice>
>
>
> I would, however, not recommend using it since it complicates processing
> of your documents.
>
> hth,
> -boris
>
>
> --
> Boris Kolpackov
> Code Synthesis Tools CC
> http://www.codesynthesis.com
> Open-Source, Cross-Platform C++ XML Data Binding


  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump