You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by "Matthew L. Avizinis" <ml...@gleim.com> on 2005/01/05 21:46:26 UTC

pipeDocument

Hello all,
I found the message below from 2003 and noticed that there wasn't a 
reply.  Has it become possible since he sent the message to write a 
'smart' pipeline?  Unless I am doing something wrong, it seems not.
thanks much,
Matthew L. Avizinis
Gleim Publications, Inc. <http://www.gleim.com>
------------------------------------------------------------------------

*
List: xalan-j-users <?l=xalan-j-users&r=1&w=2> Subject: Function 
pipeDocument From: Jim Maskus <jmaskus () collegenet ! com> 
<?a=105356020600001&r=1&w=2> Date: 2003-05-21 23:31:46 
<?l=xalan-j-users&r=1&w=2&b=200305> [Download message RAW 
<?l=xalan-j-users&m=105355991420550&q=raw>]
* The following example template executes a transformation pipeline 
using the pipeDocument function.
 <xsl:template match="/">
 <pipe:pipeDocument source="in/infile.xml" target="out/outfile.xml">
 <stylesheet href="start.xsl" />
 <stylesheet href="do_stuff.xsl" />
 <stylesheet href="end.xsl"/>
 </pipe:pipeDocument>
 </xsl:template>
 What I would like to do is create a smart pipeline that logically 
executes transformations.
<xsl:template match="/">
  <pipe:pipeDocument source="in/infile.xml" target="out/outfile.xml">
     <stylesheet href="start.xsl" />
     <stylesheet href="do_stuff.xsl" />
     <xsl:if test="descendant::message">
      <stylesheet href="do_message.xsl"/>
     </xsl:if>
     <stylesheet href="end.xsl"/>
  </pipe:pipeDocument>
 </xsl:template>
The second example ignores the xsl:test block and do_message.xsl is 
never executed. Is there any way to use pipeDocument to create a "smart" 
pipeline?? Jim