4.1 Is there a way to redesign the XPath such that the misspelling
error would be caught?
not in XPath but:
<xsl:variable name="authors" select="/book/author"
as="schema-element(author)+"/>
ensures one or more valid author elements are selected
4.2 Is there a way to redesign the XPath such that the misspelling
error would be caught, regardless of whether a schema-aware or
non-schema-aware processor is being used?
<xsl:variable name="authors" select="/book/author" as="element(author)+"/>
ensures one or more elements named "author" are selected
IDEs like oXygen provide intellisense based on the associated XML in
the scenario, but I don't know of any one which will highlight
impossible XPaths given a schema.
--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--