-----Original Message-----
From: Ed Mooney [mailto:Ed.Mooney_at_Sun.COM]
Sent: Friday, April 04, 2003 7:12 PM
Subject: Re: inhereted default overrides do not work
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
============================================================
Ed,
here is the complete schema.
I expected the element "ResourceApplicationId" to have Binding attribute to
be "ResourceApplicationIdBinding" and Name attribute to be set to
"Applications by Aid" in the jaxb-generated code, but all values stay to
what was set in "BaseAttributeValueType".
Any ideas would be greatly appreciated.
ilya
--------------
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="apv-target-context-01"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:apv="apv-target-context-01"
elementFormDefault="unqualified"
attributeFormDefault="unqualified"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
jxb:extensionBindingPrefixes="xjc"
>
<xsd:annotation>
<xsd:appinfo>
<jxb:globalBindings fixedAttributeAsConstantProperty="true">
<xjc:serializable uid="10010"/>
</jxb:globalBindings>
<jxb:schemaBindings>
<jxb:package name="apv.target.context.jaxb"/>
</jxb:schemaBindings>
</xsd:appinfo>
</xsd:annotation>
<!-- -->
<xsd:element name="TargetContext">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="apv:Resources"/>
</xsd:sequence>
<xsd:attribute name="Name" type="xsd:string" default="TargetContext"/>
</xsd:complexType>
</xsd:element>
<!-- -->
<!-- base type -->
<xsd:complexType name="BaseAttributeValueType">
<xsd:sequence>
<xsd:any namespace="amp-target-bindings-01" processContents="lax"
minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="Binding" type="xsd:NMTOKEN"/>
<xsd:attribute name="Name" type="xsd:string" default="Attribute"/>
<xsd:attributeGroup ref="apv:ValueEditableAttributeGroup"/>
</xsd:complexType>
<!-- -->
<xsd:element name="Resources">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="apv:ResourceGroupList" minOccurs="1"
maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="Name" type="xsd:string" default="Resources"/>
</xsd:complexType>
</xsd:element>
<!-- -->
<xsd:element name="ResourceGroupList">
<xsd:complexType>
<xsd:sequence>
<xsd:choice>
<xsd:element ref="apv:ResourceGroupList" minOccurs="0"
maxOccurs="unbounded"/>
<xsd:element ref="apv:ResourceGroup" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:choice>
</xsd:sequence>
<xsd:attributeGroup ref="apv:NameEditableAttributeGroup"/>
</xsd:complexType>
</xsd:element>
<!-- -->
<xsd:element name="ResourceGroup">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="apv:Resource" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attributeGroup ref="apv:NameEditableAttributeGroup"/>
<xsd:attribute name="PrimaryGroup" type="xsd:boolean" default="false"/>
</xsd:complexType>
</xsd:element>
<!-- -->
<xsd:element name="Resource">
<xsd:complexType>
<xsd:all>
<xsd:element ref="apv:ResourceApplicationId" minOccurs="0"
maxOccurs="1"/>
<xsd:element ref="apv:ResourceApplicationName" minOccurs="0"
maxOccurs="1"/>
</xsd:all>
<xsd:attributeGroup ref="apv:NameEditableAttributeGroup"/>
</xsd:complexType>
</xsd:element>
<!-- -->
<xsd:element name="ResourceApplicationId">
<xsd:complexType>
<xsd:complexContent>
<xsd:restriction base="apv:BaseAttributeValueType">
<xsd:attribute name="Binding" type="xsd:NMTOKEN"
fixed="ResourceApplicationIdBinding"/>
<xsd:attribute name="Name" type="xsd:string" default="Applications by
Aid"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- -->
<xsd:element name="ResourceApplicationName">
<xsd:complexType>
<xsd:complexContent>
<xsd:restriction base="apv:BaseAttributeValueType">
<xsd:attribute name="Binding" type="xsd:NMTOKEN"
fixed="ResourceApplicationNameBinding"/>
<xsd:attribute name="Name" type="xsd:string" default="Application
Name"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- -->
<xsd:attributeGroup name="NameEditableAttributeGroup">
<xsd:attribute name="Name" type="xsd:string" use="required"/>
<xsd:attribute name="Editable" type="xsd:boolean" default="false"/>
</xsd:attributeGroup>
<xsd:attributeGroup name="ValueEditableAttributeGroup">
<xsd:attribute name="Value" type="xsd:string" use="required"/>
<xsd:attribute name="Editable" type="xsd:boolean" default="false"/>
</xsd:attributeGroup>
</xsd:schema>
----------------------------
thanks in advance,
Ilya