How do I disable syntax check of XSLT and XPath?

Here should go questions about transforming XML with XSLT and FOP.
Posts: 2

How do I disable syntax check of XSLT and XPath?

Sun Oct 12, 2014 5:58 pm

I use XSLT 3.0 a lot and many syntax variants of the latest drafts are not supported by oXygen and/or by Saxon 9.5.x which is used for the syntax validation.

The red curlies underneath just about every line when I use for instance maps or other unsupported features greatly distract from writing XSLT. How can I either disable this syntax checking (preferably on a per-file basis) and/or how can I let the syntax check be done by the more recent Saxon 9.6 engine?

Abel Braaksma XSLT 3.0 streaming processor
Posts: 2471

Re: How do I disable syntax check of XSLT and XPath?

Mon Oct 13, 2014 5:19 pm


There is a way to disable automatic validation on a per-file basis. You can configure a custom validation scenario, disable the automatic validation for the configured validation unit and associate that scenario with the files you want the automatic validation disabled. To configure such a scenario:
1. Open an XSL document.
2. Go to Document -> Validate -> "Configure Validation Scenario(s)" (there's a corresponding action in the toolbar).
3. In the Configure Validation Scenario(s) dialog click New, choose a name for the scenario (e.g. manualValidation) and uncheck the Automatic validation box of the default validation unit. Leave everything else unchanged.
4. Close the dialogs with OK and Save and Close.

Afterwards you can associate multiple XSL files from the project view with the custom validation scenario you have just configured. You can do this by selecting the XSL files (or their parent folder) in the project view and right clicking and selecting Validate -> Configure Validation Scenario. Then select the scenario from the list and press OK. If you've chosen a folder this will associate the scenario with all the files from that folder (even if they are of other type than XSL). So you should make sure you don't accidentally associate validation scenarios to files that the scenario doesn't apply to.

Regarding Saxon 9.6, it was released just a few days before our Oxygen 16.1 release, so we did not have the time to test this new version of Saxon and integrate it in the current version of Oxygen. However we will integrate it in the next version of Oxygen.
Unfortunately you cannot use for XSLT validation (or debugging) a different version of Saxon than the one integrated with Oxygen. Note that you cannot simply replace the Saxon jar library from Oxygen due to the tight Saxon integration that Oxygen provides.

Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 1 guest