Re: [xsl] Re: avoiding disable-output-escaping, how to output M$ wierd syntax

Subject: Re: [xsl] Re: avoiding disable-output-escaping, how to output M$ wierd syntax
From: Jon Gorman <jonathan.gorman@xxxxxxxxx>
Date: Wed, 31 Aug 2005 15:08:59 -0500
> > >  <xsl:comment>[if IE]><link rel="stylesheet" type="text/css"
> > > href="/~rodney/times/css/ieonly.css" media="screen"
> > > /><![endif]</xsl:comment>
> >
> >
> >Well, the link element gets parsed as a node and the comment output
> >does not have any link in it.  It (xsltproc) also tries to parse
> >"<![endif]" and pukes on the ! in the element name.  It would also
> >puke if it ever got to the missing >.
> Yes. Details Jon missed. Actually the ">" would be fine; it's only the "<"
> that will be a problem.
> Escape it as &lt; and you'll be fine there too.

Hmmm, I think either gmail on the output or some other other process
was a little too helpful in escaping my original.  In any case, my
original email that I sent out had &lt; (I'll try escaping here again
&amp;lt;), not < (really, it did, I swear it.  I ran this through
libproc myself and it worked fine).

Sorry for the confusion.  I probably should have made it clearer in my
original email, but as one could guess, I was in a bit of a hurry.

The basic point was that you're not creating an element really here,
you're creating an comment that has something inside of it that looks
like an element.  So you just do the comment and then do some escaping
for characters that would through an error.

On the other hand, I haven't noticed gmail doing this before...will
have to do some test runs to see if it is gmail or something else.
Would hate to think that it could crop up again when I'm trying to
give advice

It still makes me queasy doing this hack for just IE ;).

Jon Gorman

Current Thread