Validate an XML file with NVDL and Apache Ant

Having trouble installing Oxygen? Got a bug to report? Post it all here.
xephon
Posts: 140
Joined: Mon Nov 24, 2014 1:49 pm
Location: Greven/Germany

Validate an XML file with NVDL and Apache Ant

Post by xephon »

Hi,
I'd like to validate an XML file with NVDL via Apache Ant, like I can do it with https://relaxng.org/jclark/jing-ant.html and Relax NG. But I could not find a solution. Do you have an idea how to do that?

Thanks a lot
stefan-jung.org – Your DITA/DITA-OT XML consultant
xephon
Posts: 140
Joined: Mon Nov 24, 2014 1:49 pm
Location: Greven/Germany

Re: Validate an XML file with NVDL and Apache Ant

Post by xephon »

I assume that no answer can be interpreted as "there is no solution". :(
stefan-jung.org – Your DITA/DITA-OT XML consultant
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Validate an XML file with NVDL and Apache Ant

Post by Radu »

Hi Stefan,
Sorry, I did not see your initial post.
It seems we are using Jing in Oxygen to validate with the NVDL schema.
So why not use the same with NVDL as you do with RNG?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
xephon
Posts: 140
Joined: Mon Nov 24, 2014 1:49 pm
Location: Greven/Germany

Re: Validate an XML file with NVDL and Apache Ant

Post by xephon »

Hi Radu, I don't know how to do it in Apache Ant. The <jing> task seems to only work with a Relax NG file: https://relaxng.org/jclark/jing-ant.html

Code: Select all

<project name="example" default="validate" basedir=".">
  <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask"/>
  <target name="validate">
    <jing rngfile="xslt.rng">
      <fileset dir="xsl" includes="**/*.xsl"/>
    </jing>
  </target>
</project>
stefan-jung.org – Your DITA/DITA-OT XML consultant
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Validate an XML file with NVDL and Apache Ant

Post by Radu »

Hi Stefan,
From looking at the Java code of "com.thaiopensource.relaxng.util.JingTask" I think you should take your chances and point the "rngfile" attribute to the NVDL schema because it might just work.
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply