xsl-list
[Top] [All Lists]

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

2005-03-05 04:48:05
Tempore 12:33:38, die 03/05/2005 AD, hinc in xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com scripsit Katharina Kreis <katharinakreis(_at_)web(_dot_)de>:

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[(_at_)ID=$bauvorhabenId]">
</xsl:template>

write:
<xsl:template name="Root" match="/">
        <xsl:apply-templates select="Bauvorhaben[(_at_)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)
"Η αλήθεια και το λάδι πάντα βγαίνουν από πάνω"

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--