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

On Fri, Nov 14, 2003 at 01:38:18PM +0100, Joost Helberg wrote:
> > > Does any of you have a good idea on how to implement this?
> > 
> >   Well it's not XML, you can't parse it with an XML parser.
> > I have no good idea about how to parse this, this is not XML
> > nor HTML, apparently Apache Server Side Includes are supposed 
> > to be processed before being passed to the XML or HTML parser,
> > so it seems unlikely you can find a good solution at the XML
> > level for what you want.
> > 
> I was hoping I could allow the input with either < constructions or
> even using %3C etc..
> <A href="/all/projects/%3C!--#echo var=%22REMOTE_USER%22 --%3E">Your Projects</A>.
> or 
> <A href="/all/projects/&lt;!--#echo var=REMOTE_USER --&gt;">Your Projects</A>.
> would work.

  Well, that will fix the input problem, that's right.
I wasn't sure you were ready to modify the input, but taht way
a solution should be possible.

> Both are valid XML and may be mapped to the output I need. But
> experimenting didn't make the solution occur to me.

  The problem you're likely to see is that it will be escaped
on output . Maybe catching the attributes where the SSI are likely
to occur, look for the <!-- string inside and use disabled escaping
for the output attribute value might work in that case. section 16.4
though I don't think you can reliably disable escaping on attribute 
value output...


Daniel Veillard      | Red Hat Network  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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