How to pass --suppressXsltNamespaceCheck:on in scenario

Here should go questions about transforming XML with XSLT and FOP.
martindholmes
Posts: 104
Location: Victoria, BC, Canada

How to pass --suppressXsltNamespaceCheck:on in scenario

Wed Oct 05, 2016 8:39 pm

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: 2326

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

Thu Oct 06, 2016 9:47 am

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

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

Fri Oct 21, 2016 12:19 am

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: 2326

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

Fri Oct 21, 2016 3:16 pm

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: 40

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

Mon May 29, 2017 2:19 pm

Hello,

was there an update on this request?
adrian
Posts: 2326

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

Mon May 29, 2017 3:18 pm

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

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 1 guest