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

XSLT Spec Problem

Subject: XSLT Spec Problem
From: "Jon Smirl" <jonsmirl@xxxxxxxxxxxx>
Date: Sat, 24 Jul 1999 11:15:51 -0400
xslt change p tag
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


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.