[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Fwd: document() doesn't pick up a param

Subject: Fwd: document() doesn't pick up a param
From: Michael Labhard <mlabhard@xxxxxxxxxxxxxxx>
Date: Thu, 7 Sep 2000 11:00:43 -0700
xmlns jsp xsl stylesheet
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.