Interessant sind bei meinem Problem die Artikel, die unter <!-- NORMALE TEXTE --> und <!-- ENDE NORMALE TEXTE --> beschrieben werden. Hier will ich immer den letzten Artikelblock, ohne Unterstrich publizieren (unabhängig der XML-Quelle).
Danke, Mind
<!-- Startvorlage -->
<xsl:template match="/Documents"> <html>
<head> <title>Newsletter</title> <!-- IDs --> #printonly {display:none;}
</style>
</head>
<body>
<!-- ################ outer table, do not change --> <p> </p>
<!-- this table row is shown on screen only (screenonly) -->
. . .
<!-- ################# end of header -->
<!-- ################# body --> <!-- body table. do not edit table! --> <table border="0" cellpadding="0" cellspacing="0" width="600" align="center" summary=""> <tr> <td>
<!-- this content is shown on screen only (screenonly), otherwise do not use the following <div> --> <!-- div not used: <div id="screenonly">--> <!-- ### this section contains the right hand tables, done via "float" ### -->
<!-- SEITLICHE TEXTE --> <div class="float">
<xsl:if test="Article/testelement[. = 'HT']"> <fieldset style="border: 1px solid #999999; width: 100%"> <legend style= "-10px"><h2>Hot Topics</h2></legend> <xsl:apply-templates select="Article" mode="ht"/> </fieldset> </xsl:if>
<xsl:if test="Article/testelement[. = 'DM']"> <fieldset style="border: 1px solid #999999; width: 100%"> <legend style= "-10px"><h2>Don’t Miss</h2></legend> <xsl:apply-templates select="Article" mode="dm" /> </fieldset> </xsl:if>
</div>
<!-- IVZ --> <div align="left"> <form action=""> <fieldset style= "border:1px solid #999999 width: 90% text-align: left"> <legend style= "-10px"><h2>IT Practices Covered in This Edition</h2></legend> <ul class="edition"> <xsl:if test="Article/testelement[. = 'UPE']"> <li class="topic"><a href="#cap01">User Productivity Enablement</a></li> </xsl:if>
<xsl:if test="Article/testelement[. = 'DU']"> <li class="topic"><a href="#cap02">Data Unification</a></li> </xsl:if>
</ul> </fieldset> </form>
</div>
<!-- NORMALE TEXTE --> <xsl:if test="Article/testelement[. = 'UPE']"> <a class="cap01" name="cap01"></a> <a class="h2" href="http://bupmain.de" target="_blank"><h2>User Productivity</h2></a> <xsl:apply-templates select="Article" mode="upe" /> <xsl:call-template name="upe_row"/> </xsl:if>
<xsl:if test="Article/testelement[. = 'DU']"> <a class="cap02" name="cap02"></a> <a class="h2" href="http://bupmain.de" target="_blank"><h2>Data</h2></a> <xsl:apply-templates select="Article" mode="du" /> <xsl:apply-templates select="Article" mode="du_row" /> </xsl:if>
<!-- NORMALE TEXTE ENDE -->
<!-- END OF MAIN CONTENT SECTION -->
<br/> </td> </tr> </table>
<!-- end of body table --> <!-- ################# end of body -->
<!-- ################# footer -->
<table border="0" width="100%" cellspacing="0" cellpadding="0" summary=""> <tr> <td class="footnote" align="center"><br/>
<hr noshade="noshade"/>© Copyright 2007 TEST AG. All rights reserved.
<!-- this blind paragraph secures enough space for anchors above. do not change! -->
<p class="screenonly" style="line-height:700px;"> </p>
<!-- end of paragraph --> </td> </tr> </table>
<!-- ################ end of footer -->
</td> </tr> </table>
<!-- end outer table --> </body> </html> </xsl:template>
<!-- Startvorlage ende-->
<!-- START Template Rules -->
<!-- Right Hand Article -->
<xsl:template match="Article" mode="ht" > xsl:choose <xsl:when test="testelement[. = 'HT']"> <xsl:call-template name="ht"/> </xsl:when> </xsl:choose> </xsl:template>
<xsl:template match="Article" mode="dm" > xsl:choose <xsl:when test="testelement[. = 'DM']"> <xsl:call-template name="ht"/> </xsl:when> </xsl:choose> </xsl:template>
<!-- END Right Hand Article -->
<!-- START Main Topics --> <xsl:template match="Article" mode="upe"> xsl:choose <xsl:when test="testelement[. = 'UPE']"> <xsl:call-template name="upe"/> </xsl:when> </xsl:choose> </xsl:template>
<xsl:template match="Article" mode="du"> xsl:choose <xsl:when test="testelement[. = 'DU']"> <xsl:call-template name="du"/> </xsl:when> </xsl:choose> </xsl:template>
<!-- END Main Topics -->
<!-- START Rows -->
<xsl:template match="Article" mode="upe_row"> xsl:choose <xsl:when test="testelement[. = 'DU' or . = 'BIM' or . = 'BEV' or . = 'ETEPI' or . = 'CD' or . = 'ULCM' or . = 'AM' or . = 'C' or . = 'ED']"> <xsl:call-template name="upe_row"/> </xsl:when> </xsl:choose> </xsl:template>
<xsl:template match="Article" mode="du_row"> xsl:choose <xsl:when test="testelement[. = 'BIM' or . = 'BEV' or . = 'ETEPI' or . = 'CD' or . = 'ULCM' or . = 'AM' or . = 'C' or . = 'ED']"> <xsl:call-template name="du_row"/> </xsl:when> </xsl:choose> </xsl:template>
</xsl:template>
<!-- END Rows -->
<!-- END Template Rules -->
<!-- START Templates -->
<!-- START Right Hand Article --> <xsl:template name="ht"> <ul style=""> <li class="topic"><a target="_blank"><xsl:attribute name="href"><xsl:value-of select="link" /></xsl:attribute><xsl:value-of select="titel"/></a> <br/> <xsl:value-of select="abstract"/> </li> </ul> <br/> </xsl:template>
<xsl:template name="dm"> <ul style=""> <li class="topic"><a target="_blank"><xsl:attribute name="href"><xsl:value-of select="link" /></xsl:attribute><xsl:value-of select="titel"/></a> <br/> <xsl:value-of select="abstract"/> </li> </ul> <br/> </xsl:template> <!-- END Right Hand Article -->
<!-- START Table of Contents -->
<xsl:template name="ivzupe"> <li class="topic"><a href="#cap01">User Productivity Enablement</a></li> </xsl:template>
<!-- END Table of Contents -->
<!-- START Main Topics -->
<xsl:template name="upe"> <h3><a target="_blank"><xsl:attribute name="href"><xsl:value-of select="link" /></xsl:attribute><xsl:value-of select="titel"/><xsl:value-of select="titel"/></a></h3> <p><xsl:value-of select="abstract"/></p> </xsl:template>
<xsl:template name="du"> <h3><a target="_blank"><xsl:attribute name="href"><xsl:value-of select="link" /></xsl:attribute><xsl:value-of select="titel"/><xsl:value-of select="titel"/></a></h3> <p><xsl:value-of select="abstract"/></p> </xsl:template>
<!-- END Main Topics -->
<!-- START Rows --> <xsl:template name="upe_row"> <div class="screenonly"> <p class="backtotop" align="right"><a href="#top">Back to top</a></p></div>
<!-- do not touch this row --> <hr noshade="noshade"/> </xsl:template>
<xsl:template name="du_row"> <div class="screenonly"> <p class="backtotop" align="right"><a href="#top">Back to top</a></p></div>
<!-- do not touch this row --> <hr noshade="noshade"/> </xsl:template>
<!-- END Rows -->
<!-- END Templates -->
</xsl:stylesheet>