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

Re: Making an FAQ page from XML

Subject: Re: Making an FAQ page from XML
From: John Steel <john.steel@xxxxxxxxxxxxxxx>
Date: Sun, 11 Feb 2007 23:01:39 +0000
Re:  Making an FAQ page from XML
Kamal Bhatt wrote:
John Steel wrote:
Hi,
...
How can I set up some kind of "toggle" to say parse again but just for the 'a' nodes please? Thanks very much in advance.
You want to use modes.

You can have multiple matches if you use a mode. Eg:

<xsl:apply-templates select="faq" mode="question"/>
<xsl:apply-templates select="faq" mode="answer"/>

Thank you! That is excellent, but I have tried to wire it into my main template and it either doesn't copy the rest of the content or duplicates it. My only apply-templates line has select='node()|@*' and seems to insist on it. Could you see exactly what I need please? I'm trying stuff along these lines etc:

<xsl:template match='*|@*'>
<xsl:copy>
<xsl:apply-templates select='node()|@*'/>
</xsl:copy>
<xsl:apply-templates select="faq" mode="question"/>
<xsl:apply-templates select="faq" mode="answer"/> </xsl:template>


...

<xsl:template match="faq" mode="question">
...Question processing...
</xsl:template>

<xsl:template match="faq" mode="answer">
...Answer processing...
</xsl:template



--
--------------------------
http://www.phonewebcam.com
john.steel@xxxxxxxxxxxxxxx

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-2011 All Rights Reserved.