Subject: Re: Producing multiple result files (and other desired features) From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Mon, 11 Jan 1999 17:26:15 -0500 |
At 99/01/09 16:44 +0800, James Tauber wrote: >Is it envisaged (or even possible now) to have a stylesheet that produces >multiple result files? >This would be immensely useful if one wanted to publish a single XML >document as multiple web pages. I too need this, for my training materials, and hope to see it in the final version. >Of course, XSL can produce a single file using FOs that has multiple pages, >but, for arbitrary result vocabularies, you'd want to be able to produce >multiple result files. > >Any ideas? What I've done is written a DSSSL post-processor that recognizes elements from my own namespace that I intersperse into the result tree. My XSL output is then a collection of HTML slides "packaged" in a big instance with my own elements as envelopes for each desired frame. This post-process also gives me other features I hope to see: [1] <xsl:entity-ref name="xxx"/> - emit a reference to the named entity <xsl:entity-ref name="xxx" decl="yyy"/> - emit a reference to the named entity and declare its value in the result instance internal declaration subset [2] <xsl:error> - add a fatal message to the error log [3] <xsl:warning> - add a non-fatal message to the error log [4] <xsl:info> - add an informational message to the error log For each envelope, I have attributes specifying either the public or system id that JADE is to emit in a document type declaration for each file split from the full set. One caveat ... providing the XML declaration to JADE, and not providing a DTD for validation (since I can't put a document type declaration in my result tree), my DSSSL script has to have foreknowledge of empty elements. Without this foreknowledge, the tag "<br/>" (in JADE's SGML environment for XML) isn't an empty element, but an element with both a start and end tag, minimized using NET. Until I added special casing for known empty elements, my empty elements were expanded with end tags. So, I'd also like to see the ability in XSL to also specify the document type of the emitted result instance so I could then provide a DTD to any post-processor. [5] <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns:p="http://www.CraneSoftwrights.com/NS/page" xmlns="http://www.w3.org/TR/REC-html40" result-ns="p" result-public-id="+//ISBN 1-894049::CSL::Test//DTD Test//EN" result-system-id="test.dtd"> In my own page envelope element, I can specify system-id= and public-id= attributes for each of the individual pages. The document element name I put into the emitted file is the child of the envelop element, and it is an error if there is more than one child of the envelope element. So, I suppose an XSL-styled version of this element would read something along the lines of: [6] <xsl:entity system-id="outfile.xml" doctype-pubid-literal="+//ISBN 1-894049::CSL::Test//DOCUMENT Test//EN" doctype-system-literal="test.xml"> I hope this helps. ......... Ken -- G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Training: http://www.CraneSoftwrights.com/s/schedule.htm Resources: http://www.CraneSoftwrights.com/s/resources.htm Shareware: http://www.CraneSoftwrights.com/s/shareware.htm Next XSL Training (see training link): WWW8 - 1999-05-11 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Producing multiple result files, Tyler Baker | Thread | Re: Producing multiple result files, James Tauber |
Re: How to match on namespace prefi, Chris Lilley | Date | Re: Standard API to XSL processors, Paul Prescod |
Month |