ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "EJ Ciramella" <ejcirame...@upromise.com>
Subject xml validation woes
Date Fri, 01 Sep 2006 16:26:27 GMT
I'm having a bit of trouble validating a very simple xml file (for
testing purposes).
 
Can anyone shed some light on this for me please?
 
Here is my build script:
 
<target name="build">
  <xmlvalidate failonerror="true" lenient="false" warn="true"
file="test.xml" classname="org.apache.xerces.parsers.SAXParser"> 
      <attribute name="http://xml.org/sax/features/validation"
                 value="true"/>
      <attribute name="http://apache.org/xml/features/validation/schema"
                 value="true"/>
  </xmlvalidate>
  <xslt basedir="." includes="test.xml" destdir="." extension=".html"
style="test.xsl"/>
</target>
 
Here is my xml file:
 
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<tester xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="file://e:/work/docs/engineering/builds/te
st.xsd">
    <test>Hello world</test>
</tester>
 
Here is my xsd file:
 
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:element name="tester">
       <xs:complexType>
           <xs:sequence>
               <xs:element name="test" type="xs:string"/>
           </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
 
No matter what I do, I wind up with the following error:
 
cvc-elt.1: Cannot find the declaration of element 'tester'.
 
 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message