[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Using a tree read with document() as a hash-table
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|