Schematron Validation with oxygen

Oxygen general issues.
devang_ran
Posts: 3
Joined: Tue Nov 01, 2011 8:17 am

Schematron Validation with oxygen

Post by devang_ran »

Hi,

I am using oxygen xml editor version 10.2. I am trying to validate xml file using ISO schematron. Issue is that when I validate xml file using oxygen it validates it perfectly, however whenever I validate same file using schematron-ant task provided by schematron it gives an error while using abstract patterns.

Abstract pattern paramters are not substituted and I get error that variable is not declared.

My question is that how does oxygen performes schematron validation. Does it use same xsl files provided by iso_schematron?

iso_dsdl_include.xsl
iso_abstract_expand.xsl
iso_svrl_for_xslt2.xsl

when i apply transformation manually using some java code it is not working but when i apply validation using oxygen, it is working.

So is oxygen using some custom xsl for validating xml using iso schematron?
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: Schematron Validation with oxygen

Post by george »

Hi,

We implemented ISO Schematron before the reference implementation because at that time the reference implementation tried to support both ISO and pre-ISO Schematron in the same implementation and that did not work very well.
The ISO Schematron implementation from oXygen is made available under
[oXygen]/frameworks/schematron/impl
There is a readme.txt file in that folder with some details.
I do not remember if this is available in version 10 but it is surely there in 13.1.

My guess is that the ant task that you are using does not support abstract patterns.

Best Regards,
George
George Cristian Bina
devang_ran
Posts: 3
Joined: Tue Nov 01, 2011 8:17 am

Re: Schematron Validation with oxygen

Post by devang_ran »

Hi,

I installed oxygen xml editor 12 and i am able to find schematron implementation folder there. If i use this implementation then I am getting same results in my java code that I get from oxygen.

My question is, can I use this referenece implementation in my java code?
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: Schematron Validation with oxygen

Post by george »

Yes, you can use that as you want/need.

Best Regards,
George
George Cristian Bina
devang_ran
Posts: 3
Joined: Tue Nov 01, 2011 8:17 am

Re: Schematron Validation with oxygen

Post by devang_ran »

Thanks.

I am using oxygen implementation of schematron. It generates results that are consitent with Oxygen XML editor. I am using java code to validate my xml file.

However I am facing an issue that I am not able to redirect xml transformer output to any file. It always displays output to console.

I am able to redirect transformation output to file when I use ISO Schematron implementation provided by Schematron.com (but it has some issue with abstract patterns).

So is there any way I can redirect my validation output to file when I use oxygen implementation? It would be very useful, because when I validate around 10 or 12 files it would not be good idea to show all results in console only.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: Schematron Validation with oxygen

Post by george »

By default our Schematron implementation outputs errors using xsl:message. The command line may send those to the standard error stream so in order to redirect them to a file you can use something like 2>file.txt at the end of the command line. Alternatively you can either modify or overwrite the process-message template from iso-schematron-message.xsl to generate whatever output you want and in the format you desire.

Best Regards,
George
George Cristian Bina
Post Reply