[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

getting xsl to produce ill-formed xml?

Subject: getting xsl to produce ill-formed xml?
From: "Mark D. Anderson" <mda@xxxxxxxxxxxxxx>
Date: Thu, 18 Mar 1999 21:22:35 -0800

is there any way to get an xsl style sheet to produce
something that isn't proper xml?

i just wrote a xsl style sheet to generate perl code
(don't ask), and that needs to have things like '=>'
in it (not to mention the comparison operator '<').
i couldn't find any combination of attributes to
the xsl:stylesheet element to get xt to do that --
it would always produce '&gt;' instead.
if the result-ns is set to html, then the output will
convert any &lt; or &gt; in the style sheet to the correct
characters. but my generated perl code isn't valid html
either (and more importantly, a valid html page isn't 
valid perl, because of the generate DOCTYPE declaration at
the top).

so i omitted result-ns and i wrote a perl post-processor
(which i guess is appropriate) to convert those "&gt;"
strings back to ">".

is this something that is basically disallowed (that is,
sticking things like unbalanced '<' or '>' in an xsl:text).
or would i have to write a result-ns="perl" handler that
expands entities but doesn't insert that DOCTYPE?


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread