Re: [xsl] Entity Questions

Subject: Re: [xsl] Entity Questions
From: "Luke Shannon" <lshannon@xxxxxxxxxxxxxxx>
Date: Mon, 17 Jan 2005 11:08:49 -0500
David;

You are correct. In the stylesheet that was outputting the text, the output
method was set to html. I have changed this to xml. This cleans up a few
things for me.

But I would still like a way to replace a <p> tag with a <fo:block>, etc.
Can this be done at the XSL level?

Thanks,

Luke

----- Original Message ----- 
From: "David Carlisle" <davidc@xxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, January 17, 2005 10:49 AM
Subject: Re: [xsl] Entity Questions


>   <?xml version="1.0"?>
>   <!DOCTYPE xsl:stylesheet [
>   <!ENTITY nbsp '&#160;'>
>   ]>
>
> there's not a lot of point doing this (although some people do it)
> it just means that you can enter a non breaking space as & nbsp; in the
> stylesheet rather than & #160;  which actually is no harder to type
> and doesn't need any DOCTYPE declaration.
>
> It makes no difference to the output how you input the character, both
> the entity reference to nbsp and the character referenceto 160 will have
> been replaced by the XML parser by the actual character before XSLt
> starts so the XSLT engine itself never sees any distinction.
>
>
>   The problem is the &nbsp; is still being outputted by a template in this
>   style sheet. It should be converted to &#160;, shouldn't it?
>
> That means that you are outputting in html mode not xml mode.
> Either you have <xsl:output method="html"/> or you have a top level
> element in your generated result called html, both of these would be
> undesirable if you are generating XSL-FO output.
>
> David
>
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________

Current Thread