Hi Ilya,
Would you be willing to post the whole schema?
Regards,
--
Ed Mooney |Sun Microsystems, Inc.|Time flies like
Java Web Services |UBUR02-201 |an arrow, but
Ed.Mooney_at_Sun.COM |1 Network Drive |fruit flies like
781-442-0459 |Burlington, MA 01803 |a banana. Groucho
Simuni, Ilya wrote:
> I have created a base complex type hoping that I can use it in many
> elements and set some attribute values using default attribute in the
> derived elements.
> This schema parses fine, but when I created parser code, no default or
> fixed values were set.
>
> In the class Node2Type, the function getName() returns "Undefined"
> instead of "Node 2 Name".
> It appears that the "Name" attribute is always set to default in the
> base type
> and the fixed attribute was not set at all.
>
> Any ideas or suggestions ?
>
> ---------------------------------------------------------------------
> here are the definitions:
>
> <xsd:complexType name="BaseNodeType">
> <xsd:attribute name="Binding" type="xsd:NMTOKEN"/>
> <xsd:attribute name="Name" type="xsd:string" default="Undefined"/>
> <xsd:attributeGroup ref="apv:NodeAttributeGroup"/>
> </xsd:complexType>
> <xsd:element name="Node2">
> <xsd:complexType>
> <xsd:complexContent>
> <xsd:restriction base="apv:BaseNodeType">
> <xsd:attribute name="Binding" type="xsd:NMTOKEN" fixed="Node2Binding"/>
> <xsd:attribute name="Name" type="xsd:string" default="Node 2 Name"/>
> </xsd:restriction>
> </xsd:complexContent>
> </xsd:complexType>
> </xsd:element>
>
>