You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by moisi <mo...@yahoo.fr> on 2008/12/11 17:30:55 UTC

Different Output between validate and svalidate

Hello, 

I try to validate an XML instance to an XML schema. When I use validate I got errors that should not be reported. But the validation passed when I use the svalidate tool. I thought the only difference was the size of schema that the tools could handle. It seems that there is a problem with whitespaces. Is it a normal behaviour?

Thanks

The output is :

>validate Bug.xsd Bug.xml Bug.xml NOT valid.
Bug.xml:3:2: error: cvc-attribute.4: The value '' does not equal the fixed value ' ' of attribute 'LongName'
Bug.xml:4:3: error: cvc-attribute.4: The value 'Blood Deductible (43)' does not equal the fixed value 'Blood Deductible  (43)' of attribute 'Name'

<BugExample>
<SegGroup_1_PROCEDURE Name="PROCEDURE" LongName=" " Usage="RE" Min="0" Max="1">
<Field_UB1.2 Name="Blood Deductible  (43)" Usage="RE" Min="0" Max="1" Datatype="NM" Length="1" ItemNo="00531"/>
</SegGroup_1_PROCEDURE>
</BugExample>

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="BugExample">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="SegGroup_1_PROCEDURE">
<xs:complexType>
<xs:sequence>
<xs:element name="Field_UB1.2">
<xs:complexType>
<xs:attribute name="Name" use="required" fixed="Blood Deductible  (43)"/>
<xs:attribute name="Usage" use="required" fixed="RE"/>
<xs:attribute name="Min" use="required" fixed="0"/>
<xs:attribute name="Max" use="required" fixed="1"/>
<xs:attribute name="Datatype" use="required" fixed="NM"/>
<xs:attribute name="Length" use="required" fixed="1"/>
<xs:attribute name="ItemNo" use="required" fixed="00531"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="Name" use="required" fixed="PROCEDURE"/>
<xs:attribute name="LongName" use="required" fixed=" "/>
<xs:attribute name="Usage" use="required" fixed="RE"/>
<xs:attribute name="Min" use="required" fixed="0"/>
<xs:attribute name="Max" use="required" fixed="1"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>


      

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org