Subject: Re: XSLT and Text Processing Languages From: "Rick Geimer" <Rick.Geimer@xxxxxxx> Date: Thu, 07 Sep 2000 10:07:45 -0700 |
Matthew, I'll have to play around with your CDATA hack...it looks promising, but it is still a hack for something that should be included in the XSLT data model. Also, it doesn't solve all my problems...how do I find out what the notation type is of an entity? Sure, I could try to read the extension from the URI, but what if it points to a Macintosh file without an extension...or what if it is a TIFF file with a .tif extension, but the original notation type was tiff.uncomp, meaning uncompressed TIFF? XSLT in its current form doesn't address these issues. Some would argue that entities and notations are SGML relics that should go away, but they are the only standard way to address this kind of information in XML 1.0. If a simple form of XLINK had been incorportated into XML 1.0, we probably wouldn't be having this argument, but alas it was not. Rick Geimer National Semiconductor rick.geimer@xxxxxxx Matthew Bentley wrote: > > >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 > CDATA: > > <!-- MATCH ROOT NODE, GENERATE DOCTYPE BASED ON STARTING ELEMENT: --> > <xsl:template match="/"> > <xsl:choose> > <xsl:when test="bva.grp"> > <xsl:text > disable-output-escaping="yes"><![CDATA[<!DOCTYPE VALUE-ADD.GROUP PUBLIC > "-//Brooker's//DTD Brooker's Legislation Value-Add Group//EN">]]></xsl:text> > </xsl:when> > <xsl:when test="act"> > <xsl:text > disable-output-escaping="yes"><![CDATA[<!DOCTYPE ACT PUBLIC > "-//Brooker's//DTD Brooker's Act//EN">]]></xsl:text> > </xsl:when> > ... etc > > </xsl:choose> > <xsl:apply-templates /> > </xsl:template> > > And obviously you can put entity references inside the CDATA section as > well, although in this particular case I haven't needed to. > > Matt > > 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: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: XSLT and Text Processing Langua, Matthew Bentley | Thread | Re: XSLT and Text Processing Langua, Mike Brown |
Re: XSLT and Text Processing Langua, Rick Geimer | Date | How to output a subset of preceedin, Steve Carton |
Month |