Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [Update #2] XML Schema 1.1 Tutorial

From: "Costello, Roger L." <costello@-----.--->
To: "'noah_mendelsohn@--.---.---'" <----_----------@--.---.--->
Date: 8/12/2009 7:13:00 PM
Thanks again Noah. Great suggestion! See slide 24:

 http://www.xfront.com/xml-schema-1-1/xml-schema-1-1.ppt

/Roger



> -----Original Message-----
> From: noah_mendelsohn@u... [mailto:noah_mendelsohn@u...] 
> Sent: Wednesday, August 12, 2009 2:41 PM
> To: Costello, Roger L.
> Cc: xmlschema-dev@w...
> Subject: Re: [Update #2] XML Schema 1.1 Tutorial
> 
> Suggestion:
> 
> I think the changes to support non-deterministic content 
> models involving 
> <any> is a big deal, and it would be good to highlight that in the 5 
> minute intro along with the syntax changes to <any>
> 
> Use case is:
> 
> You have a content model like:
> 
>         <sequence>
>                 <element ref="a" />
>                 <element ref="optionalelement" minOccurs="0" />
>                 <!-- want to allow extensions here -->
>  
>         </sequence>
> 
> You want an optional wildcard at the end, and for whatever 
> reason prefer 
> not to use openContent (you like the explicit <any>, you want 
> to control 
> exactly where the extenion points are and some may not be at the end, 
> etc.)  So, you want:
> 
>         <sequence>
>                 <element ref="a" />
>                 <element ref="optionalelement" minOccurs="0" />
>                 <!-- want to allow extensions here -->
>                 <any minOccurs="0" maxOccurs="unbounded" />
>         </sequence>
> 
> In XSD 1.0 you could not do this, because an <optionalelement 
> /> in the 
> instance matched both the explicit particle and the wildcard. 
>  In XSD 1.1, 
> this does what you want.  I think that's worth pointing out.  Also, 
> <openContent> works in the presence of optional elements, so 
> there's no 
> ambiguity problem with that in XSD 1.1 either.  Content will 
> match the 
> explicit element particle in preference to either an <any> or 
> openContent. 
>  I'm fairly sure that if there is an ambiguity between an <any> and 
> <openContent> the tie goes to the explicit <any>.  In 
> general, openContent 
> only gets checked if you were otherwise about to fail validation.  I 
> think.
> 
> Noah
> 
> --------------------------------------
> Noah Mendelsohn 
> IBM Corporation
> One Rogers Street
> Cambridge, MA 02142
> 1-617-693-4036
> --------------------------------------
> 
> 
> 
> 
> 
> 
> 
> 
> "Costello, Roger L." <costello@m...>
> Sent by: xmlschema-dev-request@w...
> 08/08/2009 01:27 PM
>  
>         To:     "xmlschema-dev@w..." <xmlschema-dev@w...>
>         cc:     (bcc: Noah Mendelsohn/Cambridge/IBM)
>         Subject:        [Update #2]  XML Schema 1.1 Tutorial
> 
> 
> 
> Hi Folks,
> 
> Here are the updates I made to the XML Schema 1.1 Tutorial:
> 
>     1. I received many excellent comments and 
>        incorporated them.
> 
>     2. I created 20 lab exercises. I recommend 
>        working the exercises as you read through 
>        the tutorial.
> 
> 
> Here is the updated tutorial:
> 
> http://www.xfront.com/xml-schema-1-1/xml-schema-1-1.ppt
> 
> 
> Here is the updated tutorial + labs + examples:
> 
> http://www.xfront.com/xml-schema-1-1/xml-schema-1-1.zip
> 
> 
> As always, please let me know if there is anything in the 
> tutorial that is 
> unclear or if you find a typo. 
> 
> /Roger
> 
> 
> 


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent