Page 1 of 1

Schematron: Reflect line and column number

Posted: Tue Dec 06, 2011 4:19 pm
by kprasad
I'm using schematron via below mentioned command sequence

java -jar saxon9he.jar -l -o:output.xsl -s:MB-Journals.sch d:\Keshav\Schematron\iso-schematron-xslt2\iso_svrl_for_xslt2.xsl

java -jar saxon9he.jar -l -o:whereDidIScrewUp.xml -s:%1 output.xsl

java -jar saxon9he.jar -l -o:Report-html.html -s:whereDidIScrewUp.xml Report-html.xsl

I need to display line:column number for all error message to the user like showing in Oxygen.

What should I do to fix this issue?

---Kanhaiya

Re: Schematron: Reflect line and column number

Posted: Tue Dec 06, 2011 4:44 pm
by sorin_ristache
Hello,

How do you run these commands? Do you run them in Oxygen? Where do you need to display the line and column? Are they the line and column of the error messages that you see in Oxygen when validating whereDidIScrewUp.xml against MB-Journals.sch?


Regards,
Sorin

Re: Schematron: Reflect line and column number

Posted: Thu Dec 08, 2011 2:35 pm
by kprasad
I am running this at DOS prompt where all 3 lines avaialble in valid.bat file.
Line and column should be available in whereDidIScrewUp.xml like 'location' is coming in this file.
Yes you are right, this is the same line and column number which is visible in Oxygen.
sorin wrote:Hello,

How do you run these commands? Do you run them in Oxygen? Where do you need to display the line and column? Are they the line and column of the error messages that you see in Oxygen when validating whereDidIScrewUp.xml against MB-Journals.sch?


Regards,
Sorin

Re: Schematron: Reflect line and column number

Posted: Thu Dec 08, 2011 2:46 pm
by george
It depends on that Schematron implementation that you use to make available that information. You should look into the documentation of that to see if this is available and if yes, how you can obtain that if by default this information is not provided.

The Schematron implementation used by oXygen is available inside oxygen/frameworks/schematron/impl but the location of the errors is done inside oXygen's Java code, it is not a part of the stylesheets. We detect when an error is reported and we identify at that time which is the element that triggers that error and record that location information in the reported error.

Best Regards,
George