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

Re: apply templates with with-param on Xalan

Subject: Re: apply templates with with-param on Xalan
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 24 Jul 2000 16:51:07 GMT
xalan apply templates variable
  <xsl:template match="completely-unlet" name="completely-unlet">
    <xsl:variable name="completely-unlet" 
       select="document('rbscommon/binary-list.xml')"/>
    <xsl:apply-templates select="$completely-unlet">
    <xsl:with-param name="pname" select="'completely-unlet'"/>
   </xsl:apply-templates>
  </xsl:template> 

Why do you have the variable here? rather than just putting the
document() call in the apply-templates select?

But either way you have selected the root node of the document.
So unless you have defined a template for a root node that accepts
a parameter pname and passes it down with apply-templates, then
this parameter will have no effect.

If list is your document element, then as al alternative to specifying a
new template for / you can instead select list directly:


<xsl:template match="completely-unlet" name="completely-unlet">

  <xsl:apply-templates select="
      "document('rbscommon/binary-list.xml')/list">
                                    <!--   ^^^^^^^  -->
    <xsl:with-param name="pname" select="'completely-unlet'"/>
  </xsl:apply-templates>
</xsl:template> 

David


 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.