Hi,

I have a question about element default values defined in the schema. How can we get them when parsing the file ?

I have the foolowing part of a schema
<xs:complexType name="TaxData_Type">
<xs:complexContent>
 <xs:extension base="Data_Type">
  <xs:sequence>
   <xs:element name="DateApplication" default="TRV" minOccurs="0">
    <xs:simpleType>
     <xs:restriction base="xs:string">
      <xs:enumeration value="SGT"/>
      <xs:enumeration value="TRV"/>
     </xs:restriction>
    </xs:simpleType>
   </xs:element>
  </xs:sequence>
 </xs:extension>
</xs:complexContent>
</xs:complexType>

With TRV as default value in the type, I expected to receive TRV if I don't put a DateApplication tag in TaxData.
But I receive nothing :-(


http://apache.org/xml/features/validation/schema/element-default is set to true, and so are schema validation and validation features.

It doesn't call characters() for DateApplication (I printed it on screen). Any idea ?

Additional question : why should it call characters() for element default values, whereas it calls startElement() for attribute default values ?
How can we know to which tag the default value sent to characters() refers to ?
By the way it works well for attribute default values for me.



By the way I'm using the latest Xerces 2_6_2.

Many thks in advance,

_________________________________________________________________
MSN Search, le moteur de recherche qui pense comme vous ! http://search.msn.fr/



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to