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

Re: Problem with identity transform and Saxon

Subject: Re: Problem with identity transform and Saxon
From: Mukul Gandhi <gandhi.mukul@xxxxxxxxx>
Date: Sat, 6 Aug 2005 23:02:37 +0530
net.sf.saxon.value.value.getiterator
Hi Kenneth,
  I would write identity transform as
>        <xsl:template match="@*|node()">
>                <xsl:copy>
>                        <xsl:apply-templates select="@*|node()" />
>                </xsl:copy>
>        </xsl:template>

I think, the template match=/ is reduntant for a identity stylesheet.
This is superfluous code, so _I would not say this is a Saxon bug_.
Also you are using non standard node-set function which is causing
trouble.  This certainly does'nt seem a bug to me..

>        <xsl:template match="/">
>                <xsl:apply-templates select="exsl-common:node-set($rtf)" />
>        </xsl:template>

Regards,
Mukul

On 8/6/05, Kenneth Stephen <marvin.the.cynical.robot@xxxxxxxxx> wrote:
> Hi,
>
>    I have the following code :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet
>        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>        xmlns:exsl-common="http://exslt.org/common"
>        version="1.0">
>
>        <xsl:variable name="rtf" xml:space="preserve">
>                <a>
>                        <b />
>                </a>
>        </xsl:variable>
>
>        <xsl:template match="/">
>                <xsl:apply-templates select="exsl-common:node-set($rtf)" />
>        </xsl:template>
>
>        <xsl:template match="@*|node()">
>                <xsl:copy>
>                        <xsl:apply-templates select="@*|node()" />
>                </xsl:copy>
>        </xsl:template>
>
> </xsl:stylesheet>
>
> java net.sf.saxon.Transform <XSL filename> <XSL filename>
>
> produces the following :
>
> Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
> java.lang.StackOverflowError
>        at java.lang.Object.getClass(Native Method)
>        at
net.sf.saxon.value.SingletonNode.convertToJava(SingletonNode.java:192)
>        at
net.sf.saxon.functions.ExtensionFunctionCall.setupParams(ExtensionFunctionCal
l.ja
> va:330)
>        at
net.sf.saxon.functions.ExtensionFunctionCall.call(ExtensionFunctionCall.java:
211)
>        at
net.sf.saxon.functions.ExtensionFunctionCall.iterate(ExtensionFunctionCall.ja
va:1
> 11)
>        at net.sf.saxon.expr.ItemChecker.iterate(ItemChecker.java:83)
>        at net.sf.saxon.value.Closure.iterate(Closure.java:201)
>        at net.sf.saxon.value.Value.getIterator(Value.java:202)
>        at
net.sf.saxon.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail
(App
> lyTemplates.java:431)
>        at
net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:276)
>        at
net.sf.saxon.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail
(App
> lyTemplates.java:431)
> .
> .
> .
> .
>        at
net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:276)
> Exception in thread "main"
>
>    This is with Saxon 8.4. Any ideas on what I'm doing wrong?
>
> Thanks,
> Kenneth

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.