Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > xs:all in schema

Reply
Thread Tools

xs:all in schema

 
 
Mike Ferenduros
Guest
Posts: n/a
 
      12-13-2003
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
 
Reply With Quote
 
 
 
 
Jens M. Felderhoff
Guest
Posts: n/a
 
      12-14-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (Mike Ferenduros) wrote:

> 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
--
(Intentionally left blank.)
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with schema-validation and property "http://apache.org/xml/properties/schema/external-schemaLocation" Markus Java 1 11-23-2005 02:41 PM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
XML schema regular expressions question and recommended XML Schema book Fred Smith XML 1 02-05-2004 11:12 AM
Schema Metadata not a Metadata Schema Brett Selleck XML 1 09-04-2003 05:02 PM
Re: Convert DB2 schema to XML Schema Klaus Johannes Rusch XML 0 08-06-2003 11:23 AM



Advertisments