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

Re: Friday challenge: XSLT thats creates XPaths for m

Subject: Re: Friday challenge: XSLT thats creates XPaths for meaningfully equivalent comparisons of XML files
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Fri, 13 Apr 2007 17:00:14 +0100
Re:  Friday challenge: XSLT thats creates XPaths for  m
On 4/13/07, David Carlisle <davidc@xxxxxxxxx> wrote:

> I didn't see the reason to learn a new language for it to be > converted into an XSLT 1.0 stylesheet that I could do a better job of > writing myself.

actually I asked Rick J that very question (the day after he announced
the first schematron) or rather I asked if schematron was an "XSLT
generation tool" (in which case I wasn't that interested as I can write
xslt) or is it a schema language that happens to have an implementation
in XSLT. Rick's POV was strongly that it was the latter, and in fact
there are non xslt implementations, schematron assertions can be
embedded (and executed from) annotations in XSD and relax schemas where
tools may not allow exeuting arbitrary xslt, etc., but anyway why
generate checkXML rather than just generate the checking XSLT directly
doesn't the same description apply? (I'm guessing here what checkXML is,
from one example.)

I raised it too, and got moderately flamed for doing so... it was basically a HLL verses Assembler argument, which I completely agree with but not if the implementation is a 1.0 transform.... I really think (where I work especially) augmenting XSD with XPath is a useful approach to checking XML for correctness. XSD 1.1 should solve a lot of it (or Saxon's version of XSD 1.1 should do) but even then XSD can't fully describe an XML document.

I really thought Schematron was something special, but then I found
out it was just creating an XSLT 1.0 and I was really disappointed.
Sorry if I'm wrong here, please point it out because I'm genuinely
interested rather than being negative.

> Also, (and don't flame me if I'm too wide of the mark here) the assert
> statements in XML Schema 1.1 will effectively make Schematron
> redundant.

Or offer confirmation that the XPath based assertion language approach
was good, depending on your point of view. It obviously has an overlap
but reduntant is probably too strong a word, some might say that relax
NG makes XSD schema redundant:-)

In my limited view of the world XSD is used everywhere, and RNG is er, not. It seems fashionable to not like XSD and champion RNG... I'm not well placed to support either, but in my small corner of London RNG is nowhere. Just a fact of life.

> I'm planning on taking mappings from the xml... I know this may not be
> the "correct" way, but I really think "/a:b/a:b" is an acceptable
> xpath when applied against an XML document where the user has supplied
> both the xpath and the xml document...

But what would you do if the document uses the same prefixes for
different namesaces (you may say no one does that, but a large part of
the complexity of namespaces is just to allow that to happen, so
presumably someone thought it a good idea) certainly re-using the
no-prefix default namespace is very common. In an
XHTML+MathML+SVG+XForms document you are quite likely to find all the
elements using no prefixes, with xmlns="..." used locally to switch
default as you go from html to svg to mathml
but a path of
isn't going to work.

True enough, but its the 99, 1 rule here. I plan on making it 99% easy where the 1% extra would really impact the 99%.

As I say its an open source project, so if anyone feels like
contributing just email me.


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.