|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XSLT Spec Problem
When using parameters with template matches, the parameters only last during
the first match made. For example:
<DIV>
<P>
<SPAN>
<xsl:template match="DIV">
<xsl:apply-templates select="*>
<xsl:param name="label">true</xsl:param>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="SPAN">
<xsl:param-variable name="label">false</xsl:param-variable>
....
</xsl:template>
This would work as written. Now suppose somebody comes along an adds a match
for <P>
<xsl:template match="P">
</xsl:template>
This breaks the stylesheet because the parameters are lost.
Doesn't this make stylesheets containing parameters very fragile to change?
Any one making a change must carefully understand all use of parameters
before making the slightest change to the sheet. In this case the <P> match
needs to be modified to pass the label parameter along, but what if there
were more combos like DIV/SPAN that the P tag would mess up? All of these
variable would have to be passed along.
Could variables be visible to all matches until the select="*" returns?
Jon Smirl
jonsmirl@xxxxxxxxxxxx
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








