This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
possible bug in xalan - document() function?
- To: <XSL-List at mulberrytech dot com>
- Subject: possible bug in xalan - document() function?
- From: "Martin Algesten" <martin dot algesten at ibfs dot com>
- Date: Mon, 3 Apr 2000 11:24:20 +0100
- Reply-To: xsl-list at mulberrytech dot com
Hi!
If i haven't misunderstood the XSLT spec completely I should be able to do a
"document( node-set )"
as an expression and that would result in the XSLT engine reading out each
of incoming node's (1-st level of nodes) value as a string and doing a
document( string ) on each of those elements and the result would be a union
of each of the read files.
When doing a document( node-set ) in cocoon1.7 - xalan, seems to give me
strange errors.
In the following example I have a file-list in files.xml defined like this:
<file-list>
<absolute>file://\z:\myroot\file1.xml</absolute>
<absolute>file://\z:\myroot\file2.xml</absolute>
</file-list>
my stylesheet has a template like this (output html):
<xsl:template match="page">
<BODY>
<xsl:variable name="files"
select="document('file:///Z:/myroot/files.xml')"/>
<xsl:for-each selct="document($files//file-list/absolute)">
Don't do anything now
</xsl:for-each>
</BODY>
</xsl:template>
When applying the above stylesheet to an xml-file only containing <page/>
using cocoon (setting PI's to define what stylesheet to use), I get the
following output in my browser
------------------------------------------------
Error found handling the request.
at org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1650)
at org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1559)
at org.apache.xalan.xslt.ElemForEach.(ElemForEach.java, Compiled Code)
at
org.apache.xalan.xslt.StylesheetHandler.startElement(StylesheetHandler.java,
Compiled Code)
at org.apache.xalan.xpath.xml.TreeWalker.startNode(TreeWalker.java, Compiled
Code)
------------------------------------------------
No indication of what might be wrong even..
Has anyone successfully used cocoon, document() function on a node-set? Is
this bug perhaps fixed in Xalan 1.0, but not in the version distributed with
cocoon1.7?
Cheers,
Martin
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list