Page 1 of 1

schematron not recognizing namespaces

Posted: Thu Sep 04, 2008 9:15 pm
by mgarrish
Any idea why a schematron schema called from an nvdl script cannot see other namespaces when one has been declared on the root? For example:

<meta xmlns="http://www.xxx.com/meta">
<time xmlns="http://www.xxx.com/time"/>
</meta>

No matter what I've tried, there is no way to access the time element (even using context="*" on a rule and printing the name of every element only prints elements in the same namespace as the root).

Everything works fine when I run the nvdl script from inside Oxygen Editor, but when I use oNVDL from a command prompt in Windows (XP SP2, Java 1.6.0_07) it fails to recognize child elements with their own namespace.

Re: schematron not recognizing namespaces

Posted: Fri Sep 05, 2008 4:23 pm
by sorin_ristache
Hello,

Can you post the NVDL schema and a sample XML document that you want to validate against that schema? What is the command line that you tried when using onvdl.jar from command line?


Regards,
Sorin

Re: schematron not recognizing namespaces

Posted: Sun Sep 07, 2008 3:41 am
by mgarrish
Sorry, going to have to eat some crow. I was trying out Oxygen editor for the first time and didn't realize it inserts a processing instruction to associate the schemas and doesn't remove old ones when you change. It was calling the schematron schema first, which is why it appeared to be working (I'd actually forgotten to use a wildcard when attaching the other namespaces in the nvdl script, which is where I lost the elements to).

Let me give oNVDL a ringing endorsement... :oops: