XSpec & catalogs

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
cmarchand
Posts: 8

XSpec & catalogs

Thu Oct 29, 2015 12:01 pm

Hello,

I have defined a catalog entry in preferences : ${pdu}/catalog.xml

In my project, XSL edition and execution works perfectly.

But when I try to run XSpec in the project, the XSpec engine is not aware of the catalog. As far as XSL processor in frameworks/xspec/build.xml is saxon, it is not a problem to patch the build.xml to specify the catalog to saxon.

But :
where I can get the computed catalog from preferences, with the ${oxygen-variables} resolved ? Is there a property, a system property or anything else I could use to initialize the XSpec run ?

Thanks in advance,
Christophe
HomeGoods
Posts: 87

Re: XSpec & catalogs

Fri Oct 30, 2015 1:59 pm

I've a similar issue. I have saxon.custom.options=-catalog:http://... specified in the transformation scenario and I think it is working at the first stage ("[xslt] Processing ....xspec to ....xsl") . But it doesn't seem to take effect at this stage:

Code: Select all

[xslt] Processing ...-result.xml to ...-result.html
[xslt] Loading stylesheet [Oxygen]\frameworks\xspec\src\reporter\format-xspec-report-oxygen.xsl
So if the tested xsl have <xsl:output doctype-system="http://...">, the URL isn't resolved with the catalog.
HomeGoods
Posts: 87

Re: XSpec & catalogs

Fri Oct 30, 2015 2:07 pm

HomeGoods wrote:I think it is working at the first stage ("[xslt] Processing ....xspec to ....xsl") .
Uh, nope. I meant the second stage ("[java] ...").
adrian
Posts: 2450

Re: XSpec & catalogs

Fri Oct 30, 2015 7:02 pm

Hi,

cmarchand wrote:I have defined a catalog entry in preferences : ${pdu}/catalog.xml

In my project, XSL edition and execution works perfectly.

But when I try to run XSpec in the project, the XSpec engine is not aware of the catalog. As far as XSL processor in frameworks/xspec/build.xml is saxon, it is not a problem to patch the build.xml to specify the catalog to saxon.
I'm afraid that's a bug, the catalogs are not being passed to the XSpec ANT transformation. I've logged an issue for this.

cmarchand wrote:But :
where I can get the computed catalog from preferences, with the ${oxygen-variables} resolved ? Is there a property, a system property or anything else I could use to initialize the XSpec run ?
There is no property or editor variable that can be used obtain the configured XML catalogs.
One way around this would be to declare a custom editor variable for your catalog entry in Options > Preferences, Custom Editor Variables

Code: Select all

myCatalog = ${pdu}/catalog.xml
You can then use this custom editor variable (${myCatalog}) in multiple locations (XML Catalog, scenarios, etc).

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

Re: XSpec & catalogs

Fri Apr 21, 2017 9:16 am

Hi,

Just to update this thread, Oxygen 19.0 has two ways in which you can make XML catalogs work with XSpec:

https://www.oxygenxml.com/doc/versions/19.0/ug-editor/topics/xslt-unit-test-xspec.html#xslt-unit-test-xspec__adding_a_catalog_to_an_xspec_transformation

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

Return to “Common Problems”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests