[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] with-param and context
If you apply the following stylesheet to a document that consists simply of "<doc/>", you'll get: text-only=0 text-only=1 (This is the consistent behavior of Saxon, xalan, and XT.) I can't fathom what the difference in context makes to with-param. Enlightenment, please. <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="*" mode="title.ref"> <xsl:param name="text-only" select="'0'"/> <xsl:message>text-only=<xsl:value-of select="$text-only"/></xsl:message> </xsl:template> <!-- ==================================================================== --> <xsl:template name="head.content"> <xsl:param name="node" select="."/> <xsl:apply-templates select="$node" mode="title.ref"> <xsl:with-param name="text-only" select="'1'"/> </xsl:apply-templates> </xsl:template> <!-- ==================================================================== --> <xsl:template match="/"> <xsl:call-template name="head.content"> <xsl:with-param name="node" select="."/> </xsl:call-template> <xsl:apply-templates/> </xsl:template> <xsl:template match="doc"> <xsl:call-template name="head.content"> <xsl:with-param name="node" select="."/> </xsl:call-template> </xsl:template> </xsl:stylesheet> Be seeing you, norm -- Norman.Walsh@xxxxxxxxxxxx | Are you not the future of all the memories XML Technology Center | stored within you? The future of the Sun Microsystems, Inc. | past?--Val\'ery 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
|