Quantcast

Circular dependency among global variables: {variable-name} depends on its own value

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Circular dependency among global variables: {variable-name} depends on its own value

Вячеслав Седов
hi,

got error from subject - "Circular dependency among global variables:
{variable-name} depends on its own value"

two strange points:

1. got this error only when execute XSLT step-by-step in OxygenXML
debugger - error not reproduced on whole run.

2. {variable-name}  not depend from any other variable at all


environment:

Saxon 9.5.1.5 (any - EE, PE, HE) in
<oXygen/> XML Editor 16.0, build 2014060420 (Linux 64-bit)

got minimal test-case here {variable-name} is $ex-id

XML: <r/>
XSLT:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
    exclude-result-prefixes="xs xd"
    version="2.0">
    <xsl:variable name="ex-id" select="(//external_id/@id/string())[.]"/>
    <xsl:variable name="id-prefix" select="('g'[$ex-id], 'm')[1]"/>
    <xsl:variable name="id" select="($ex-id, /*/@id)[1]"/>
        <xsl:template match="/*">
        <r>
            <xsl:attribute name="xml:id" select="concat($id-prefix, 'd', $id)"/>
        </r>
    </xsl:template>
</xsl:stylesheet>

so when i use step-by-step debugging at xsl:attribute i got "XTDE0640:
Circular dependency among global variables: ex-id depends on its own
value"

any suggestions?

with best wishes,
Slav

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
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
|  
Report Content as Inappropriate

Re: Circular dependency among global variables: {variable-name} depends on its own value

Michael Kay
Two suggestions:

(a) could you supply your source document please (or any source document that reproduces the problem)

(b) could you try running outside oXygen, but with the -T option? This activates a TraceListener, which is similar to what the oXygen debugger does; activating a TraceListener causes global variables to be evaluated eagerly rather than lazily.

Michael Kay
Saxonica
[hidden email]
+44 (0118) 946 5893



On 30 Jun 2014, at 11:43, Вячеслав Седов <[hidden email]> wrote:

> hi,
>
> got error from subject - "Circular dependency among global variables:
> {variable-name} depends on its own value"
>
> two strange points:
>
> 1. got this error only when execute XSLT step-by-step in OxygenXML
> debugger - error not reproduced on whole run.
>
> 2. {variable-name}  not depend from any other variable at all
>
>
> environment:
>
> Saxon 9.5.1.5 (any - EE, PE, HE) in
> <oXygen/> XML Editor 16.0, build 2014060420 (Linux 64-bit)
>
> got minimal test-case here {variable-name} is $ex-id
>
> XML: <r/>
> XSLT:
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>    xmlns:xs="http://www.w3.org/2001/XMLSchema"
>    xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
>    exclude-result-prefixes="xs xd"
>    version="2.0">
>    <xsl:variable name="ex-id" select="(//external_id/@id/string())[.]"/>
>    <xsl:variable name="id-prefix" select="('g'[$ex-id], 'm')[1]"/>
>    <xsl:variable name="id" select="($ex-id, /*/@id)[1]"/>
>        <xsl:template match="/*">
>        <r>
>            <xsl:attribute name="xml:id" select="concat($id-prefix, 'd', $id)"/>
>        </r>
>    </xsl:template>
> </xsl:stylesheet>
>
> so when i use step-by-step debugging at xsl:attribute i got "XTDE0640:
> Circular dependency among global variables: ex-id depends on its own
> value"
>
> any suggestions?
>
> with best wishes,
> Slav
>
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help 


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
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
|  
Report Content as Inappropriate

Re: Circular dependency among global variables: {variable-name} depends on its own value

Вячеслав Седов
source doc is any - in my case it even empty tag <r/>

