Hmm it was not good interpretated.
So if you add the template bellow to your code then for each node which have
not any template matching it,
it will copy the node as it is. And if this node is an HTML tag, it will be
display correctly in the browser.
-----Message d'origine-----
De : owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com]De la part de
Ricaud
Matthieu
Envoye : mercredi 10 mars 2004 15:40
A : xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Objet : RE: [xsl] Embedding html within xml
In your xsl stylesheet you can write this template :
<xsl:template match="*">
<xsl:copy><xsl:for-each select="@*"><xsl:copy/></xsl:for-each><xsl:if
test="*|text()"><xsl:apply-templates/></xsl:if></xsl:copy>
</xsl:template>
So that every node in your xml corresponding to a HTML tag will be display
as HTLM.
-----Message d'origine-----
De : owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com]De la part de
John Reid
Envoye : mercredi 10 mars 2004 14:11
A : xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Objet : RE: [xsl] Embedding html within xml
Took your advice and changed it to
<rule type="Change of Particulars">To change your particulars. ie change
of address, marital status etc <a
href="www.defence.gov.au/army/6hsb/h_Particulars.htm">click
here.</a></rule>
But how would I change the below to capture the <a></a>? It does not
exist within every rule
<ul>
<xsl:for-each select="rules/rule">
<li class="strong"><xsl:value-of select="@type" /><br/>
<span class="goldmedium"><xsl:value-of select="."
/></span></li>
</xsl:for-each>
</ul>
-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of
David
Carlisle
Sent: Wednesday, 10 March 2004 10:44 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Embedding html within xml
Usual advice is to change your input format to
<rule type="Change of Particulars">To change your particulars. ie change
of address, marital status etc <a
href="www.defence.gov.au/army/6hsb/h_Particulars.htm">click
here.</a></rule>
But if that is out of your control then use (if your system supports it)
<xsl:template match="rule">
<xsl:value-of disable-output-escaping="yes" select="."/>
but complain to someone about your unpleasant input...
David
--
http://www.dcarlisle.demon.co.uk/matthew
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list