[xslt] Bug with multiple documents output



 Hello,

 I just found a strange bug affecting multiple document genration with
<xsl:document/>
 I get a bus error on my Solaris box, so not even a core dump to
backtrace the problem.

The template matching "document" works when using :
<xsl:copy-of select="$doc"/>
but not with:
<xsl:copy-of select="@*|node()"/>

 You'll find the stylesheet and a source doc attached.

 	Fabrice
-- 
Fabrice Desré - France Telecom R&D/DTL/TAL
Tel: +(33) 2 96 05 31 43
Fax: +(33) 2 96 05 39 45
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">

<xsl:output method="xml"/>

<xsl:template match="document">
  <xsl:variable name="doc">
	  <xsl:copy-of select="@*|node()"/>
  </xsl:variable>
  <xsl:document href="{@name}" method="xml">
	  <!-- <xsl:copy-of select="$doc"/> -->
	  <xsl:copy-of select="@*|node()"/>
  </xsl:document>
</xsl:template>


</xsl:stylesheet>
<?xml version="1.0" ?>
<docs>
<document name="doc1">
<first>Document</first>
</document>
<document name="doc2">
<second>Document</second>
</document>
</docs>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]