Differences between XSD-Validation of Oxygen and Ant
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 10
- Joined: Wed Feb 25, 2015 5:10 pm
Differences between XSD-Validation of Oxygen and Ant
Hi,
I wrote an XSD schema for a customer who wants to validate his XML documents against it in Oxygen as well as in an Ant pipeline.
This works fine in the past, but now I have the issue that the customer uses sometimes inline Entity declarations in his documents like this:
In Oxygen the validation still works, but the Ant pipline fails with:
Element type "root" must be declared.
Element type "child" must be declared
My challenge is now to configure the Xerces call in Ant so that it does not try to validate against the "inline DTD".
My current Ant call looks like this:
As this is more an Xerces issue, I have already asked a regarding question on stackoverflow (https://stackoverflow.com/questions/639 ... is-present), where you can also find the details about my issue. Unfortunately, I didn't get any feedback yet.
But I assume that Oxygen also calls the Xerces internally, so maybe one of the developer can leak, how you call it to avoid these unwanted messages.
Thanks for your help!
Best Regards,
Nico
I wrote an XSD schema for a customer who wants to validate his XML documents against it in Oxygen as well as in an Ant pipeline.
This works fine in the past, but now I have the issue that the customer uses sometimes inline Entity declarations in his documents like this:
Code: Select all
<!DOCTYPE root [<!ENTITY foo "bar">]>
<root>
<child>&foo;</child>
</root>
Element type "root" must be declared.
Element type "child" must be declared
My challenge is now to configure the Xerces call in Ant so that it does not try to validate against the "inline DTD".
My current Ant call looks like this:
Code: Select all
<project basedir="." name="schema-validation-test" default="test">
<target name="test">
<schemavalidate failonerror="true" file="src.xml" nonamespacefile="schema.xsd">
</schemavalidate>
</target>
</project>

But I assume that Oxygen also calls the Xerces internally, so maybe one of the developer can leak, how you call it to avoid these unwanted messages.

Thanks for your help!
Best Regards,
Nico
-
- Posts: 388
- Joined: Thu Jul 01, 2004 12:29 pm
Re: Differences between XSD-Validation of Oxygen and Ant
Hello Nico,
I think you need to set the "schemaLanguage" property. Something like this:
Best Regards,
Octavian
I think you need to set the "schemaLanguage" property. Something like this:
Code: Select all
<project basedir="." name="schema-validation-test" default="test">
<target name="test">
<schemavalidate file="src.xml" noNamespaceFile="schema.xsd" failonerror="true">
<property name="http://java.sun.com/xml/jaxp/properties/schemaLanguage" value="http://www.w3.org/2001/XMLSchema"/>
</schemavalidate>
</target>
</project>
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service