|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: attributes and elements
J.Pietschmann wrote:
I've put together a stripped down example. Let's say here's my instance: <section> <title>title</title> <p>Some text to become <q type="screen">a bullet</q> here.</p> </section> I just want output like: <h1>title</h1> <content> <bullet>a bullet</bullet> </content> I can't seem to get that. Here's the xslt, using your example: ---------------------- <?xml version='1.0' encoding='utf-8'?> <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> <xsl:output method='xml' version='1.0' encoding='utf-8' indent='yes'/> <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:template match="node()" mode="filter-condition"/> </xsl:stylesheet> ------------------------ Bruce 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








