Hello Gareth !! Thank you very much for your reply.
I have this schema: ------------------------------------------ ------------------------------------------ <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="myrootnode"> <xs:complexType> <xs:sequence> <xs:element name="firstElement"> <xs:complexType> <xs:attribute name="attr1" type="myType1" use="required"> </xs:attribute> <xs:attribute name="attr2" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:minLength value="1"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:simpleType name="myType1"> <xs:restriction base="xs:string"> <xs:minLength value="12"/> <xs:maxLength value="13"/> </xs:restriction> </xs:simpleType> </xs:schema> --------------------------------------------- --------------------------------------------- And my xml could be one of these two options: 1)------------------------------------------ -------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <myrootnode xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="E:\DOMPrint\Debug\myschema.xsd"> <firstElement attr2="String" /> </myrootnode> -------------------------------------------- -------------------------------------------- or 2)------------------------------------------ -------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <myrootnode > <firstElement attr1="Stringaaaaaa" attr2="String" /> </myrootnode> -------------------------------------------- -------------------------------------------- Both xml causes output like the one I posted. I know the first one is not valid because a required attribute is missing, and the second does not include the attribute "noNamespaceSchemaLocation". Thank you very much for your help. Elsa. --- Gareth Reakes <[EMAIL PROTECTED]> escribió: > Hi, > > thats certainly not expected behavior. Can you > post a minimal xml > document and schema that demonstrates this? > > Cheers, > > Gareth > > elsa lizette wrote: > > > Hello everybody !! > > > > I am trying to validate an xml using a > schema. > > > > I compiled DOMPrint example and run it: > > > > DOMPrint -v=always -n -s x1.xml > > > > However, the output reports some errors but > they > > do not have a description: > > > > ---------------------- > > Error at file "E:\DOMPrint\Debug/x1.xml", > line > > 70, column 12 > > Message: > > > > ---------------------- > > > > So, I have two questions: how can I retrieve > the > > description of the error and how can I aware > the > > application about the schema. I have it on a > > local xsd file. > > > > Thanks a lot for your help, > > Elsa. > > > > > > > > > _________________________________________________________ > > Do You Yahoo!? > > La mejor conexión a internet y 25MB extra a > tu correo por $100 al mes. > http://net.yahoo.com.mx > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > -- > Gareth Reakes, Managing Director Parthenon > Computing > +44-1865-811184 > http://www.parthcomp.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > _________________________________________________________ Do You Yahoo!? La mejor conexión a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]