Re: [xslt] generating malformed XML (html) from malformed XML (xhtml)



On Fri, 14 Nov 2003, Morus Walter wrote:

> Joost Helberg writes:
> >
> > I was hoping I could allow the input with either < constructions or
> > even using %3C etc..
> >
> Escaping with < > and " is ok for the input.
> But I'm afraid the output won't be, what you are looking for.
> If you need <A href="/all/projects/<!--#echo var="REMOTE_USER" -->">
> in the output, you will have to use some ugly disable-output-escaping
> options in your xslt, since this isn't reasonable html.

Might be easier just to post process the data to spot these in the
application as the output is being serialised. After all it's only an
"&lt;!--#" as the introducer of the command and "--&gt;" as the tail of
that command. Since the replacements ("<!--#" and "--&gt;")  are both
shorter, it should be relatively trivial to just replace these as you're
writing the output.

That would avoid disabling any output escaping which, as you say, is
rather ugly.

-- 
Gerph
<http://www.movspclr.co.uk/> <http://homepage.ntlworld.com/justin.fletcher/>
... Tearing me apart.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]