|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Fwd: document() doesn't pick up a param
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
|
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
|

Cart








