OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Occurrence Question

[ Lists Home | Date Index | Thread Index ]

FWIW, from a style perspective I always prefer to create an *explicit* 
specification of a semantic rather than making assumptions about the 
presence/absence of an information item ! If you're going to the trouble of 
creating a spec for carrying information you may as well use it for all 
instances IMO :-

<Bonus>0</Bonus>

<Bonus>1000000</Bonus>

Fraser.

>From: "Tolkin, Steve" <Steve.Tolkin@FMR.COM>
>To: "Michele Vivoda" <idmichele@yahoo.it>, <xml-dev@lists.xml.org>
>Subject: RE: [xml-dev] Occurrence Question
>Date: Mon, 27 Mar 2006 14:35:49 -0500
>
>Can you please clarify what you meant by "there is no difference between
>empty and absent in xml."
>
>I think there is a difference.  Suppose the empty element <Bonus> is
>used as a "marker", meaning: If and only if <Bonus/> occurs then the
>person is eligible to receive a bonus.
>Clearly there is a difference between empty and absent.
>
><!-- Alex cannot get a bonus, the Bonus element is Absent -->
><Pay><Name>Alex</Name><Salary>30</Salary></Pay>
><!-- Ben can get a Bonus-->
><Pay><Name>Ben</Name><Salary>20</Salary><Bonus/></Pay>
>
>
>Hopefully helpfully yours,
>Steve
>--
>Steve Tolkin    Steve . Tolkin at FMR dot COM    508-787-9006
>Fidelity Investments   82 Devonshire St. M13L    Boston MA 02109
>There is nothing so practical as a good theory.  Comments are by me,
>not Fidelity Investments, its subsidiaries or affiliates.
>
>
>-----Original Message-----
>From: Michele Vivoda [mailto:idmichele@yahoo.it]
>Sent: Monday, March 27, 2006 4:28 AM
>To: Michael Kay; xml-dev@lists.xml.org
>Subject: RE: [xml-dev] 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
>
>[rest snipped]
>
>-----------------------------------------------------------------
>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>
>






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS