Saxon 9.5.0.2 Internal error

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Saxon 9.5.0.2 Internal error

Toshihiko Makita
Hi list,

I've benn using Saxon 9.1B in DITA Open Toolkit.
Today I changed it to Saxon PE 9.5.0.2J and got the following error.

[xslt] Loading stylesheet
D:\DITA-OT1.7.5-bil\plugins\co.xxxxx.print_pdf\xsl\dita2fo_cover_shell.xsl
[xslt] *** Internal Saxon error: local variable encountered whose
binding has been deleted
[xslt] Variable name: href
[xslt] Line number of reference: 81 in
file:/D:/DITA-OT1.7.5-bil/plugins/co.xxxxx.print_pdf/xsl/dita2fo_util.xsl
[xslt] Line number of declaration: 75 in
file:/D:/DITA-OT1.7.5-bil/plugins/co.xxxxx.print_pdf/xsl/dita2fo_util.xsl
[xslt] DECLARATION:
[xslt] <let variable="href" as="xs:string" slot="-999">
[xslt] <be>
[xslt] <functionCall name="string">
[xslt] <slash>
[xslt] <variableReference name="prmTopicRef" slot="0"/>
[xslt] <axis name="attribute" nodeTest="attribute(Q{}href)"/>
[xslt] </slash>
[xslt] </functionCall>
[xslt] </be>
[xslt] <return>
[xslt] <let variable="topicRefCount" as="xs:integer" slot="-999">
[xslt] <be>
[xslt] <convertUntyped to="xs:integer">
[xslt] <cast as="Q{http://www.w3.org/2001/XMLSchema}untypedAtomic">
[xslt] <xslNumber level="any"
[xslt] count="*[contains(@class,' map/topicref ')][string(@href)=$href]"
[xslt] from="*[contains(@class,' map/map ')]">
[xslt] <select>
[xslt] <variableReference name="prmTopicRef" slot="0"/>
[xslt] </select>
[xslt] <format>
[xslt] <literal value="1" type="xs:string"/>
[xslt] </format>
[xslt] </xslNumber>
[xslt] </cast>
[xslt] </convertUntyped>
[xslt] </be>
[xslt] <return>
[xslt] <variableReference name="topicRefCount" slot="-999"/>
[xslt] </return>
[xslt] </let>
[xslt] </return>
[xslt] </let>
[xslt] Failed to process
D:\My_Documents\XML2011\xxxxx\testdata\20130612-chapter\GUID-700E47C3-5D10-40C7-AA4D-32D1830FF84F.20130524204036478\1\en-US\workset\temp\GUID-35E0AC17-E095-46C0-AC45-62785E3352CA_CONVERTED.xml

The relevant code is as follows:

<!--
function: topicref count template
param: prmTopicRef
return: topicref count that have same @href
note: none
-->
<xsl:function name="ahf:countTopicRef" as="xs:integer">
<xsl:param name="prmTopicRef" as="element()"/>

<xsl:variable name="href" select="string($prmTopicRef/@href)"
as="xs:string"/>
<xsl:variable name="topicRefCount" as="xs:integer">
<xsl:number select="$prmTopicRef"
level="any"
count="*[contains(@class,' map/topicref ')][string(@href)=$href]"
from="*[contains(@class,' map/map ')]"
format="1"/>
</xsl:variable>
<xsl:sequence select="$topicRefCount"/>
</xsl:function>

Are there any workarounds?

Regards,

--
/*--------------------------------------------------
 Toshihiko Makita
 Development Group. Antenna House, Inc. Ina Branch
 E-Mail [hidden email]
 8077-1 Horikita Minamiminowa Vil. Kamiina Co.
 Nagano Pref. 399-4511 Japan
 Tel +81-265-76-9300 Fax +81-265-78-1668
 Web site:
 http://www.antenna.co.jp/
 http://www.antennahouse.com/
 --------------------------------------------------*/


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Saxon 9.5.0.2 Internal error

Michael Kay
Thanks for reporting it. I've reproduced the error, so fixing it shouldn't be difficult. It's to do with the variable reference $href in the count pattern. As a workaround, make sure this is not the only reference to variable $href, for example wrap the call of xsl:number inside a call of <xsl:if test="$href">.

Michael Kay
Saxonica


On 17 Jun 2013, at 07:24, Toshihiko Makita wrote:

