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

RE: xerces2 Element type "xsl:stylesheet" must be decl

Subject: RE: xerces2 Element type "xsl:stylesheet" must be declared
From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx>
Date: Tue, 6 Apr 2004 08:38:02 +0100
referenced entity must be declared
> the begining of my stylesheet:
> 
> /<?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE xsl:stylesheet [
>     <!ENTITY nbsp "&#160;">
> ]>
> <xsl:stylesheet
>         version="1.0"
>         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>         
> xmlns:localization="xalan://com.neomalogic.gtp.common.localiza
> tion.Localization"
>         exclude-result-prefixes="localization">
> 
>     <xsl:output method="html" indent="yes" />/
>   .........


There's no need to recreate the html entity 'nbsp' in your stylesheet
and map it to the character reference &_#160; - just use the reference
directly.

I would suggest removing the doctype from your stylesheet and then do a
global replace of &_nbsp; to &_#160; - you will achieve the same result
but won't have to deal with the forced validation that specifying a DTD
brings.

The entity &_nbsp; is a html entity and as such is only meaningful to a
html renderer.  It means nothing to an xml parser which is why you have
to map the entity to something the parser does understand. The numerical
character reference &_#160; is a unicode codepoint and maps to a
specific character (a non-breaking-space) and can be used directly in
your stylesheet (like any character reference) and so by mapping an
entity to it your are just creating an unnecessary 'extra step' for the
parser.

(I've used underscores '_' here to ensure the references appear as
references (and not what they resolve to) you will of course want to
remove them).

cheers
andrew

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.