RE: [xsl] Re: Is an XPath processor responsible for catching misspelled tag names when there is an associated Schema?

Subject: RE: [xsl] Re: Is an XPath processor responsible for catching misspelled tag names when there is an associated Schema?
From: "Costello, Roger L." <costello@xxxxxxxxx>
Date: Fri, 22 Feb 2008 07:13:43 -0500
I am disappointed that detection of mispelled tag names cannot be done
entirely within XPath expression, and that features from the host
language must be used.

For example, if the host language is XSLT then I must first create a
variable:

   <xsl:variable name="bk" select="/Book" as="schema-element(Book)" />

And then use the variable in the XPath:

   count($bk/Authr)

The cosequence is that the XPath is not portable: for each host
language I must redesign the XPath using capabilities from the host
language.

It would be nice if the expression "schema-element(Book)" could be
incorporated into the XPath, e.g.

   count(/(Book as schema-element(Book))/Authr)

/Roger

Current Thread