about option -T i`ll try investigation some time later

with best wishes,
Slav

2014-06-30 14:59 GMT+04:00 Michael Kay <[hidden email]>:

> Two suggestions:
>
> (a) could you supply your source document please (or any source document that reproduces the problem)
>
> (b) could you try running outside oXygen, but with the -T option? This activates a TraceListener, which is similar to what the oXygen debugger does; activating a TraceListener causes global variables to be evaluated eagerly rather than lazily.
>
> Michael Kay
> Saxonica
> [hidden email]
> +44 (0118) 946 5893
>
>
>
> On 30 Jun 2014, at 11:43, Вячеслав Седов <[hidden email]> wrote:
>
>> hi,
>>
>> got error from subject - "Circular dependency among global variables:
>> {variable-name} depends on its own value"
>>
>> two strange points:
>>
>> 1. got this error only when execute XSLT step-by-step in OxygenXML
>> debugger - error not reproduced on whole run.
>>
>> 2. {variable-name}  not depend from any other variable at all
>>
>>
>> environment:
>>
>> Saxon 9.5.1.5 (any - EE, PE, HE) in
>> <oXygen/> XML Editor 16.0, build 2014060420 (Linux 64-bit)
>>
>> got minimal test-case here {variable-name} is $ex-id
>>
>> XML: <r/>
>> XSLT:
>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>    xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>    xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
>>    exclude-result-prefixes="xs xd"
>>    version="2.0">
>>    <xsl:variable name="ex-id" select="(//external_id/@id/string())[.]"/>
>>    <xsl:variable name="id-prefix" select="('g'[$ex-id], 'm')[1]"/>
>>    <xsl:variable name="id" select="($ex-id, /*/@id)[1]"/>
>>        <xsl:template match="/*">
>>        <r>
>>            <xsl:attribute name="xml:id" select="concat($id-prefix, 'd', $id)"/>
>>        </r>
>>    </xsl:template>
>> </xsl:stylesheet>
>>
>> so when i use step-by-step debugging at xsl:attribute i got "XTDE0640:
>> Circular dependency among global variables: ex-id depends on its own
>> value"
>>
>> any suggestions?
>>
>> with best wishes,
>> Slav
>>
>> ------------------------------------------------------------------------------
>> Open source business process management suite built on Java and Eclipse
>> Turn processes into business applications with Bonita BPM Community Edition
>> Quickly connect people, data, and systems into organized workflows
>> Winner of BOSSIE, CODIE, OW2 and Gartner awards
>> http://p.sf.net/sfu/Bonitasoft
>> _______________________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
>
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
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
|  
Report Content as Inappropriate

Re: Circular dependency among global variables: {variable-name} depends on its own value

Вячеслав Седов
-T option not lead to bug reproduction - maybe trace out can help

sla@schematronic:~/saxon$ java -jar saxon9he.jar -T  -s:1.xml
-xsl:1.xsl -o:out.xml
<trace saxon-version="9.5.1.5" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:variable line="7" module="1.xsl">
 </xsl:variable>
 <xsl:variable line="8" module="1.xsl">
 </xsl:variable>
 <xsl:variable line="9" module="1.xsl">
 </xsl:variable>
 <source node="/r" line="1" file="1.xml">
  <xsl:template match="/*" line="10" module="1.xsl">
   <LRE name="r" line="11" module="1.xsl">
    <xsl:attribute line="12" module="1.xsl">
    </xsl:attribute>
   </LRE>
  </xsl:template>
 </source><!-- /r -->
</trace>
sla@schematronic:~/saxon$

out.xml look like expected

with best wishes,
Slav

2014-06-30 15:21 GMT+04:00 Вячеслав Седов <[hidden email]>:

> source doc is any - in my case it even empty tag <r/>
>
> about option -T i`ll try investigation some time later
>
> with best wishes,
> Slav
>
> 2014-06-30 14:59 GMT+04:00 Michael Kay <[hidden email]>:
>> Two suggestions:
>>
>> (a) could you supply your source document please (or any source document that reproduces the problem)
>>
>> (b) could you try running outside oXygen, but with the -T option? This activates a TraceListener, which is similar to what the oXygen debugger does; activating a TraceListener causes global variables to be evaluated eagerly rather than lazily.
>>
>> Michael Kay
>> Saxonica
>> [hidden email]
>> +44 (0118) 946 5893
>>
>>
>>
>> On 30 Jun 2014, at 11:43, Вячеслав Седов <[hidden email]> wrote:
>>
>>> hi,
>>>
>>> got error from subject - "Circular dependency among global variables:
>>> {variable-name} depends on its own value"
>>>
>>> two strange points:
>>>
>>> 1. got this error only when execute XSLT step-by-step in OxygenXML
>>> debugger - error not reproduced on whole run.
>>>
>>> 2. {variable-name}  not depend from any other variable at all
>>>
>>>
>>> environment:
>>>
>>> Saxon 9.5.1.5 (any - EE, PE, HE) in
>>> <oXygen/> XML Editor 16.0, build 2014060420 (Linux 64-bit)
>>>
>>> got minimal test-case here {variable-name} is $ex-id
>>>
>>> XML: <r/>
>>> XSLT:
>>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>>    xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>>    xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
>>>    exclude-result-prefixes="xs xd"
>>>    version="2.0">
>>>    <xsl:variable name="ex-id" select="(//external_id/@id/string())[.]"/>
>>>    <xsl:variable name="id-prefix" select="('g'[$ex-id], 'm')[1]"/>
>>>    <xsl:variable name="id" select="($ex-id, /*/@id)[1]"/>
>>>        <xsl:template match="/*">
>>>        <r>
>>>            <xsl:attribute name="xml:id" select="concat($id-prefix, 'd', $id)"/>
>>>        </r>
>>>    </xsl:template>
>>> </xsl:stylesheet>
>>>
>>> so when i use step-by-step debugging at xsl:attribute i got "XTDE0640:
>>> Circular dependency among global variables: ex-id depends on its own
>>> value"
>>>
>>> any suggestions?
>>>
>>> with best wishes,
>>> Slav
>>>
>>> ------------------------------------------------------------------------------
>>> Open source business process management suite built on Java and Eclipse
>>> Turn processes into business applications with Bonita BPM Community Edition
>>> Quickly connect people, data, and systems into organized workflows
>>> Winner of BOSSIE, CODIE, OW2 and Gartner awards
>>> http://p.sf.net/sfu/Bonitasoft
>>> _______________________________________________
>>> saxon-help mailing list archived at http://saxon.markmail.org/
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>>
>>
>> ------------------------------------------------------------------------------
>> Open source business process management suite built on Java and Eclipse
>> Turn processes into business applications with Bonita BPM Community Edition
>> Quickly connect people, data, and systems into organized workflows
>> Winner of BOSSIE, CODIE, OW2 and Gartner awards
>> http://p.sf.net/sfu/Bonitasoft
>> _______________________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/saxon-help

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
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
|  
Report Content as Inappropriate

