Page 1 of 1

Better XPath suggestions

Posted: Tue Dec 12, 2017 4:19 pm
by dsxsfs
Hi,

I've noticed that the context-aware XPath suggestions fail in following situations:

- when adding boolean operators 'and' or 'or' in the expression, no context-specific suggestions are given after it. E.g.

Code: Select all

<xsl:if test="node/subnode or..."/>
-> in this case, the auto-completion stops working after 'or', even though it should behave as if it were the beginning of the expression.

- when you have a variable that contains a nodeset, no context-specific suggestions are given when referring to that variable. E.g. with this input:

Code: Select all

<node><subnode/></node>
and this XSL:

Code: Select all

<xsl:variable name="aNode" select="node"/> 
<xsl:value-of select="$aNode/..."/>
-> 'subNode' should be suggested after the slash. Obviously this only works when the variable is a nodeset.

This would be very helpful when dealing with more complicated XPath suggestions.

Thanks for considering this.

Re: Better XPath suggestions

Posted: Wed Dec 13, 2017 11:17 am
by Radu
Hi,

Thanks for the feedback. So:
when adding boolean operators 'and' or 'or' in the expression, no context-specific suggestions are given after it
Indeed if the content completion from the set of XML elements worked before the "or"/"and" it should have also worked after it, I will add an issue on our side and we'll try to make this work in a future version. I will update this forum thread when we do.
when you have a variable that contains a nodeset, no context-specific suggestions are given when referring to that variable.
I understand but it's quite impossible to make this work. The value of the variable may be computed and determined at runtime and we do not run the XSLT transformation in order to give you suggestions.

Regards,
Radu