Schematron: Reflect line and column number

This should cover W3C XML Schema, Relax NG and DTD related problems.
kprasad
Posts: 2
Joined: Tue Dec 06, 2011 4:04 pm

Schematron: Reflect line and column number

Post by kprasad » Tue Dec 06, 2011 4:19 pm

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

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: Schematron: Reflect line and column number

Post by sorin_ristache » Tue Dec 06, 2011 4:44 pm

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

kprasad
Posts: 2
Joined: Tue Dec 06, 2011 4:04 pm

Re: Schematron: Reflect line and column number

Post by kprasad » Thu Dec 08, 2011 2:35 pm

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

george
Site Admin
Posts: 2101
Joined: Thu Jan 09, 2003 2:58 pm

Re: Schematron: Reflect line and column number

Post by george » Thu Dec 08, 2011 2:46 pm

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
George Cristian Bina

Post Reply