This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: How can I include my custom <!ENTITY ...> elements within my .xsl file and NOT cause the server-side XSL parser to choke?
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- 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 at microsoft dot com>
- Date: Fri, 12 May 2000 12:10:57 -0700
- Reply-To: xsl-list at mulberrytech dot com
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@ProdigyBiz.net]
> Sent: Friday, May 12, 2000 11:23 AM
> To: 'XSL-List@mulberrytech.com'
> 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 "©">
> <!ENTITY fill0 "<FONT face='Verdana,Arial,Helvetica,sans-serif'
> size='0'> </FONT>">
> <!ENTITY fill1 "<FONT face='Verdana,Arial,Helvetica,sans-serif'
> size='1'> </FONT>">
> <!ENTITY fill2 "<FONT face='Verdana,Arial,Helvetica,sans-serif'
> size='2'> </FONT>">
> <!ENTITY nbsp " ">
> ]>
> <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@prodigybiz.net *
> 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