xsl-list
[Top] [All Lists]

Re: Entity Questions

2005-01-17 09:08:49
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(_at_)nag(_dot_)co(_dot_)uk>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
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
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>