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

Re: regarding newline

Subject: Re: regarding newline
From: Peter Davis <pdavis152@xxxxxxxxx>
Date: Thu, 11 Jul 2002 03:41:38 -0700
xsl newline entity
On Thursday 11 July 2002 03:14, subbu@xxxxxxxxxxxx wrote:
> Wheather or not i am in the right track to declare entities in the dtd file
> and refer them in the XSL ..

The XML parser that reads the stylesheet (before it is sent to the XSLT 
processor) is not required to read external files for the DTD.  You didn't 
say which XSLT processor you are using (and which XML parser the XSLT parser 
uses), so I can only guess that this is the problem.  If the XML parser is 
not reading external DTD files, then the <!ENTITY> declarations are being 
ignored.

The solution is probably to not declare the entities in an external file, but 
inside the DOCTYPE like this:

<!DOCTYPE xsl:stylesheet [
  <!ENTITY ... >
  <!ENTITY ... >
]>
<xsl:stylesheet ...>

If it still doesn't work, or if you want to keep the entities in a single 
separate file for maintainability purposes, then try configuring your XSLT 
processor to use a different XML parser.


I should ask though, is typing "&newline;" really that much better than typing 
"&#10;"?

BTW, newlines and tabs are only normalized to a single space in *attribute 
values*, not normal text.  So you can avoid using &#xA; or whatever in some 
places, if you wish.

-- 
Peter Davis

 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.