Subject: Re: [xsl] sorting on data referenced with document()?? From: Joerg Heinicke <joerg.heinicke@xxxxxx> Date: Wed, 18 Sep 2002 09:09:57 +0200 |
hmm...
I figured that I would first try the extension function route, but I can't quite figure out how to get it working. Excuse my ignorance, I am a xslt beginner and I have never added a.
anyway, I tried to first download the function itself: http://www.exslt.org/exsl/functions/node-set/exsl.node-set.zip
but inside the zip, exsl.node-set.xsl isn't present.????
the only way I could get exsl.node-set.xsl in any manner is to download the all modules zip. http://www.exslt.org/all-exslt.zip
exsl.node-set.1.xsl and exsl.node-set.2.xsl are in that zip, so I am guessing that those are what I need.
I put these 2 xsl files in the same folder as my two.xsl
so I try to modify my stylesheet: ------------------------------------------------------ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:common="http://exslt.org/common" xmlns="http://www.w3.org/tr/REC-html40" version="1.0"> <xsl:import href="exsl.node-set.1.xsl" /> <xsl:import href="exsl.node-set.2.xsl" /> ------------------------------------------------------
I add the variable as instructed (i hope this is right): ------------------------------------------------------ <xsl:variable name="persons"> <xsl:for-each select="people/person"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:copy-of select="*"/> <xsl:variable name="ownerName" select="@name"/> <xsl:for-each select="document('xml2.xml')"> <xsl:copy-of select="key('turtleByOwner', $ownerName)"/> </xsl:for-each> </xsl:copy> </xsl:for-each> </xsl:variable> ------------------------------------------------------
and I change the for each in the stylesheet to: ------------------------------------------------------ <xsl:for-each select="exsl:node-set($persons)/person"> ------------------------------------------------------
I try to transform with xalan at my command line and I get: ------------------------------------------------------ java org.apache.xalan.xslt.Process -in xml1.xml -xsl two.xsl -out 2.html file:///C:/xsl/two.xsl; Line 25; Column 57; XSLT Error (javax.xml.transform.Tran sformerConfigurationException): javax.xml.transform.TransformerException: javax. xml.transform.TransformerException: Prefix must resolve to a namespace: exslt ------------------------------------------------------
what am I doing wrong? will
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] sorting on data reference, Carter, Will | Thread | [xsl] Re: XPath Visualizer -- Sorry, Dimitre Novatchev |
RE: [xsl] copy nodes as keys, Jarno . Elovirta | Date | [xsl] theoretical xslt 2.0 question, bryan |
Month |