W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2009

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>

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

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:15:12 GMT