xsl-list
[Top] [All Lists]

Re: [xsl] Printing CDATA from feed as HTML

2008-06-13 01:44:39
"David" == David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk> writes:

    >> I think a parse() function almost made it into 2.0...

    David> it did.

    David> <xsl:function name="x:parse" as="document-node()">
    David> <xsl:param name="s" as="xs:string"/> <xsl:sequence
    David> select="doc(concat('data:text/xml,'$s))"/> </xsl:function>

Almost.

Your data URI needs the charset parameter. 

And application/xml, not text/xml - the latter is almost never correct,
and certainly not here (the contents of $s is read by an XML parser,
not a human).
-- 
Nit-picker
Preston Lancashire

--~------------------------------------------------------------------
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>
--~--