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

RE: XPath 2.0 Best Practice: wrap the first node of ev

Subject: RE: XPath 2.0 Best Practice: wrap the first node of every path expression within schema-element?
From: "Costello, Roger L." <costello@xxxxxxxxx>
Date: Mon, 24 Mar 2008 13:03:47 -0400
RE:  XPath 2.0 Best Practice: wrap the first node of ev
Hi Folks,

I have a question regarding a statement that Michael Kay made last
Friday. See below.

> > > 2. At compile-time the processor will detect errors in the path
> > > expression:
> > >
> > >    2.1 Misspelling errors: these spelling errors are caught:
> > >
> > >        /schema-element(Book)/Authr/LastName  (Author is
> > >
> > >        /schema-element(Book)/Author/LastNam  (LastName is
> > >
> > >    2.2 Structural errors: suppose the in-scope schema indicates
> > >        the only children of Author are FirstName and LastName;
> > >        error will be caught:
> > >
> > >        /schema-element(Book)/Author/Foo  (Foo is not a valid
child of Author)

Martin Honnen asked:

> > Is that something that the XSLT/XPath specification requires
> > that these problems are reported as errors? I don't think
> > AltovaXML does report such problems although it is a schema
> > aware XSLT 2.0 processor.

Michael Kay responded:

> No, the specification doesn't require these to be reported as errors.
> fact, Saxon reports them as warnings. I think that catching these
> is one of the main benefits of schema-awareness, but the amount of
> that is done is processor-dependent.

A schema-aware processor is not required to generate an error or a
warning for the above examples?

Apparently, from what Martin states, AltovaXML is schema-aware but
would not generate an error or a warning on the above examples.
(Martin, can you confirm this?)

If a processor is schema-aware and does not generate an error or a
warning on path expressions such as the above, then what value does the
schema-element function have?


Current Thread


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.
First Name
Last Name
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.