[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Convert apply-templates to call-template?
Hi all
Someone kindly gave me the following stylesheet to reproduce a SQL BTree in XML nodes. I'm having a problem, however, and need to convert the template to act on <xsl:call-template /> rather than <xsl:apply-templates />. Can someone help me convert it? I've tried, but I just end up with 500 errors from PHP5. ::::: <?xml version="1.0" encoding="utf8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" encoding="utf8" indent="yes"/> <!-- Conditions equivalent to <xsl:sequence select="$boss/../item[lh gt $boss/lh and rh le $boss/rh]"/> --> <xsl:template match="item"> <xsl:param name="context"/> <xsl:if test="not($context[current()/lh > lh and rh >= current()/rh])"> <xsl:variable name="context-inner" select="$context[lh > current()/lh and current()/rh >= rh]"/> <department title="{name}"> <xsl:apply-templates select="$context-inner"> <xsl:with-param name="context" select="$context-inner"/> </xsl:apply-templates> </department> </xsl:if> </xsl:template> <xsl:template match="/"> <group> <xsl:apply-templates select="output/item"> <xsl:with-param name="context" select="output/item"/> </xsl:apply-templates> </group> </xsl:template> </xsl:stylesheet>
|
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
|