This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Fwd: document() doesn't pick up a param
- To: xsl-list at mulberrytech dot com
- Subject: Fwd: document() doesn't pick up a param
- From: Michael Labhard <mlabhard at viatraining dot com>
- Date: Thu, 7 Sep 2000 11:00:43 -0700
- Organization: VIA
- Reply-To: xsl-list at mulberrytech dot com
The XSL statement "with-param" doesn't seem to be carried over to processing of
nodesets from "document(...)" calls. Observer:
These are the simple versions
(no document() call).
<?xml version="1.0"?>
<thisisroot>
<matchme/>
</thisisroot>
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:via="http://www.viatraining.com" xmlns:xsp="http://www.apache.org/1999/XSP/Core" xmlns:jsp="http://java.apache.org/jsp" version="1.0">
<xsl:template match="/thisisroot">
<xsl:apply-templates>
<xsl:with-param name="blah" select="555"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="matchme">
<xsl:param name="blah" select="444"/>
<xsl:value-of select="concat('ITis: ',$blah)"/>
</xsl:template>
</xsl:stylesheet>
These are the versions with "document(...)":
The first XML:
<?xml version="1.0"?>
<thisisroot>
</thisisroot>
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:via="http://www.viatraining.com" xmlns:xsp="http://www.apache.org/1999/XSP/Core" xmlns:jsp="http://java.apache.org/jsp" version="1.0">
<xsl:template match="/thisisroot">
<xsl:apply-templates select="document('incoming.xml')">
<xsl:with-param name="blah" select="555"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="matchme">
<xsl:param name="blah" select="444"/>
<xsl:value-of select="concat('ITis: ',$blah)"/>
</xsl:template>
</xsl:stylesheet>
Here is Incoming.xml:
<?xml version="1.0"?>
<matchme/>
The result is 555 in the first case 444 in the second. How does one carry
parameters over to other documents?
-------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list