[Schematron] Schematron referencing xml files doubt

rjelliffe at allette.com.au rjelliffe at allette.com.au
Tue Jan 6 20:12:46 EST 2009


Schematron has no code for handling external documents itself. It is
entirely up to the XPath engine to do it.

Therefore, if the XPath does not work, the choices seem to be

 1) The XPath engine is faulty. This seems unlikely

 2) The path you are using is incorrect. This is usually the case,
especially since only absolute paths are reliable.

Puttting Schematron under C:\Windows\System32 seems surprising to me: is
that really correct. You should use an absolute path: if you want to have
different paths, you can use a top-level parameter to the final XSLT.

 3) The path is corrupted because not there is spurious whitespace.

Looking at the error message, I see that it is expecting a filename "
values.xml" where the name starts with whitespace. Unless this is an
artifact of the email system etc, this seems very unlikely.

I hope this is useful.
Cheers
Rick Jelliffe

> Hi all,
> Has I mention before I'm developing a java code to validate XML
> xmlToValidate.xml using schematron schema.sch,
> In my schematron code I use some elements values of a XML file values.xml
> to validate some fields values in XML xmlToValidate.xml
> I got a style sheet styleSheet.xsl from the following process:
> Transform my schematron "chema.sch" in a style sheet styleSheet.xsl, to
> perform this I use saxon 9.105 using the following command:
> "java -jar saxon9.jar -o schema-compiled.xsl schema.sch
> iso_schematron_skeleton.xsl"
>
>
> Now I'm using this java class in a servlet running in tomcat, but
> obviously the path defined for values.xml file in schema.sch and
> styleSheet.xsl is not correct.
> What is the better approach to define the values.xml path in
> styleSheet.xsl? can I define values.xml path value in run time?
> What is your advice to this case once I'm getting the following error:
>
> "javax.xml.transform.TransformerException:
> com.sun.org.apache.xalan.internal.xsltc.TransletException:
> com.sun.org.apache.xml.internal.utils.WrappedRuntimeException:
> C:\Windows\system32\schematron\ values.xml (The system cannot find the
> path specified)"
>
>
>
> Thank you for your attention and best regards,
>
> Luís Costa
> Software Developer
>
> luis.costa at alert.pt
>
> www.alert-online.pt
>
>
> ALERT Life Sciences Computing, S.A.
> Edifício Lake Towers - pisos 7, 8 e 9
> Rua Daciano Baptista Marques, n.º 245
> 4400-617 Vila Nova de Gaia
> Portugal
> Tel.: +351 22 832 89 80
> Fax.: +351 22 832 89 82
> info at alert.pt
>  
> This e-mail is privileged, confidential and contains private information.
> Any reading, retention, distribution or copying of this communication by
> any person other than its intended recipient is prohibited.
>
>
>
> _______________________________________________
> Schematron mailing list
> Schematron at eccnet.com
> http://www.eccnet.com/mailman/listinfo/schematron
>




More information about the Schematron mailing list