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

RE: [XML Schema 1.1] I respectfully recommend these changes to <assert> and <alternative>

From: Costello, Roger L. <costello@mitre.org>
Date: Wed, 13 May 2009 08:12:49 -0400
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Message-ID: <9E51F88D5247B648908850C35A3BBB5003F3FE3722@IMCMBX3.MITRE.ORG>
RE: [XML Schema 1.1] I respectfully recommend these changes to  <assert> and <alternative>

Hi Folks,

I am confused about a couple points that were made yesterday.


BREAKS XPATH

(Paraphrasing) By allowing the XPath in an <assert> element to reference ancestors, cousins, and siblings it will break XPath.

I don't understand this.

Here's an XPath expression in an XSLT document that references a parent (ancestor):


   <xsl:template match="*">

      <xsl:value-of select="name(..) eq 'Book'" />

   </xsl:template>


The XPath expression doesn't break anything in this situation. 


Now, here I use the same XPath expression, only I use it in a different host language (XSD 1.1)


    <assert test="name(..) eq 'Book'" />


Why is it that the XPath expression doesn't break anything in one host language (XSLT) but it breaks things in another host language (XSD 1.1)?



POOR PERFORMANCE

(Paraphrasing) By allowing the XPath in an <assert> element to reference ancestors, cousins, and siblings it will put an undue burden on XML Schema validators because the validator will have to hold the instance document in memory.

I don't understand this.

As I illustrate above, in XSLT the XPath expressions can reference anywhere. It doesn't seem to impose an undue burden on XSLT processors. So why would it impose an undue burden on XML Schema validators?

Besides, even if it did, so what? Isn't the objective to make things easier and better for the users, not the validator implementors?

/Roger
Received on Wednesday, 13 May 2009 12:13:26 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
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-2007 All Rights Reserved.