xsl-list
[Top] [All Lists]

Re: [xsl] Making an FAQ page from XML

2007-02-11 16:20:10

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:
Don't make "*|@*" your first match. Make it your last. Instead, match on faqlist. Not entirely sure what are the extra content is, so I cannot really judge the right way of doing things. Try this:

<xsl:template match='faqlist'> <xsl:apply-templates select="*[local-name != 'faq']"/> <xsl:apply-templates select="faq" mode="question"/> <xsl:apply-templates select="faq" mode="answer"/> </xsl:template>

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



--
Kamal Bhatt


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--