![]() |
|
|
|||||||
![]() |
XML - Re: Emitting to HTML Output |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Johannes Koch wrote:
> Andy Dingley wrote: > > Assuming that I want _exactly_ what's the best/neatest way to > > do this ? > > <xsl & is encoded as & regardless of the encoding so this will not make any difference. If you really really really need to emit in the output, use <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text> -- Klaus Johannes Rusch http://www.atmedia.net/KlausRusch/ Klaus Johannes Rusch |
|
|
|
|
#2 |
|
Posts: n/a
|
In article <bd9d3a$qmlmt$>,
Johannes Koch <> wrote: >>>Assuming that I want _exactly_ what's the best/neatest way to >>>do this ? .... >No, I meant > >and ><xsl That should ensure that it isn't output as a literal NBSP character, but is not likely to make it be output as instead of -- Richard -- Spam filter: to mail me from a .com/.net site, put my surname in the headers. FreeBSD rules! |
|
|
|
#3 |
|
Posts: n/a
|
Richard Tobin wrote:
> In article <bd9d3a$qmlmt$>, > Johannes Koch <> wrote: >>No, I meant >> >>and >><xsl > > > That should ensure that it isn't output as a literal NBSP character, > but is not likely to make it be output as instead of At least with Saxon 6.5.2 and Xalan-J 2.5.0 when outputting HTML, it does. -- Johannes Koch In te domine speravi; non confundar in aeternum. (Te Deum, 4th cent.) |
|
|
|
#4 |
|
Posts: n/a
|
Johannes Koch wrote:
> At least with Saxon 6.5.2 and Xalan-J 2.5.0 when outputting HTML, it does. That is the key point: when outputting HTML, an XSLT processor can use HTML entities, when outputting XML output it cannot, because there is no entity defined in XML. -- Klaus Johannes Rusch http://www.atmedia.net/KlausRusch/ |
|
|
|
#5 |
|
Posts: n/a
|
Richard Tobin wrote:
> In article <bdc0ei$r6rs7$>, > Johannes Koch <> wrote: >>So it is a solution for the OP's use case. > > > Yes, so long as you remember that it's implementation dependent. /me and the OP -- Johannes Koch In te domine speravi; non confundar in aeternum. (Te Deum, 4th cent.) |
|
|
|
#6 |
|
Posts: n/a
|
Klaus Johannes Rusch <> writes:
> Johannes Koch wrote: > > > Andy Dingley wrote: > > > Assuming that I want _exactly_ what's the best/neatest way to > > > do this ? > > > > <xsl > > & is encoded as & regardless of the encoding so this will not make any > difference. > > If you really really really need to emit in the output, use > > <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text> Which may or may not work. I avoid that feature since you can't depend on it, and there's never a time (to my knowledge) that it's necessary for producing well-formed XML with the desired effect (unless the "desired effect" is defined to include the formatting of the source code, in which case you're better off post-processing it anyway). -Micah |
|