Subject: [xsl] Integrating SAX filters produced streams with XSLT From: Mike Moran <mmoran@xxxxxxxxxxxxx> Date: Thu, 06 Sep 2001 17:24:50 +0100 |
With the advent of JAXP/TRAX, it is easy to give an XSLT stylesheet an XML document which is actually a result of SAX events. Using SAX2 filters it is also possible to convert some non-XML subpart of an XML document into SAX events which can also be fed to an XSLT stylesheet. All fine and good.
However, if you are using a stylesheet minimizing technique[1] for templating a website, say, which takes at least two input XML documents, one via stdin, and the other a result of opening a file using document(), then you have the problem that only one of these inputs can be a stream. All the other inputs (via document()) have to be saved in files prior to input, at least temporarily.
1. Make the `input document stream' a combination of N xml documents. For example:
<documentSet> <document id="foo"><foo>Blah</foo></document> <document id="bar"><bar>Blah</bar></document> </documentSet>
The XSLT stylesheet then uses a documentSet/document[@id='foo'] XPath match to set up $fooRoot, as opposed to doing document('foo'). I can see problems with this if the subdocuments require a DOCTYPE to be set (for default atributes for example). There are probably others.
2. Change the `file' URI that is given to document() so that it resolves to a SAX processed stream. I'm not sure how you would do this.
-- Mike
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] applying a xsl sheet to d, Jeni Tennison | Thread | RE: [xsl] Integrating SAX filters p, Michael Kay |
Re: [xsl] Trying to find a working , Tony Graham | Date | Re: [xsl] Trying to find a working , David Rosenborg |
Month |