[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

AW: Occurrence Question


xml schema min occurrence
Hi,
I do not know what PSVI is but I think there is a little difference between
these snippets:

In the first case the child elements may occur independently from each
other. In the second case both child elements must be present if one of them
occurs. 

The absence of minOccurs means 'minOccurs=1'. If one subelement is present,
the parent element occurs. In this case all child element must occurs in
accordance to their attributes.

Best regards

Joerg Moebius


-----Ursprüngliche Nachricht-----
Von: Michele Vivoda [mailto:idmichele@y...] 
Gesendet: Montag, 27. März 2006 11:28
An: Michael Kay; xml-dev@l...
Betreff: RE:  Occurrence Question


Thanks, I was also thinking about this option, I think
that the PSVI is the same because neither particle or
choice contribute to the PSVI, and they validate the
same instances because there is no difference between
empty and absent in xml. So, _in a choice with
elements only_ should be true that adding an optional
element makes the whole choice optional. Is this that
I wrote true, and in case, is it _always_ true, also
with other kind of particles ?

Greetings
Michele Vivoda


--- Michael Kay <mike@s...> ha scritto: 

> Yes, I think they have the same meaning: they
> validate the same instances,
> and they generate the same PSVI.
> 
> Michael Kay
> http://www.saxonica.com/
> 
> > -----Original Message-----
> > From: Michele Vivoda [mailto:idmichele@y...]
> > Sent: 26 March 2006 19:37
> > To: xml-dev@l...
> > Subject:  Occurrence Question
> > 
> > Hi All,
> > 
> > I would like to know if these two snippets
> > have the same 'meaning' (for xml schema):
> > 
> > <xs:choice>
> >    <xs:element minOccurs="0" maxOccurs="unbounded" ref="col"/>
> >    <xs:element minOccurs="0" maxOccurs="unbounded"
> > ref="colgroup"/>
> > </xs:choice>
> > 
> > AND
> > 
> > <xs:choice minOccurs='0'>
> >    <xs:element maxOccurs="unbounded" ref="col"/>
> >    <xs:element maxOccurs="unbounded"
> ref="colgroup"/>
> > </xs:choice>
> > 
> > Options I thought:
> > 
> > 1) they express the same schema components 
> >   (don't think so, since min and max are
> attributes of
> > particle component)
> > 2) they express different components but these
> > components validate the same instances.
> > 3) they are different and validate different
> instances
> > (presumably    
> >   because the first one wants at least one
> selected
> > particle for the choice).
> > 4) In some contexts they have surely the same
> meaning,
> > in others they might not (?).
> > 5) None of the above
> > 
> > Thanks
> > Michele Vivoda
> > 
> > 
> > 	
> > 
> > 	
> > 		
> > ___________________________________
> > Yahoo! Mail: gratis 1GB per i messaggi e allegati
> da 10MB
> > http://mail.yahoo.it
> > 
> >
>
-----------------------------------------------------------------
> > The xml-dev list is sponsored by XML.org
> <http://www.xml.org>, an
> > initiative of OASIS <http://www.oasis-open.org>
> > 
> > The list archives are at
> http://lists.xml.org/archives/xml-dev/
> > 
> > To subscribe or unsubscribe from this list use the
> subscription
> > manager:
> <http://www.oasis-open.org/mlmanage/index.php>
> > 
> > 
> 
> 
> 



	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it

-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an initiative
of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://www.oasis-open.org/mlmanage/index.php>


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.