multiple variable highlighting not working with XPath comments

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
ojeulin
Posts: 17
Joined: Mon Mar 15, 2010 8:35 pm
Location: Paris, France

multiple variable highlighting not working with XPath comments

Post by ojeulin » Mon Aug 06, 2012 3:59 pm

Hello,

With this variable:

Code: Select all


<xsl:variable name="format-pdc-num" select="'0000'" as="xs:string"/>
used in this other variable:

Code: Select all


	<xsl:variable name="pdc"
select="string-join((format-number(count($book/preceding::niv0), $format-pdc-num), (:bla:)
format-number(index-of($order-niv1, $book/ancestor::niv1), $format-pdc-num),
format-number(index-of($order-niv2, ($book/ancestor::niv2, $book)[1]), $format-pdc-num, 'nan-0'),
format-number(index-of($order-niv3, ($book/ancestor::niv3, $book)[1]), $format-pdc-num, 'nan-0')),
'/')"
as="xs:string"/>
When I put the cursor in the variable definition of "format-pdc-num", then in the variable "pdc", only the first occurence of $format-pdc-num is highlighted.
This bug is caused by the comment "(:bla:)", because when I remove it, all the occurrences of "format-pdc-num" are highlighted.
(Idem for $book)

adrian
Posts: 2515
Joined: Tue May 17, 2005 4:01 pm

Re: multiple variable highlighting not working with XPath comments

Post by adrian » Mon Aug 06, 2012 5:50 pm

Hello,

What version and build number of Oxygen are you using(Help > About)?

I cannot reproduce this issue with the latest maintenance builds of v13.2 or v14.0. I've tested using this template (I've just added some random declarations so it would validate):

Code: Select all

    <xsl:template match="/">
<xsl:variable name="format-pdc-num" select="'0000'" as="xs:string"/>
<xsl:variable name="order-niv1" select="'0000'" as="xs:string"/>
<xsl:variable name="order-niv2" select="'0000'" as="xs:string"/>
<xsl:variable name="order-niv3" select="'0000'" as="xs:string"/>
<xsl:variable name="book" select="//*"/>
<xsl:variable name="pdc"
select="string-join((format-number(count($book/preceding::niv0), $format-pdc-num), (:bla:)
format-number(index-of($order-niv1, $book/ancestor::niv1), $format-pdc-num),
format-number(index-of($order-niv2, ($book/ancestor::niv2, $book)[1]), $format-pdc-num, 'nan-0'),
format-number(index-of($order-niv3, ($book/ancestor::niv3, $book)[1]), $format-pdc-num, 'nan-0')),
'/')"
as="xs:string"/>
<xsl:value-of select="$pdc"></xsl:value-of>
</xsl:template>
Could you please try with the snippet above and let me know if it still reproduces?

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

ojeulin
Posts: 17
Joined: Mon Mar 15, 2010 8:35 pm
Location: Paris, France

Re: multiple variable highlighting not working with XPath comments

Post by ojeulin » Mon Aug 06, 2012 6:45 pm

XML Editor 14.0, build 2012062215

My bad: I shortened the comment, and suppressed what's causing the bug (it seems to be a quote (')).
Try with this comment
(:bl'a:)

adrian
Posts: 2515
Joined: Tue May 17, 2005 4:01 pm

Re: multiple variable highlighting not working with XPath comments

Post by adrian » Tue Aug 07, 2012 9:28 am

Hi,

Thanks for clarifying. I was able to reproduce the bug with that quote in the comment.

I have logged this to our issue tracking tool and it will be analyzed and resolved in the next release of Oxygen.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Radu
Posts: 6211
Joined: Fri Jul 09, 2004 5:18 pm

Re: multiple variable highlighting not working with XPath co

Post by Radu » Wed Apr 01, 2015 9:08 am

Hi,

Just to update this thread, the issue is fixed in Oxygen 16.1.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply