Subject: Re: [xsl] XSLT/XPath 2.0 (was "Identifying two tags...") From: Dan Holmsand <holmsand@xxxxxxxxxxxxx> Date: Mon, 13 May 2002 21:22:15 +0200 |
The concern with complexity in technology is quite valid. To continue with the C++ comparison, there is fair criticism that it is more difficult to learn object-oriented programming from C++ than it is from Java, Smalltalk, etc., because C++ is more complex. For this reason, most college OOP courses are taught using Java. Much has been written about how to teach C++ effectively in order to emphasize the OOP since that is the hardest part for most students to comprehend.
That said, I still am going to distinguish between the audience a specification and the audience for the technology represented in that specification. The former are implementers of the technology; the latter are the users of the technology.
If I use the XML parser to validate an XML document against XML Schema metadata, then the data exposed by SAX or DOM is the PSVI, the Post Schema Validation Infoset. That says that the data in the XML document is valid according to the metadata. In the PSVI, type has already been associated with the data; all data in the document is valid against the metadata.
When programming with XML, we can define programmatic types based on XML Schema metadata. Then when we get data from the PSVI, we know that it is valid against the metadata and we can use that data to construct an object of that type, and do so without error. My data and all parts in it conform to the requirements of the type.
Let's imagine that we want to write an XSLT processor. An XSLT processor does not work with documents: it uses an XML parser to parse the documents and present them through an API like DOM or SAX. The XSLT processor only sees infosets. If we use a validating XML parser and the documents have metadata in XML Schema, all the data that the XSLT processor sees is PSVI. So it makes sense that the specifications should be written in terms of the data provided to the application.
Returning to your observation, "the dependency on the complexities of XML Schema gives me precious little benefit, compared with the headaches...", I am trying to make the case that the benefit of the specification making use of PSVI is that XSLT implementers can program to that requirement and thus produce XSLT processors that are interchangeable. To specify otherwise would let XSLT processor behavior diverge, which would spell chaos. Count that as a big benefit to you.
XSLT 1.0 and XPath 1.0 became W3C Recommendations in November 1999. XML Schema became a Recommendation in May 2001. That explains why XSLT 1.0 makes no reference to Schemas or the PSVI. But with XML Schema now in place as a cornerstone of XML technology, it is important to make the XSLT 2.0 and XPath 2.0 specifications consistent with the XML Schema.
Does that make XSLT harder to describe? Not really, unless you plan to use the XSLT specifications as a textbook. If you think that XSLT should not be hard to describe, why not write about it yourself? The next great book on XSLT is waiting to be written.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSLT/XPath 2.0 (was "Iden, Jeni Tennison | Thread | Re: [xsl] XSLT/XPath 2.0 (was "Iden, Kurt Cagle |
Re: [xsl] XSLT/XPath 2.0 (was "Iden, Jeni Tennison | Date | [xsl] IE vs. XSL - Access denied er, Cirip Tomas |
Month |