[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] How to use ENTITY declarations and references?
I really am having a hard time with what seems to be some basic XML/XSL. Given this minimal stylesheet: <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns="http://www.w3.org/TR/REC-html40" result-ns="" > <xsl:template match="/"> <html> <xsl:apply-templates/> </html> </xsl:template> </xsl:stylesheet> ...And this XML: <?xml version='1.0' standalone='yes'?> <!DOCTYPE foo [ <!ENTITY breakfast "Breakfast"> <!ENTITY cent "¢"> <!ELEMENT foo (SomeText)> <!ELEMENT SomeText (#PCDATA)> ]> <foo> <SomeText> Try Our 99¢ &breakfast; Special! </SomeText> </foo> ...I get the following output from LotusXSL: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> Try Our 99 Special! </HTML> And then if I change the stylesheet to use this (now invalid) namespace URI so that XT will parse it... xmlns:xsl="http://www.w3.org/XSL/Transform/1.0" ...I get the following result from XT: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> Try Our 99¢ Breakfast Special! </html> So my questions are... 1. If you declare an entity, shouldn't the XSL document have access to those entities? XT seems to think so, but LotusXSL differs. 2. Why the ¢ in the output from XT? 3. Are the parsers simply looking for specific URIs when they determine whether the namespace declarations are valid? Is this really necessary? 4. Where is the <!DOCTYPE> coming from in the output? -Mike XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|