|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: problem with xsl:choose
At 02:19 25-05-2001, Student1 ASCO-ELK (RBJE/ELK) wrote:
unfortunately i have some book about xlst ;) Use templates. <xsl:template match="/">
<xsl:if test="not(//screen) and not(//table)">
<xsl:message>error</xsl:message>
</xsl:if>
<xsl:apply-templates select="//screen|//table"/>
</xsl:template><xsl:template match="screen">
<table class=screen>
<xsl:attribute name=tID>
<xsl:value-of select="@h"/>
<xsl:attribute>
<xsl:call-template name='screenHdr'/>
<!-- put whatever is in your current screen template here -->
</table>
</xsl:template><xsl:template match="table">
<table class=table>
<xsl:attribute name=tID>
<xsl:value-of select="@h"/>
<xsl:attribute>
<xsl:call-template name='tableHdr'/>
<!-- put whatever is in your current table template here -->
</table>
</xsl:template>i cant use only the <xsl:apply-templates ... /> because i dont want the <table ...></table> to appear in the outputfile Sorry, no. Your example, if it worked, would put table tags in the output file; if you don't want them, don't generate them in your stylesheet. -Chris -- Christopher R. Maden, XML Consultant DTDs/schemas - conversion - ebooks - publishing - Web - B2B - training <URL: http://crism.maden.org/consulting/ > PGP Fingerprint: BBA6 4085 DED0 E176 D6D4 5DFC AC52 F825 AFEC 58DA XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








