git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273306 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -0,0 +1,21 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <xs:schema | |||||
| xmlns:xs="http://www.w3.org/2001/XMLSchema" | |||||
| elementFormDefault="qualified"> | |||||
| <xs:element name="doc"> | |||||
| <xs:complexType> | |||||
| <xs:sequence> | |||||
| <xs:element ref="section"/> | |||||
| </xs:sequence> | |||||
| </xs:complexType> | |||||
| </xs:element> | |||||
| <xs:element name="section"> | |||||
| <xs:complexType> | |||||
| <xs:simpleContent> | |||||
| <xs:extension base="xs:string"> | |||||
| <xs:attribute name="title" type="xs:string"/> | |||||
| </xs:extension> | |||||
| </xs:simpleContent> | |||||
| </xs:complexType> | |||||
| </xs:element> | |||||
| </xs:schema> | |||||
| @@ -0,0 +1,9 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <doc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||||
| xsi:noNamespaceSchemaLocation="doc.xsd" | |||||
| xmlns="nap:Massive+Attack+Mezzanine"> | |||||
| <section title="endpiece"> | |||||
| With a little luck, the network will pick me up. | |||||
| This is Ripley - last survivor of The Nostromo - signing off. | |||||
| </section> | |||||
| </doc> | |||||
| @@ -0,0 +1,10 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <doc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||||
| xsi:noNamespaceSchemaLocation="doc.xsd" | |||||
| xmlns="nap:Massive+Attack+Mezzanine"> | |||||
| <section title="endpiece"> | |||||
| With a little luck, the network will pick me up. | |||||
| This is Ripley - last survivor of The Nostromo - signing off. | |||||
| <illegal-element/> | |||||
| </section> | |||||
| </doc> | |||||
| @@ -29,7 +29,7 @@ | |||||
| <xmlvalidate warn="false"> | <xmlvalidate warn="false"> | ||||
| <fileset dir="xml" includes="**/about.xml"/> | <fileset dir="xml" includes="**/about.xml"/> | ||||
| <xmlcatalog classpath="xml"> | <xmlcatalog classpath="xml"> | ||||
| <entity publicID = "bogusImage" | |||||
| <entity publicID = "bogusImage" | |||||
| location = "/i/dont/exist.jpg"/> | location = "/i/dont/exist.jpg"/> | ||||
| <xmlcatalog> | <xmlcatalog> | ||||
| <dtd publicID="-//stevo//DTD doc 1.0//EN" | <dtd publicID="-//stevo//DTD doc 1.0//EN" | ||||
| @@ -39,4 +39,24 @@ | |||||
| </xmlvalidate> | </xmlvalidate> | ||||
| </target> | </target> | ||||
| <target name="testSchemaGood"> | |||||
| <xmlvalidate warn="false"> | |||||
| <fileset dir="xml" includes="endpiece.xml"/> | |||||
| <feature name="http://xml.org/sax/features/validation" value="true"/> | |||||
| <feature name="http://apache.org/xml/features/validation/schema" value="true"/> | |||||
| <xmlcatalog > | |||||
| <entity publicID = "nap:Massive+Attack+Mezzanine" | |||||
| location = "xml/doc.xsd"/> | |||||
| </xmlcatalog> | |||||
| </xmlvalidate> | |||||
| </target> | |||||
| <target name="testSchGemaBad"> | |||||
| <xmlvalidate warn="false"> | |||||
| <fileset dir="xml" includes="endpiece2.xml"/> | |||||
| <feature name="http://xml.org/sax/features/validation" value="true"/> | |||||
| <feature name="http://apache.org/xml/features/validation/schema" value="true"/> | |||||
| </xmlvalidate> | |||||
| </target> | |||||
| </project> | </project> | ||||