Subject: How to use ENTITY declarations and references? From: Mike Brown <mbrown@xxxxxxxxxxxxx> Date: Tue, 4 May 1999 17:18:25 -0600 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Can a match attribute use a non, Kay Michael | Thread | Re: How to use ENTITY declarations , David Carlisle |
Re: How do I skip an element?, Sara Mitchell | Date | Re: idref(), G. Ken Holman |
Month |