Automating XML Document Chaining and Piplining

oXygen-7.0.0 (eclipse-3.1.2 plugin) Transforming a WordML document into Docbook involves "chaining" the XML document through a "pipeline" of XSL stylesheets. There are four XSL <http://www.w3.org/Style/XSL> stylesheets involved: wordml-normalise.xsl, wordml-sections.xsl, wordml-blocks.xsl and wordml-final.xsl. Example usage: xsltproc -o normalised.xml wordml-normalise.xsl my-word.xml xsltproc -o sections.xml wordml-sections.xsl normalised.xml xsltproc -o blocks.xml wordml-blocks.xsl sections.xml xsltproc -o my-docbook.xml wordml-final.xsl blocks.xml How does one configure oXygen to automate this process ??? Ray

Ray Miller wrote:
oXygen-7.0.0 (eclipse-3.1.2 plugin)
Transforming a WordML document into Docbook involves "chaining" the XML document through a "pipeline" of XSL stylesheets. There are four XSL <http://www.w3.org/Style/XSL> stylesheets involved: |wordml-normalise.xsl|, |wordml-sections.xsl|, |wordml-blocks.xsl| and |wordml-final.xsl|.
Example usage:
xsltproc -o normalised.xml wordml-normalise.xsl my-word.xml xsltproc -o sections.xml wordml-sections.xsl normalised.xml xsltproc -o blocks.xml wordml-blocks.xsl sections.xml xsltproc -o my-docbook.xml wordml-final.xsl blocks.xml
How does one configure oXygen to automate this process ???
Ray
Sounds like something beyond the scope of an editor/debugger. Depending on your needs, Cocoon might be helpful: http://cocoon.apache.org Lars

Hello Ray, You can run all the transformations with one mouse click by cascading the stylesheets in the transformation scenario. In the scenario edit dialog put the URL of wordml-normalise.xsl in the XSL URL combo box, click on the Additional XSLT stylesheets button and in the dialog enter the URLs of the next stylesheets of the cascade using the Add button: wordml-sections.xsl, wordml-blocks.xsl, wordml-final.xsl. You can add at the end of the list also html/docbook.xsl or fo/docbook.xsl or other DocBook stylesheet to be applied to what you call my-docbook.xml, that is the result of the WordML to DocBook stylesheets. If you use fo/docbook.xsl you can also enable FO processing in the FO Processor tab of the scenario edit dialog to generate the PDF result with the same transformation scenario, at the end of the XSLT cascade. Best regards, Sorin Ray Miller wrote:
oXygen-7.0.0 (eclipse-3.1.2 plugin)
Transforming a WordML document into Docbook involves "chaining" the XML document through a "pipeline" of XSL stylesheets. There are four XSL <http://www.w3.org/Style/XSL> stylesheets involved: |wordml-normalise.xsl|, |wordml-sections.xsl|, |wordml-blocks.xsl| and |wordml-final.xsl|.
Example usage:
xsltproc -o normalised.xml wordml-normalise.xsl my-word.xml
xsltproc -o sections.xml wordml-sections.xsl normalised.xml
xsltproc -o blocks.xml wordml-blocks.xsl sections.xml
xsltproc -o my-docbook.xml wordml-final.xsl blocks.xml
How does one configure oXygen to automate this process ???
Ray
------------------------------------------------------------------------
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Ray, In addition to the native feature in oXygen described by Sorin, and full-fledged pipelining frameworks such as Cocoon and Ant, there are at least two other ways you can do it, both of which should work either inside or outside oXygen. The first is to wire your pipeline up into a shell script or batch file, and invoke it in oXygen as an external tool. You would probably want to set this up in Preferences to accept a paramaterized input file. Another way is to use a feature for pipelining provided by an XSLT engine. For example, Saxon 6.5.5 has an extension attribute saxon:next-in-chain which you can place on an xsl:output setting in your stylesheet. (Google for more details.) You could thus modify the stylesheets each to call the next in the chain. (If you don't want to edit the stylesheets themselves you could import them into "shell" stylesheets which you could so edit.) As long as you still use Saxon, this would also work fine outside oXygen. Note that these different methods all pass the result document to the next step in the process in different ways. A brute-force batch process, or Ant, for example, will write an actual XML file (and then maybe clean it up for you). Other methods will pass a sequence of SAX (parser) events, which is not so transparent for debugging but is rather more efficient (the disk doesn't have to be written to or read), or even entire tree objects, which is more efficient still. Saxon, IIRC, passes SAX events. Sorin or someone will have to tell you what oXygen does when it manages this process. Pipelining is definitely a taste of things to come. In XSLT 2.0, pipelining can be done entirely within a single stylesheet. Good luck, Wendell At 03:22 AM 3/22/2006, Sorin Ristache wrote:
Hello Ray,
You can run all the transformations with one mouse click by cascading the stylesheets in the transformation scenario. In the scenario edit dialog put the URL of wordml-normalise.xsl in the XSL URL combo box, click on the Additional XSLT stylesheets button and in the dialog enter the URLs of the next stylesheets of the cascade using the Add button: wordml-sections.xsl, wordml-blocks.xsl, wordml-final.xsl. You can add at the end of the list also html/docbook.xsl or fo/docbook.xsl or other DocBook stylesheet to be applied to what you call my-docbook.xml, that is the result of the WordML to DocBook stylesheets. If you use fo/docbook.xsl you can also enable FO processing in the FO Processor tab of the scenario edit dialog to generate the PDF result with the same transformation scenario, at the end of the XSLT cascade.
Best regards, Sorin
Ray Miller wrote:
oXygen-7.0.0 (eclipse-3.1.2 plugin) Transforming a WordML document into Docbook involves "chaining" the XML document through a "pipeline" of XSL stylesheets. There are four XSL <http://www.w3.org/Style/XSL> stylesheets involved: |wordml-normalise.xsl|, |wordml-sections.xsl|, |wordml-blocks.xsl| and |wordml-final.xsl|. Example usage: xsltproc -o normalised.xml wordml-normalise.xsl my-word.xml xsltproc -o sections.xml wordml-sections.xsl normalised.xml xsltproc -o blocks.xml wordml-blocks.xsl sections.xml xsltproc -o my-docbook.xml wordml-final.xsl blocks.xml
How does one configure oXygen to automate this process ???
Ray
------------------------------------------------------------------------ _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
====================================================================== Wendell Piez mailto:wapiez@mulberrytech.com Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
participants (4)
-
Lars Huttar
-
Ray Miller
-
Sorin Ristache
-
Wendell Piez