Subject: Re: [xsl] attributes and elements From: "Bruce D'Arcus" <bdarcus@xxxxxxxxxxx> Date: Fri, 5 Dec 2003 18:51:16 -0500 |
Bruce D'Arcus wrote: <content> ---> <xsl:if test="*/condition"> ---> <xsl:apply-templates/> ---> </xsl:if>
The test test, whether one of the child elements of the section element has a condicion element as child. I just can't quite match the XSLT with your problem spec, as a rather wild guess I'd say try: ... <content> <xsl:apply-templates mode="filter-condition"/> ...
<xsl:template match="*[@condition='screen']" mode="filter-condition"> <xsl:apply-templates/> </xsl:template>
<xsl:template match="node()" mode="filter-condition"/>
<section> <title>title</title> <p>Some text to become <q type="screen">a bullet</q> here.</p> </section>
<h1>title</h1> <content> <bullet>a bullet</bullet> </content>
<xsl:template match="section"> <h1> <xsl:apply-templates select="title"/> </h1> <content> <xsl:apply-templates mode="filter-condition"/> </content> </xsl:template>
<xsl:template match="*[@type='screen']" mode="filter-condition"> <bullet> <xsl:apply-templates/> </bullet> </xsl:template>
</xsl:stylesheet> ------------------------ Bruce
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] attributes and elements, J.Pietschmann | Thread | Re: [xsl] attributes and elements, J.Pietschmann |
Re: [xsl] Re: Easy way to identify , G. Ken Holman | Date | [xsl] Re: Re: How to Calculate Runn, Dimitre Novatchev |
Month |