Page 1 of 1

xspec @select color coding

Posted: Thu Jul 13, 2017 5:05 pm
by whyme
A nice feature would be to have color coding for xspec @select. It took me the longest time to diagnose an error, only because I thought (due partly to the color) that

Code: Select all

"sample string"
was the correct syntax for a string, when it should have been

Code: Select all

"'sample string'"
.

Re: xspec @select color coding

Posted: Fri Jul 14, 2017 10:52 am
by adrian
Hello,

We provide syntax highlight for XPath in XSLT, but XSpec is treated as XML with a schema and doesn't have this feature.
Could you please provide an XSpec snippet with the context where you use this?

Regards,
Adrian

Re: xspec @select color coding

Posted: Mon Jul 31, 2017 11:24 pm
by whyme
Here's a sample. You'll see that color coding would be nice not just for a string, but for variables.

Code: Select all


   <x:scenario label="Scenario for testing function matches">
<x:call function="tan:matches">
<x:param name="input" select="$regex-greek"/>
<x:param name="pattern" select="'abcθ'"/>
</x:call>
<x:expect label="true" select="true()"/>
</x:scenario>

Re: xspec @select color coding

Posted: Tue Aug 01, 2017 2:27 pm
by adrian
Hi,

What you're showing me already works since v19.0, when the specialized XSPEC editor was introduced.
There seems to be an issue with the internal file association for .xspec. Oxygen did not have a specialized editor prior to v19.0, so .xspec was associated with the XML Editor. After upgrading from v18.1 (or older) to v19.0, if you already have made changes in the list of associations, the old associations remain, so you're still stuck editing XSPEC in XML mode.
Go to Options > Preferences, File Types and check your xspec file association. If it's XML Editor, edit it and set it to "XSPEC Editor" (or press Restore Defaults in the option pane, if you don't care about the rest of the associations).

Regards,
Adrian