This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: how to translate entities with XSL
- To: xsl-list at mulberrytech dot com
- Subject: Re: how to translate entities with XSL
- From: Mike Brown <mike at skew dot org>
- Date: Thu, 8 Jun 2000 01:30:31 -0600 (MDT)
- Reply-To: xsl-list at mulberrytech dot com
> I have an XML document with HTML embedded within the element attributes.
> An example of one of the elements would be:
>
> <row html="example output<BR>">
Bad form. Use XHTML in the element content.
<row>
<xhtml>example output<br/></xhtml>
</row>
Then instead of <xsl:value-of select="@html"/> which I assume you're
using, use <xsl:copy-of select="xhtml/node()"/>. If node() is not working,
"xhtml/*|xhtml/text()|xhtml/comment()|xhtml/processing-instruction()" ...
sorry I can't answer with certainty but I don't use MSXML.
> I am trying to use XSL to insert these chunks of HTML into an HTML document,
> however, I cannot figure out how to get the entities translated back into
> "<" and ">". Any ideas on how to do this? I am using MSXML, so that puts a
> limit on what XSL tags I can use.
If using XHTML in the XSL, and <xsl:output method="html"/> cannot be used
to get the results you want, then you are using the wrong tools for the
job. XSL(T) is a node tree transformation language, not a language for
serially pasting together strings of arbitrary text and calling it HTML.
If you need that, there's ASP, JSP, PHP, Cold Fusion, server-side
includes, etc.
- Mike
____________________________________________________________________
Mike J. Brown, software engineer at My XML/XSL resources:
webb.net in Denver, Colorado, USA http://www.skew.org/xml/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list