[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

[RE:] Top Ten Java and XSLT Tips, #5

Subject: [RE:] Top Ten Java and XSLT Tips, #5
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Wed, 5 Sep 2001 00:12:28 -0700 (PDT)
reference to undeclared entity xslt
> The new tip #5 in summary...
> 
> "Here is a summary of the techniques presented here:
> 
> "Use the "&#160;" character entity to represent non-breaking spaces. This
> works when the output method is "html", because most XSLT processors convert
> the entity to the literal characters "&nbsp;". The XSLT specification does
> not mandate this behavior, but Xalan works this way. 
> 
> "Define an entity for "&nbsp;" and use that. This is effectively identical
> to the first approach, but may look nicer for stylesheet authors. It may
> introduce problems when certain tools mistakenly try to validate the
> stylesheet against the non-existent DTD. 
> 
> "Use <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text> as an
> alternative to "&#160;". This is particularly useful when the output method
> is "xml". The XSLT specification does not mandate that processors support
> disable-output-escaping. 

The last paragraph is not "particularly useful when the output method is 'xml'. The
result it will produce will not be a well-formed xml document, e.g. the following:

        <test>
            test1&nbsp;test2
        </test>

An xml parser (e.g. the one used in Saxon) will complain that "reference to
undeclared entity (found "nbsp")".

Cheers,
Dimitre Novatchev.

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.