[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
> the begining of my stylesheet: > > /<?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE xsl:stylesheet [ > <!ENTITY nbsp " "> > ]> > <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
|
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
|