Page 1 of 1
Run XSpec Test configuration for XML 1.1
Posted: Fri Jun 05, 2020 7:12 am
by whyme
I'm trying to do the Run XSpec Test on an xspec file that uses control characters (i.e., XML 1.0 doesn't like them). The system bombs despite the file saying that it is XML 1.1.
In the Parameters tab of the Run XSpec Test is an entry for saxon.custom.options. I've guessed that it is looking for a command-line option so I added -xmlversion:1.1 but that doesn't work either. I must have the syntax wrong, but there's no guidance either in the Scenario editor or at
https://www.oxygenxml.com/doc/versions/ ... l?hl=xspec about how to populate this field.
What's the secret to configuring saxon.custom.options?
Re: Run XSpec Test configuration for XML 1.1
Posted: Fri Jun 05, 2020 2:15 pm
by alex_jitianu
Hello,
I think you did everything right... I did a similar scenario, but I used the command line to exclude any Oxygen interference and I run into the same problem. Here is what I did:
1. I created some sample files. The XSPec looks like this:
Code: Select all
<?xml version="1.1" encoding="UTF-8"?>
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec"
stylesheet="control.xsl">
<x:scenario label="test">
<x:call template="test"/>
<x:expect>''</x:expect>
</x:scenario>
</x:description>
2. I downloaded
the official XSPec build.
3. In the command line I had to set Saxon home and the XML version, like this:
Code: Select all
set SAXON_HOME=D:\tools\SaxonEE10-1J
set SAXON_CUSTOM_OPTIONS=-xmlversion:1.1
4. I run xspec and got this:
Code: Select all
Running Tests...
Error on line 53 column 29 of control-compiled.xsl:
SXXP0003 Error reported by XML parser: Character reference "&#
org.xml.sax.SAXParseException; systemId: file:/D:/tools/xspec-1.6.0/xslt/xspec/control-compiled.xsl; lineNumber: 53; columnNumber: 29; Character reference "&#
The file
control-compiled.xsl is generated from the XSpec file. Looking inside it shows that it hasn't inherit the proper XML version:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:impl="urn:x-xspec:compile:xslt:impl"
Anyway, this is an issue that should be reported to
XSpec project. I can put an issue there myself, if you prefer. Just let me know.
Best regards,
Alex
Re: Run XSpec Test configuration for XML 1.1
Posted: Fri Jun 05, 2020 2:42 pm
by whyme
Thanks, Alex. It's my question, so I'm happy to put in the ticket and follow through. When there's resolution I'll try to remember to post back here.