You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Evgueni Rouban <re...@nbsp.nsk.su> on 2002/03/29 05:46:30 UTC

what's wrong with the declaration:

what's wrong with the following element
declaration: 

<xsd:element name="e" default="1"/>

note, that if the type is set to "xsd:string" it is ok.
<xsd:element name="e" type="xsd:string" default="1"/>

Thanks.
-Evgueni

P.S. try the following schema and document:
----------------------------------- valueConstraint.xsd
<xsd:schema
  xmlns="valueConstraint"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  targetNamespace="valueConstraint">

  <xsd:element name="root" type="xsd:string" default="0" />

</xsd:schema>

----------------------------------- valueConstraint.xml
<test:root
    xmlns:test="valueConstraint"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="valueConstraint valueConstraint.xsd"/>

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