Hi Holger,
I think this is a bug in Xerces; what you're doing looks fine to me.
Hopefully I'll get time to try and fix this soon... patches always
welcome!
Cheers,
Neil
Neil Graham
XML Parser Development
IBM Toronto Lab
Phone: 416-448-3519, T/L 778-3519
E-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED] on 03/06/2001 05:14:34 AM
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc:
Subject: deriving attributes from one namespace to another
Hi,
I've some trouble with attributes and fixed values and I hope someone can
help me out. Maybe it is not allowed what I'm doing. All I know is that it
does not work.
I use the following definitions and declarations:
In namespace 'test2'
<complexType name="t">
<attribute name="a" type="string" use="required"/>
</complexType>
In namespace 'test'
<element name="e">
<complexType>
<simpleContent>
<restriction base="test2:t">
<simpleType>
<list itemType="long"/>
</simpleType>
<attribute name="a" type="string" use="fixed"
value="fixedValue"/>
</restriction>
</simpleContent>
</complexType>
</element>
<element name="root">
<complexType>
<sequence>
<element ref="test:e"/>
</sequence>
</complexType>
</element>
I'm using a xml document with the following element:
<root>
<e>1 2 3 4 5</e>
</root>
If I try to validate my document xerces returns an error '[Error]
test.xml:3:6: Attribute "a" is required and must be specified for element
type "e".'
If I move the type 't' into namespace 'test', the validation succeeds.
Am I doing something wrong or is it a bug in xerces?
Thanks!
Holger
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]