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

How to use ENTITY declarations and references?

Subject: How to use ENTITY declarations and references?
From: Mike Brown <mbrown@xxxxxxxxxxxxx>
Date: Tue, 4 May 1999 17:18:25 -0600
how to use entity
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 "&#162;">
<!ELEMENT foo (SomeText)>
<!ELEMENT SomeText (#PCDATA)>
]>
<foo>
<SomeText>
Try Our 99&cent; &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&cent; 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 &cent; 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

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.