This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: regarding newline


On Thursday 11 July 2002 03:14, subbu@boltblue.com 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]