RE: XSLT and Text Processing Languages

Subject: RE: XSLT and Text Processing Languages
From: Matthew Bentley <>
Date: Thu, 7 Sep 2000 12:03:32 +1200
>2) XSLT does not allow you to output anything to the document prolog
>aside from the doctype statement, and our XML processes expect entity
>declarations for the graphics to be defined there. 

I am using XSLT for just that very purpose - and I test the starting element
to find out which doctype I want to insert - all you have to do is output

<xsl:template match="/">
		<xsl:when test="bva.grp">
disable-output-escaping="yes"><![CDATA[<!DOCTYPE VALUE-ADD.GROUP PUBLIC
"-//Brooker's//DTD Brooker's Legislation Value-Add Group//EN">]]></xsl:text>
		<xsl:when test="act">
disable-output-escaping="yes"><![CDATA[<!DOCTYPE ACT PUBLIC
"-//Brooker's//DTD Brooker's Act//EN">]]></xsl:text>
		... etc

	<xsl:apply-templates />

And obviously you can put entity references inside the CDATA section as
well, although in this particular case I haven't needed to.


P.S. XSLT can be fast - in my experience the main factor slowing down
performance is the amount of memory needed to process a large document,
which means that heaps of memory gets swapped to the hard drive on a modern
OS (E.g. on a 79MB XML file I was processing, Saxon made the win95 swap file
grow by 350MB). Theoretically then, if you were able to provide a machine
with an extensive amount of ram (say, 512MB), you could probably process the
document reasonably fast.
Warning: This email, including any attachments, 
is for the use of the intended recipient(s) only.
Republication and redissemination, 
including posting to news groups or web pages, 
is strictly prohibited without the express prior consent of Brooker's Limited.

 XSL-List info and archive:

Current Thread