[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Select all heading tags

Subject: Select all heading tags
From: "Graeme Kidd" <coolkidd3@xxxxxxxxxxx>
Date: Tue, 30 Dec 2008 05:06:16 -0000
 Select all heading tags
Hi

I was wondering how I would be able to pick up headings from <sect> when I don't know what heading numbers will be used. What would be nice is to simply be able to say "select the tag which starts with a 'h' and ends in a number". Any idea how you would do this?

An example that obviously wont work is this:
XSL
...
<xsl:apply-templates select="h*" />
...
<xsl:template match="h*">
   <title>
	<xsl:value-of select="h*"/>
   </title>
</xsl:template>
...
XML Input
<root>
<sect>
   <h1>Heading 1</h1>
   <part>text</part>
</sect>
<sect>
   <h4>Heading 4</h4>
   <part>text</part>
</sect>
<sect>
   <h9>Heading 9</h9>
   <part>text</part>
</sect>
</root>

XML Output
<root>
<sect>
<title>Heading 1</title>
</sect>
<sect>
<title>Heading 4</title>
</sect>
<sect>
<title>Heading 9</title>
</sect>
</root>


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.