Page 1 of 1

How to pass --suppressXsltNamespaceCheck:on in scenario

Posted: Wed Oct 05, 2016 8:39 pm
by martindholmes
Hi there,

I have a transformation scenario which is stored as part of a Document Type in a project file, where non-specialist users will run it. This particular scenario triggers the common warning from Saxon:

SXXP0005: The source document is in namespace http://www.tei-c.org/ns/1.0, but none of the template rules match elements in this namespace (Use --suppressXsltNamespaceCheck:on to avoid this warning)

I've often counteracted this at the command line, or in ant tasks, using --suppressXsltNamespaceCheck:on, but I can't figure out how to pass this parameter successfully to an Oxygen-hosted transformation scenario. I've tried every configuration of name/value parameter I can think of, but nothing works. I'd really like to remove this distracting warning so users don't focus on it. What's the trick?

Cheers,
Martin

Re: How to pass --suppressXsltNamespaceCheck:on in scenario

Posted: Thu Oct 06, 2016 9:47 am
by adrian
Hi,

For any Saxon options that Oxygen does not provide a GUI option, you need a Saxon configuration file ("Use a configuration file" in the "Advanced Options" of Saxon transformer in the transformation scenario configuration):
http://www.saxonica.com/html/documentat ... lobal.html

Code: Select all

<configuration edition="PE" xmlns="http://saxon.sf.net/ns/configuration">
     <global suppressXsltNamespaceCheck="true"/>
</configuration>
Change @edition to EE, if you use Saxon-EE.

If I may ask, why do you want to suppress this warning? This warning usually points out that the stylesheet won't match any templates on the given XML source, so it will most likely have no effect.

Regards,
Adrian

Re: How to pass --suppressXsltNamespaceCheck:on in scenario

Posted: Fri Oct 21, 2016 12:19 am
by gkholman
Adrian, this is an important setting for me because of my work in UBL where two of my vocabularies use a namespace on the document element but not on the descendants of the document element, and so many of my stylesheets validate the document element but then match without a namespace.

Ref: http://lists.xml.org/archives/xml-dev/2 ... 00044.html

I hope this is helpful.

. . . . . . Ken

Re: How to pass --suppressXsltNamespaceCheck:on in scenario

Posted: Fri Oct 21, 2016 3:16 pm
by adrian
Hi Ken,

Thank you for the feedback. I had no idea of this use case.
I've logged a feature request on our issue tracking tool for an explicit Oxygen GUI option for this flag. I've added two votes and mentioned your use case.

Regards,
Adrian

Re: How to pass --suppressXsltNamespaceCheck:on in scenario

Posted: Mon May 29, 2017 2:19 pm
by mhGLEIF
Hello,

was there an update on this request?

Re: How to pass --suppressXsltNamespaceCheck:on in scenario

Posted: Mon May 29, 2017 3:18 pm
by adrian
Hi,

The explicit GUI option has not been added yet as of v19.0. I've added another vote.

Note that you can work around this with the Saxon config file mentioned in one of my previous posts.

Regards,
Adrian