Re: Circular dependency among global variables: {variable-name} depends on its own value

Radu Pisoi
In reply to this post by Вячеслав Седов
Hi,

I can reproduce this issue using the oXygen 16.0 that comes bundle with
Saxon 9.5.1.5 library.

However, I did not obtain the same behavior when I run the
transformation from the command line even if I activated the display
tracing information option (-T switch).

After a short analysis of the code, I discovered that responsible for
this behavior is the oXygen debugger that forces a re-evaluation of the
variable value when it is not accessible. We'll disable this
functionality in the next oXygen 16.0 build.

For the next oXygen 16.1 version, we'll re-consider this in order to
find a better solution that does not change the Saxon transformer state.

Regards,
Radu
--
Radu Pisoi
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 6/30/2014 13:43, Вячеслав Седов wrote:

> hi,
>
> got error from subject - "Circular dependency among global variables:
> {variable-name} depends on its own value"
>
> two strange points:
>
> 1. got this error only when execute XSLT step-by-step in OxygenXML
> debugger - error not reproduced on whole run.
>
> 2. {variable-name}  not depend from any other variable at all
>
>
> environment:
>
> Saxon 9.5.1.5 (any - EE, PE, HE) in
> <oXygen/> XML Editor 16.0, build 2014060420 (Linux 64-bit)
>
> got minimal test-case here {variable-name} is $ex-id
>
> XML: <r/>
> XSLT:
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>      xmlns:xs="http://www.w3.org/2001/XMLSchema"
>      xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
>      exclude-result-prefixes="xs xd"
>      version="2.0">
>      <xsl:variable name="ex-id" select="(//external_id/@id/string())[.]"/>
>      <xsl:variable name="id-prefix" select="('g'[$ex-id], 'm')[1]"/>
>      <xsl:variable name="id" select="($ex-id, /*/@id)[1]"/>
>          <xsl:template match="/*">
>          <r>
>              <xsl:attribute name="xml:id" select="concat($id-prefix, 'd', $id)"/>
>          </r>
>      </xsl:template>
> </xsl:stylesheet>
>
> so when i use step-by-step debugging at xsl:attribute i got "XTDE0640:
> Circular dependency among global variables: ex-id depends on its own
> value"
>
> any suggestions?
>
> with best wishes,
> Slav
>
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>




------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
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
|  
Report Content as Inappropriate

Re: Circular dependency among global variables: {variable-name} depends on its own value

Adrian Buza
In reply to this post by Вячеслав Седов
Hi,

This problem has been addressed in a maintenance build of Oxygen 16.0, 2014070718:
> XSLT Debugger/Saxon 9: Avoided 'XTDE0640: Circular dependency among global variables' error when debugging step-by-step.

You can download the latest maintenance build of Oxygen from the main download page:
http://www.oxygenxml.com/download.html

Regards,
Adrian

Adrian Buza
oXygen XML Editor and Author Support
support@oxygenxml.com
Loading...