> <xsl:function name="ahf:countTopicRef" as="xs:integer">
> <xsl:param name="prmTopicRef" as="element()"/>
>
> <xsl:variable name="href" select="string($prmTopicRef/@href)"
> as="xs:string"/>
> <xsl:variable name="topicRefCount" as="xs:integer">
> <xsl:number select="$prmTopicRef"
> level="any"
> count="*[contains(@class,' map/topicref ')][string(@href)=$href]"
> from="*[contains(@class,' map/map ')]"
> format="1"/>
> </xsl:variable>
> <xsl:sequence select="$topicRefCount"/>
> </xsl:function>


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Saxon 9.5.0.2 Internal error

Toshihiko Makita
Dr. Kay,

Thank you for your reply.

> I've reproduced the error, so fixing it shouldn't be difficult.

I will wait next maintenance release.

Regards,


(2013/06/17 16:34), Michael Kay wrote:

> Thanks for reporting it. I've reproduced the error, so fixing it shouldn't be difficult. It's to do with the variable reference $href in the count pattern. As a workaround, make sure this is not the only reference to variable $href, for example wrap the call of xsl:number inside a call of <xsl:if test="$href">.
>
> Michael Kay
> Saxonica
>
>
> On 17 Jun 2013, at 07:24, Toshihiko Makita wrote:
>
>> <xsl:function name="ahf:countTopicRef" as="xs:integer">
>> <xsl:param name="prmTopicRef" as="element()"/>
>>
>> <xsl:variable name="href" select="string($prmTopicRef/@href)"
>> as="xs:string"/>
>> <xsl:variable name="topicRefCount" as="xs:integer">
>> <xsl:number select="$prmTopicRef"
>> level="any"
>> count="*[contains(@class,' map/topicref ')][string(@href)=$href]"
>> from="*[contains(@class,' map/map ')]"
>> format="1"/>
>> </xsl:variable>
>> <xsl:sequence select="$topicRefCount"/>
>> </xsl:function>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>

--
/*--------------------------------------------------
  Toshihiko Makita
  Development Group. Antenna House, Inc. Ina Branch
  E-Mail [hidden email]
  8077-1 Horikita Minamiminowa Vil. Kamiina Co.
  Nagano Pref. 399-4511 Japan
  Tel +81-265-76-9300 Fax +81-265-78-1668
  Web site:
  http://www.antenna.co.jp/
  http://www.antennahouse.com/
  --------------------------------------------------*/


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Saxon 9.5.0.2 Internal error

Michael Kay
For tracking purposes, the bug is logged here:

https://saxonica.plan.io/issues/1811

Michael Kay
Saxonica

On 17 Jun 2013, at 09:30, Toshihiko Makita wrote:

> Dr. Kay,
>
> Thank you for your reply.
>
>> I've reproduced the error, so fixing it shouldn't be difficult.
>
> I will wait next maintenance release.
>
> Regards,
>
>
> (2013/06/17 16:34), Michael Kay wrote:
>> Thanks for reporting it. I've reproduced the error, so fixing it shouldn't be difficult. It's to do with the variable reference $href in the count pattern. As a workaround, make sure this is not the only reference to variable $href, for example wrap the call of xsl:number inside a call of <xsl:if test="$href">.
>>
>> Michael Kay
>> Saxonica
>>
>>
>> On 17 Jun 2013, at 07:24, Toshihiko Makita wrote:
>>
>>> <xsl:function name="ahf:countTopicRef" as="xs:integer">
>>> <xsl:param name="prmTopicRef" as="element()"/>
>>>
>>> <xsl:variable name="href" select="string($prmTopicRef/@href)"
>>> as="xs:string"/>
>>> <xsl:variable name="topicRefCount" as="xs:integer">
>>> <xsl:number select="$prmTopicRef"
>>> level="any"
>>> count="*[contains(@class,' map/topicref ')][string(@href)=$href]"
>>> from="*[contains(@class,' map/map ')]"
>>> format="1"/>
>>> </xsl:variable>
>>> <xsl:sequence select="$topicRefCount"/>
>>> </xsl:function>
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Windows:
>>
>> Build for Windows Store.
>>
>> http://p.sf.net/sfu/windows-dev2dev
>> _______________________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>>
>
> --
> /*--------------------------------------------------
>  Toshihiko Makita
>  Development Group. Antenna House, Inc. Ina Branch
>  E-Mail [hidden email]
>  8077-1 Horikita Minamiminowa Vil. Kamiina Co.
>  Nagano Pref. 399-4511 Japan
>  Tel +81-265-76-9300 Fax +81-265-78-1668
>  Web site:
>  http://www.antenna.co.jp/
>  http://www.antennahouse.com/
>  --------------------------------------------------*/
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help 


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help