This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Using a tree read with document() as a hash-table
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: Using a tree read with document() as a hash-table
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Wed, 14 Jun 2000 10:54:44 +0100
- Reply-To: xsl-list at mulberrytech dot com
> My problem is that I need to look up a value in another
> external XML file during XSLT processing, to include in the
> generated output.
>
> I can read in the external file with the following lines
>
> <xsl:param name="packtypefile" select="packtype.xml" />
> <!-- Load the packtypes from the external file -->
> <xsl:variable name="packtypetree"
> select="document(packtypefile)" saxon:trace="yes"/>
You want select="'packtype.xml'" on xsl:param
And select="document($packtypefile)" on xsl:variable
And saxon:trace on xsl:variable is ignored
> I have done a lot of trial-and-error, and have given up on
> the following
>
>
> <!-- First look up the packtype -->
> <xsl:apply-templates
> select="$packtypetree//ROW[packcode='GREEL']" mode="preview"/>
>
> to get "into" the node-set of $packtypetree, but without
> visible results.
It's essentially OK. Possible reasons for no visible results:
- there is no ROW with this packcode
- there is no template that matches it in mode "preview"
- the template that matches this row produces no output.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list