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 UTC