[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Pipelining 2 stylesheets

Subject: RE: Pipelining 2 stylesheets
From: Emmanuel Bégué <eb@xxxxxxxxxx>
Date: Thu, 27 Aug 2009 18:51:03 +0200
RE:  Pipelining 2 stylesheets
Hello,

Using Saxon you can encapsulate the first stylesheet and
redirect the output to be processed by the second one; you
only need to write this stylesheet:

  <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:saxon="http://saxon.sf.net/"
    version="2.0">
    <xsl:include href="opendoc2xhtml.xsl"/>
    <xsl:output saxon:next-in-chain="xhtml2epub.xsl"/>
   </xsl:stylesheet>

and run your transformations against it, without any modification
to either opendoc2xhtml or xhtml2epub.

Regards,
EB

> -----Original Message-----
> From: Martynas Jusevicius [mailto:martynas.jusevicius@xxxxxxxxx]
> Sent: Thursday, August 27, 2009 5:48 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Pipelining 2 stylesheets
>
>
> Hey list,
>
> I want to pipeline 2 templates opendoc2xhtml.xsl (from OpenOffice) and
> xhtml2epub.xsl (my own) into a single opendoc2epub, that is, to pass
> the result of the first one into the second one.
> As I understand, the common technique is to get the first result into
> a variable, and then run the second transformation on it (assuming
> XSLT 2).
>
> But I have a problem with including the stylesheets. If i try to
> xsl:include both templates and define a template for the root node, I
> get a conflict, because opendoc2xhtml also has one. And I don't want
> to add modes or anything to it because it comes from an external
> source, but I still need to override it somehow to put the result into
> a variable in the first place.
> Is it where xsl:import is used? I tried importing opendoc2xhtml.xsl as
> well and calling xsl:apply-imports from the root template, but then
> only root children were processed.
>
> Martynas
> semantic-web.dk

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.