Hi Michael, 

Thanks for your reply. 

I'll try to reproduce the bug out of the global architecture (xproc calabash, multiple xslt etc.) of our dev and run it with -t option.
I don't have the time today but I'll do it as soon as I can.

By the way I'm running Saxon-PE

Best regards,

2014-02-20 19:06 GMT+01:00 Michael Kay <mike@saxonica.com>:
It's certainly a bug, but whether it's a new bug I don't know.

I haven't been able to reproduce it. Since it's a dynamic error I really need a complete stylesheet and source document to replicate the conditions. It would also be useful to know more precisely which Saxon build you are using: please show the output when running with the -t option, or the result of doing

java net.sf.saxon.Version

on the command line.

Michael Kay

On 20 Feb 2014, at 16:43, RICAUD-DUSSARGET Matthieu <matthieu.ricaud@igs-cp.fr> wrote:

<xsl:function name="ecf2ncx:get-num-toc" as="xs:string?">
<xsl:param name="e" as="element()"/>
<xsl:variable name="name" select="local-name($e)"/>
<!-- Renumérotation à partir d'une entrée hiérarchiquement plus importante -->
<xsl:variable name="id" select="generate-id($e/parent::*)"/>
<xsl:when test="$e/@toc-addnum='true' or $e/@toc-addnum='single'">
<xsl:number level="single" select="$e" count="*[generate-id(parent::*)=$id and local-name(.)=$name and @toc-addnum=$e/@toc-addnum]"
<!--BUG SAXON ? : on aurait pu écrire count="*[generate-id(parent::*)=$id][local-name(.)=$name][@toc-addnum=$e/@toc-addnum]" mais cela génère un bogue saxon-->
<xsl:when test="$e/@toc-addnum='any'">
<!--@toc-addnum-format possibles sont "1", "01", "a", "A", "i", "I" (idem xsl:number/@format).-->
<xsl:number level="any" select="$e" count="*[ local-name() = $name and @toc-addnum = $e/@toc-addnum ]"

Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
saxon-help mailing list archived at http://saxon.markmail.org/

Matthieu Ricaud-Dussarget
IGS-CP - Développeur XML
05 45 37 09 49