How to pass --suppressXsltNamespaceCheck:on in scenario

Here should go questions about transforming XML with XSLT and FOP.
martindholmes
Posts: 178
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

How to pass --suppressXsltNamespaceCheck:on in scenario

Post 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
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

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

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
gkholman
Posts: 2
Joined: Mon Feb 07, 2011 9:45 pm

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

Post 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
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

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

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
mhGLEIF
Posts: 43
Joined: Tue Jul 26, 2016 6:31 pm

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

Post by mhGLEIF »

Hello,

was there an update on this request?
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

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

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply