This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: differences in methods of inserting a space in HTML produced from XSLT
- From: "G. Ken Holman" <gkholman at CraneSoftwrights dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 22 Jan 2002 12:14:43 -0500
- Subject: Re: [xsl] differences in methods of inserting a space in HTML produced from XSLT
- Reply-to: xsl-list at lists dot mulberrytech dot com
At 2002-01-22 11:48 -0500, Saverio Perugini wrote:
>What are the differences in the following methods of inserting a space into
>an HTML file produced from an XML file and XSLT template with
><xsl:output method="html"/>?
>
><xsl:text disable-output-escaping="yes">
</xsl:text>
>
><xsl:text disable-output-escaping="yes">&#xA;</xsl:text>
>
><xsl:text disable-output-escaping="yes">&#160;</xsl:text>
>
><xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
>
>All produce the desired output just fine.
But you are using a feature of XSLT that is not required to be supported by
a processor:
Ref. 16.4:
An XSLT processor is not required to support disabling output escaping.
>What are the consequences of using each?
Someone using your stylesheet may not be using a processor that supports
the attribute you've chosen to use. The consequence is that they will get
that text as visible text in their result.
>Is there a preferred/correct method?
None of the above.
Use   or   or   (note your typos above) in your stylesheet
and let the XSLT processor recognize the HTML output method and put out
if it chooses to. Even if it doesn't choose to, it will still put
out a character acceptable to user agents.
If you *really* want to see in your stylesheet, then create an
entity declaration in the internal declaration subset of your stylesheet.
I hope this helps.
......................... Ken
--
Upcoming: 3-days XSLT/XPath and/or 2-days XSLFO - Feb 18-22, 2002
G. Ken Holman mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995)
ISBN 0-13-065196-6 Definitive XSLT & XPath
ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath
ISBN 1-894049-07-1 Practical Formatting Using XSLFO
XSL/XML/DSSSL/SGML/OmniMark services, books(electronic, printed),
articles, training(instructor-live,Internet-live,web/CD,licensed)
Next public training: 02-02-11,12,14,15,18,21,03-04,05,06,08,11,
- 04-08,09,10,12,05-14,15,06-04,07
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list