Print

Print


Hi,

Followers of this thread should note that Sebastian's suggestion, 
while it will "unescape" faux tagging in CDATA marked sections or the 
equivalent, will not remedy any of its syntactic problems. So this 
method will only work with the help of a subsequent process to 
intercept malformed "XML" and sequester or maybe fix it. In some 
scenarios, this might be the bulk of the data.

Also (and this is a fine but important point) this will only work if 
your pipeline writes its intermediate results to a file ... the 
escaping of markup characters on serialization can only be disabled 
if there is actually a serialization in which to disable it....

Cheers,
Wendell

At 11:59 AM 7/29/2009, Sebastian wrote:
>pragmatically, run this filter on the XML before your
>real transformation (in a pipeline).
>
><xsl:stylesheet
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>   version="2.0"
> >
><xsl:output method="xml" indent="yes" encoding="utf-8"/>
>
><xsl:template match="@*|comment()|processing-instruction()">
>  <xsl:copy-of select="."/>
></xsl:template>
>
><xsl:template match="*">
>   <xsl:copy>
>     <xsl:apply-templates
>     select="*|@*|processing-instruction()|comment()|text()"/>
>   </xsl:copy>
></xsl:template>
>
><xsl:template match="text()">
>   <xsl:value-of select="." disable-output-escaping="yes"/>
></xsl:template>
>
></xsl:stylesheet>





======================================================================
Wendell Piez                            mailto:[log in to unmask]
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
   Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================