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

Re: Is an XPath processor responsible for catching mi

Subject: Re: Is an XPath processor responsible for catching misspelled tag names when there is an associated Schema?
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Thu, 21 Feb 2008 13:40:02 +0000
Re:  Is an XPath processor responsible for catching  mi
>  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/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
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-2013 All Rights Reserved.