Page 1 of 1

multiple variable highlighting not working with XPath comments

Posted: Mon Aug 06, 2012 3:59 pm
by ojeulin
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)

Re: multiple variable highlighting not working with XPath comments

Posted: Mon Aug 06, 2012 5:50 pm
by adrian
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

Re: multiple variable highlighting not working with XPath comments

Posted: Mon Aug 06, 2012 6:45 pm
by ojeulin
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:)

Re: multiple variable highlighting not working with XPath comments

Posted: Tue Aug 07, 2012 9:28 am
by adrian
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

Re: multiple variable highlighting not working with XPath co

Posted: Wed Apr 01, 2015 9:08 am
by Radu
Hi,

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

Regards,
Radu