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

RE: Using Saxon 9 as a Schematron 1.5 back end

  • From: "Michael Kay" <mike@s...>
  • To: "'Henri Sivonen'" <hsivonen@i...>,"'XML Dev ML'" <xml-dev@l...>
  • Date: Mon, 21 Jan 2008 13:38:53 -0000

RE:  Using Saxon 9 as a Schematron 1.5 back end
> Should I put my effort into patching Saxon 6 or 9? That is, 
> can I use Saxon 9 without breaking the semantics of 
> Schematron 1.5 schemas that use XPath 1.0 queries?

I think that if you run XPath 2.0 in "backwards compatible mode" the
remaining incompatibilities with XPath 1.0 can almost certainly be safely
ignored. If users run into these then they are doing something fairly weird
- either unintentionally, or deliberately to test the known compatibility
corner cases. So I would definitely work with Saxon 9.

Having said that, there's a reason Saxon doesn't give you column numbers,
which is that the column number reported by the SAX parser is usually not
very meaningful. Both the line number and column number typically reflect
the position of the ">" at the end of the start tag. You're therefore very
likely to be reporting an error at column 68 when the actual error is at
column 15, and I've generally taken the view that it's better to report
nothing at all than to get it quite so badly wrong. The only case where
column numbers might be useful is where the XML is all on one line.
Unfortunately text editors don't handle that case well anyway, so knowing
that an error is at column 14763 of line 1 doesn't usually make it much
easier to find.

(Saxon's retention of line numbers is designed primarily for reporting
errors in stylesheets and schema documents, not in instance documents. For
instance documents, it might also be useful to retain the position
information for text nodes - Saxon currently retains it only for elements.)

Michael Kay
http://www.saxonica.com/



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.