Hi,
[color=blue]
> Hi,
>
> Setting the output method to 'text' may solves the ampersand and the[/color]
superfluous wittespaces, but the 'a' element and it's attribute will not be
outputted. (
http://www.w3.org/TR/xslt.html#secti...-Output-Method)[color=blue]
> I don't think it makes sense to output 'text' if you're actually dealing[/color]
with 'html'. Moreover you'd have to have to strinyfy all element and
attributes throughout the stylesheet, a really bad idea if you ask me.[color=blue]
> If this 'hack' really is the only way around it, don't you agree that this[/color]
is a shortcomming in the XSLT1.0 Recommendation?
I did not mention the output method at all! - merely pointed to the correct
and safe way of outputting text nodes using the <xsl:text> instruction.
This is no hack whatsoever, and there is not shortcomming in the W3 rec
regarding this issue. It is known by all seasoned XSLT programmers that the
first step towards taking firm control of whitespace (in whatever output
mode) is to avoid using implicit text node output and opt for using explicit
text node output using the <xsl:text> instruction. The <xsl:text>
instruction is there for a reason - one of which being so that explicit
output text nodes can be differentiated from whitespace text nodes in the
stylesheet that are merely there to 'prettify' the stylesheet for
readability (which might otherwise be assumed by the XSLT transformation as
text nodes for output).
I can only suggest you re-read my original posting again ;) If you read it
carefully you will notice there is no mention of the output mode and gives
clear example code on using the <xsl:text> instruction.
Cheers
Marrow
"Joris Gillis" <roac@pandora.be> wrote in message
news:opsgr3mvnfyf9v9r@news.pandora.be...[color=blue][color=green]
> > The reason you are seeing whitespace in the attribute output is because[/color][/color]
you[color=blue][color=green]
> > are using implied output text. As soon as you use implied output text -
> > that implied output text will also include any whitespace (inc. tabs,[/color][/color]
CRs[color=blue][color=green]
> > etc.).
> >
> > You can overcome this by using explicit output text (and it's best to[/color][/color]
get[color=blue][color=green]
> > into the habit of using explicit output text), e.g.
> > The ampersands are being correctly recognised and are being URL encoded
> > according to the HTML/XHTML specs.[/color]
>
> Hi,
>
> Setting the output method to 'text' may solves the ampersand and the[/color]
superfluous wittespaces, but the 'a' element and it's attribute will not be
outputted. (
http://www.w3.org/TR/xslt.html#secti...-Output-Method)[color=blue]
> I don't think it makes sense to output 'text' if you're actually dealing[/color]
with 'html'. Moreover you'd have to have to strinyfy all element and
attributes throughout the stylesheet, a really bad idea if you ask me.[color=blue]
> If this 'hack' really is the only way around it, don't you agree that this[/color]
is a shortcomming in the XSLT1.0 Recommendation?[color=blue]
>
> regards,
> --
> Joris Gillis (
http://www.ticalc.org/cgi-bin/acct-v...i?userid=38041)
> Ceterum censeo XML omnibus esse utendum[/color]