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

xsl:copy and Lotus XSL

Subject: xsl:copy and Lotus XSL
From: Bovone Stefano <Stefano.Bovone@xxxxxxxx>
Date: Wed, 6 Oct 1999 13:55:11 +0200
xslt lotus
I have the following XSL file:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0" 
                xmlns:lxslt="http://xsl.lotus.com/"
                xmlns:counter="MyCounter"
                extension-element-prefixes="counter">

<lxslt:component prefix="counter" elements="init incr" functions="read">
 <lxslt:script lang="javaclass" src="MyCounter"/>
</lxslt:component>

<xsl:template match="/">
<Batch>
 <counter:init name="pointer" value="0"/>
 <xsl:apply-templates select="//sender_address"/>
 <xsl:for-each select="//letter">
  <counter:incr name="pointer"/>
  <lettera>
   <xsl:apply-templates select="recipient_address"/>
   <xsl:apply-templates select="//common_text/node()"/>   
  </lettera>
 </xsl:for-each>    
</Batch>
</xsl:template>

<xsl:template match="sender_address">
 <xsl:copy>
  <xsl:apply-templates select="node()"/>
 </xsl:copy>
</xsl:template>

<xsl:template match="recipient_address">
 <xsl:copy>
  <xsl:apply-templates select="node()"/>
 </xsl:copy>
</xsl:template>


<xsl:template match="common_text/node()">
 <xsl:copy>
  <xsl:for-each select="@*"><xsl:copy/></xsl:for-each>
  <xsl:apply-templates/>
 </xsl:copy>
</xsl:template>

<xsl:template match="insert_structured_insert">
  <xsl:variable name="p_pl" select="@ref"/>
  <xsl:variable name="p_lt" select="counter:read('pointer')"/>
  <xsl:apply-templates 
    select="/letter[$p_lt]/structured_insert[@num=$p_pl]/node()"/>  
</xsl:template> 

<xsl:template match="insert_structured_header">
  <xsl:variable name="p_lt" select="counter:read('pointer')"/>
  <xsl:apply-templates 
    select="/letter[$p_lt]/structured_header/node()"/>  
</xsl:template> 

<xsl:template match="insert_structured_trailer">
  <xsl:variable name="p_lt" select="counter:read('pointer')"/>
  <xsl:apply-templates 
    select="/letter[$p_lt]/structured_trailer/node()"/>  
</xsl:template> 

<xsl:template match="node() | @*" priority="-1">
 <xsl:copy>
  <xsl:apply-templates select='@* | node()'/>
 </xsl:copy>    
</xsl:template> 

</xsl:stylesheet>

I'm using Lotus XSL 0_18_2 and MyConter is an external function (it's a
simple counter and it works fine).

When the processor matches  'insert_structured_trailer' or
'insert_structured_insert', I expect that the expression
/letter[$p_lt]/structured_trailer/node() is evaluated and then the rule
<xsl:template match="node() | @*" priority="-1"> is applied.

But I don't obtain this. I don't understand if I have made a mistake in the
stylesheet or it's a problem of the processor. The same stylesheet with the
processor 0_17_3 (XSLT of April) works how I expect.

Thanks.

Bye.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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-2013 All Rights Reserved.