Page 1 of 1

[XML Validation] xinclude processing before validation

Posted: Tue Mar 31, 2009 12:29 am
by Tanking
Hello,

Has anyone been able to make oxygen resolve the XInclude (somewhat at pre-processing stage), and then only validate the consolidated file against a schema?

This is in order the not have to declare XInclude elements everywhere in my validating schema.

Re: [XML Validation] xinclude processing before validation

Posted: Tue Mar 31, 2009 10:56 am
by sorin_ristache
Hello,

That depends on the language of the schema that you use for validating your XML documents and also on the XML processor that does the validation. For example for XML Schema and RELAX NG schemas and the default XML processor of Oxygen (that is you run the Validate Document action or you select <Default engine> in a validation scenario) you should just enable XInclude validation from menu Options -> Preferences -> XML -> XML Parser (by default it is enabled) without declaring the XInclude elements and attributes in your schema. This is true also for the Saxon SA and LibXML validators. In case of DTD the default XML processor does not accept the XInclude elements and attributes and you have to declare them in your DTD.

What is the language of your schema and what XML processor do you use in the validation action?


Regards,
Sorin

Re: [XML Validation] xinclude processing before validation

Posted: Tue Mar 31, 2009 9:59 pm
by Tanking
hi Sorin,

Thanks for the anwser, I was indeed using DTD, I am going to switch to RelaxNG schema.

While we are on the topic, does oxygen process xml document specific catalogs:

<?oasis-xml-catalog catalog="xxxx"?>

Re: [XML Validation] xinclude processing before validation

Posted: Wed Apr 01, 2009 9:31 am
by sorin_ristache
Hello,

Oxygen can use OASIS XML catalogs but it does not recognize yet the processing instruction oasis-xml-catalog. You have to add your XML catalogs from menu Options -> Preferences -> XML -> XML Catalog.


Regards,
Sorin

Re: [XML Validation] xinclude processing before validation

Posted: Wed Apr 01, 2009 5:43 pm
by Tanking
sorin wrote:Hello,

Oxygen can use OASIS XML catalogs but it does not recognize yet the processing instruction oasis-xml-catalog. You have to add your XML catalogs from menu Options -> Preferences -> XML -> XML Catalog.


Regards,
Sorin
okie, used a workaround with creating a project and configuring the catalog ${pdu}/catalog.xml to use the project specific catalog.

Cheers,