From: Evan Lenz (elenz@xyzfind.com)
Date: Tue Dec 04 2001 - 17:39:17 CET
I hope I can dispel some confusion with this email.
1. TransQuery is not an extension to XSLT
2. TransQuery is not a set of best practices
3. TransQuery is not a query language
Some of the confusion surrounding #2 is my fault. The current TransQuery
Specification talks about a "meta-document" convention. I've concluded that
this is not useful as currently defined. Indeed, all it does is spell out a
"best practice". It doesn't add anything to interoperability. No one needs
TransQuery to do something like the following, yet a practice like this is
all that the "meta-document" idea is referring to:
Source tree:
<files>
<file href="foo.xml"/>
<file href="bar.xml"/>
</files>
Stylesheet:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:copy-of
select="document(/files/file/@href)//purchaseOrder[paid='yes']"/>
</xsl:template>
</xsl:stylesheet>
So I propose that the "meta-document" convention be removed from the
TransQuery spec. It causes more confusion than anything else.
A TransQuery way of doing the above instead would be as follows:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:tq="http://www.xmlportfolio.com/transquery">
<xsl:param name="$tq:input"/>
<xsl:template match="/">
<xsl:copy-of select="$tq:input//purchaseOrder[paid='yes']"/>
</xsl:template>
</xsl:stylesheet>
The distinction here is that the TransQuery input name is used and the URIs
of the input collection are unknown to the stylesheet writer (just as the
stylesheet writer doesn't need to know what the URI of the source document
will be).
Evan Lenz
This archive was generated by hypermail 2.1.4 : Fri Feb 22 2002 - 11:35:58 CET