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

RE: How can I include my custom <!ENTITY ...> elements withi

Subject: RE: How can I include my custom <!ENTITY ...> elements within my .xsl file and NOT cause the server-side XSL parser to choke?
From: Jonathan Marsh <jmarsh@xxxxxxxxxxxxx>
Date: Fri, 12 May 2000 12:10:57 -0700
xml custom entities
MSXML is a validating parser by default.  You can turn this off by setting
xsldoc.validateOnParse=false.  When browsing XML files in IE5,
validationOnParse=false.

Or you can create a full content model for the stylesheet document so that
it passes validation on the server - but that's a big project.

 - Jonathan Marsh
   Microsoft

> -----Original Message-----
> From: Kirk Mahoney [mailto:kirkmahoney@xxxxxxxxxxxxxx]
> Sent: Friday, May 12, 2000 11:23 AM
> To: 'XSL-List@xxxxxxxxxxxxxxxx'
> Subject: How can I include my custom <!ENTITY ...> elements within my
> .xsl file and NOT cause the server-side XSL parser to choke?
> 
> 
> I have been successfully using a .xsl file to view a .xml file in IE5.
> 
> Now, I am trying to use essentially that same .xsl file / 
> .xml file pair but
> have the transformation to HTML occur at the server side 
> instead of by IE5.
> 
> My .xsl file that works fine with IE5 doing the 
> transformation contains this
> as its first few lines:
> ----------
> <!-- My .xsl file -->
> <!DOCTYPE xsl:stylesheet [
> 	<!ENTITY copy  "&#169;">
> 	<!ENTITY fill0 "<FONT face='Verdana,Arial,Helvetica,sans-serif'
> size='0'>&#160;</FONT>">
> 	<!ENTITY fill1 "<FONT face='Verdana,Arial,Helvetica,sans-serif'
> size='1'>&#160;</FONT>">
> 	<!ENTITY fill2 "<FONT face='Verdana,Arial,Helvetica,sans-serif'
> size='2'>&#160;</FONT>">
> 	<!ENTITY nbsp  "&#160;">
> 	]>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"
> xmlns:html="http://www.w3.org/TR/REC-html40">
> 	<xsl:template match="/">
> 		...
> ----------
> 
> However, when I try to use the above .xsl file with server-side
> transformation, I get this parser-error message: "The element
> 'xsl:stylesheet' is used but not declared in the DTD/Schema."
> 
> After I removed the <!DOCTYPE xsl:stylesheet [ ... ]> element from the
> prolog of the above .xsl file and replaced all of my custom 
> entities with
> "raw" code, such that the .xsl file began like this:
> ----------
> <!-- My .xsl file -->
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"
> xmlns:html="http://www.w3.org/TR/REC-html40">
> 	<xsl:template match="/">
> 		...
> ----------
> I got _no_ error message with server-side transformation.
> 
> This difference in behavior suggests to me that 
> Microsoft.XMLDOM, on the
> server side, chokes with a <!DOCTYPE xsl:stylesheet [ ... ]> 
> element in the
> prolog of the .xsl file.
> 
> My question is: How can I include my custom <!ENTITY ...> 
> elements within my
> .xsl file and NOT cause the server-side XSL parser to choke?
> 
> Kirk Mahoney, Ph.D. * Prodigy Biz * kirkmahoney@xxxxxxxxxxxxxx *
> 281-276-7995
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 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.