Re: [xsl] processor never reaches one line in my template. Why?

Subject: Re: [xsl] processor never reaches one line in my template. Why?
From: "Joris Gillis" <roac@xxxxxxxxxx>
Date: Sat, 05 Mar 2005 12:48:05 +0100
Tempore 12:33:38, die 03/05/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Katharina Kreis <katharinakreis@xxxxxx>:

I create a variable named "partOfStockwerk" and after this I have a <xsl:if> tag. This tag is never reached. Why? I debugged the whole stylesheet and the debugger always exits the template after the declaration of this variable. I have no idea why. Hope anybody can help me.....


hi,


It would be very strange if any instructions were processed at all, because your XSLT isn't valid.
It would not be very surpring that an XSLT processor, that fails to choke on this XSL, would cause other problems, like your 'never reached' issue.


You can't use variables in match patterns, they belong in the 'apply-templates' element

So instead of writing:

<xsl:template name="Root" match="/">
  <xsl:apply-templates select="Bauvorhaben"/>
</xsl:template>

<xsl:template name="Bauvorhaben" match="Bauvorhaben[@ID=$bauvorhabenId]">
</xsl:template>

write: <xsl:template name="Root" match="/"> <xsl:apply-templates select="Bauvorhaben[@ID=$bauvorhabenId]"/> </xsl:template>

<xsl:template name="Bauvorhaben" match="Bauvorhaben">
</xsl:template>


Try modifying this troughtout your stylesheets and if the problem persists, post again with the valid XSL code.


regards,
--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041)
"N N1N;N.N8N5N9N1 N:N1N9 ON? N;N,N4N9 ON,N=ON1 N2N3N1N/N=N?ON= N1OO ON,N=O	"

Current Thread