Re: [transquery-discuss] [ANN] transquery.js an implementation

From: Evan Lenz (elenz@xyzfind.com)
Date: Tue Dec 11 2001 - 08:37:16 CET


Excellent! You implemented TransQuery using the XSLT wrapper that I
suggested before. Based on my reading of the script and experimenting with
"transquery -db dir -o dirtoxml.xml", it looks like you're automatically
creating a "meta-document" and then using the document() function on the
URIs in that meta-document to supply the value of the imported tq:input
parameter.

There are a couple possible bugs that I can't figure out. First of all, I
can't get the "-dbf" option to work, because it displays the usage message
whenever I try it. More seriously, for some reason certain XPath queries
aren't working for me, which makes me suspect that you don't have something
right...?

For example, say I put a bunch of XSLT stylesheets in my database directory.
Then I write this query:

<xsl:transform 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="/">
    <result>
      <xsl:copy-of select="$tq:input/xsl:stylesheet"/>
    </result>
  </xsl:template>

</xsl:transform>

This seems to work perfectly. But when I change the expression above to
"$tq:input//xsl:stylesheet" (i.e. "//" instead of "/"), it stops working and
I get an empty <result/> element in the output! Do you have any idea why
that would be happening?

Again, good job and it's cool to see such a quick implementation :)

Evan

----- Original Message -----
From: "Chris Bayes" <chris@bayes.co.uk>
To: <transquery-discuss@lists.oasis-open.org>
Sent: Thursday, December 06, 2001 12:14 PM
Subject: [transquery-discuss] [ANN] transquery.js an implementation

> I knocked up a quick javascript command line implementation of
> transquery for people to play around with.
> http://www.bayes.co.uk/xml/index.xml?/xml/utils/transquery/transquery.xm
> l
>
> Usage:
> transquery -db directory -s stylesheet -o filename -p {param=value}
>
> Produces output from the directory database using the stylesheet.
>
> transquery -dbf filename -s stylesheet -o filename -p {param=value}
>
> Produces output from the XML database file using the stylesheet.
>
> transquery -db directory -o filename
>
> Generates XML file containing the XML database.
>
> Options:
> -? Show this message.
> -db directory Input directory containing the XML database.
> -dbf filename Input XML file containing the XML database.
> -o filename Write output to named file.
> -p params Params to be passed to the transform.
> -s stylesheet The transquery conformant stylesheet.
> -x filename The source file.
>
> It might be a bit buggy so if you have any problems or have any
> suggestions then let me know.
>
> Ciao Chris
>
> XML/XSL Portal
> http://www.bayes.co.uk/xml
>



This archive was generated by hypermail 2.1.4 : Fri Feb 22 2002 - 11:35:58 CET