You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

xmlvalidate.xml 2.0 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <project name="validate" default="testValidate" basedir=".">
  3. <target name="testValidate">
  4. <xmlvalidate warn="false">
  5. <fileset dir="xml" includes="**/about.xml"/>
  6. <dtd publicID="-//stevo//DTD doc 1.0//EN"
  7. location="xml/doc.dtd"/>
  8. </xmlvalidate>
  9. </target>
  10. <target name="testDeepValidate">
  11. <ant dir="xml"
  12. antfile="validate.xml"
  13. target="testValidate"/>
  14. </target>
  15. <target name="xmlcatalog">
  16. <xmlvalidate warn="false">
  17. <fileset dir="xml" includes="**/about.xml"/>
  18. <xmlcatalog classpath="xml">
  19. <dtd publicID="-//stevo//DTD doc 1.0//EN"
  20. location="doc.dtd"/>
  21. </xmlcatalog>
  22. </xmlvalidate>
  23. </target>
  24. <target name="xmlcatalognested">
  25. <xmlvalidate warn="false">
  26. <fileset dir="xml" includes="**/about.xml"/>
  27. <xmlcatalog classpath="xml">
  28. <entity publicID = "bogusImage"
  29. location = "/i/dont/exist.jpg"/>
  30. <xmlcatalog>
  31. <dtd publicID="-//stevo//DTD doc 1.0//EN"
  32. location="doc.dtd"/>
  33. </xmlcatalog>
  34. </xmlcatalog>
  35. </xmlvalidate>
  36. </target>
  37. <!-- <target name="testSchemaGood">
  38. <xmlvalidate warn="false">
  39. <fileset dir="xml" includes="endpiece.xml"/>
  40. <feature name="http://xml.org/sax/features/validation" value="true"/>
  41. <feature name="http://apache.org/xml/features/validation/schema" value="true"/>
  42. <xmlcatalog >
  43. <entity publicID = "nap:Massive+Attack+Mezzanine"
  44. location = "xml/doc.xsd"/>
  45. </xmlcatalog>
  46. </xmlvalidate>
  47. </target>
  48. -->
  49. <!-- <target name="testSchGemaBad">
  50. <xmlvalidate warn="false">
  51. <fileset dir="xml" includes="endpiece2.xml"/>
  52. <feature name="http://xml.org/sax/features/validation" value="true"/>
  53. <feature name="http://apache.org/xml/features/validation/schema" value="true"/>
  54. </xmlvalidate>
  55. </target> -->
  56. </project>