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

Re: Is there a way to display entities callouts in bot

Subject: Re: Is there a way to display entities callouts in both IE and Mozilla?
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 09 Nov 2004 14:51:29 -0500
xsl declare doctype
Hi Betty,

At 11:07 AM 11/9/2004, you wrote:
I am trying to use entity calls (example &mdash;) from 1 xml source for
both IE and Mozilla. Currently the IE version works fine due to the entity
files being called out from the dtd. I am having issues with the Mozilla
version.  I can not get it to recognize the &mdash.  I have tried to
declare the entity in a stylesheet using:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE xsl:stylesheet [
      <!ENTITY mdash "&#151;">
]>

this did not work.
Am I missing something?

Yup: it's not the stylesheet that contains the entity that must be resolved, but the document. So your DOCTYPE declaration needs to be in the document.


Just copy the same code to the top of your document, changing "xsl:stylesheet" to the name of your document ("root") element. Unfortunately (this gets me all the time) you have to have this in your document because, unlike IE, Mozilla doesn't read the external DTD subset (the part referred to in the SYSTEM or PUBLIC identifier). You can get around this by having the entity declaration in an internal subset (the bracketed part of the DOCTYPE declaration).

You can perfectly well have both internal and external subsets, so your document could have

<!DOCTYPE document SYSTEM "../DTD/document.dtd [
      <!ENTITY mdash "&#151;">
]>
<document>...</document>

and it would work fine even though the mdash is declared twice.

Declaring it in the stylesheet doesn't work because the declaration is needed when the source document, not the stylesheet, is parsed.

Cheers,
Wendell


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================

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.