Hello,

I've tried to submit the following bug but the forms are just too complex
and I couldn't understand (everyone has it's limitations) how to send an
attachment example, so I'm sending it here.

It consists of the following:

1. I've Defined a Schema called Declaration.xsd that you can find in
examples.jar, where I've put a simple type (ValueType, a decimal with 13
of max size and 2 of precision)

<xs:simpleType name="ValueType">
        <xs:restriction base="xs:decimal">
                <xs:minExclusive value="0.00"/>
                <xs:totalDigits value="13"/>
                <xs:fractionDigits value="2"/>
        </xs:restriction>
</xs:simpleType>

2. Then wdefined an Element of that type (Amount), whith a restriction to
have an attribute date that is required and...

<xs:element name="Amount" maxOccurs="unbounded">
        <xs:complexType>
                <xs:simpleContent>
                        <xs:extension base="ValueType">
                                <xs:attribute name="date" use="required">
                                        <xs:simpleType>
                                                <xs:restriction base="xs:date"/>
                                        </xs:simpleType>
                                </xs:attribute>
                        </xs:extension>
                </xs:simpleContent>
        </xs:complexType>
</xs:element>

Guess what happens... (you wont, you can run this example using the
following cmd):

  java -cp example.jar;xercesImpl.jar;xmlParserApi.jar Validator

And amazingly for a simple xml file (that you can find inside the jar),
the output will be:

[Error] :4:28: cvc-complex-type.3.2.2: Attribute 'date' is not allowed to
appear in element 'Amount'.
[Error] :4:28: cvc-complex-type.4: Attribute 'date' must appear on element
'Amount'.
[Error] :5:28: cvc-complex-type.3.2.2: Attribute 'date' is not allowed to
appear in element 'Amount'.
[Error] :5:28: cvc-complex-type.4: Attribute 'date' must appear on element
'Amount'.

Can anyone tell me why is this happening ????

Best Regards,

Lu�s Pereira

Attachment: example.jar
Description: Zip compressed data

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

Reply via email to