Hi,
Thanks for your response Lawrence. I had a look at my own schema and .xsdconfig
and the elements
which I am generating alternative java names for do NOT have a global type
declared with a same
name (as the element). In case you want to take a look I've attached the
schema, a sample instance
document, and the .xsdconfig to this mail.
One of the elements I'm aliasing is <service-type>. The only slightly unusual
thing about this is
that a <service-type> can contain other <service-type> elements. However, I
cannot find anything
at all unusual about the other elements I'm aliasing, <monitored-property>.
Best Wishes,
DM
___________________________________________________________
NEW Yahoo! Cars - sell your car and browse thousands of new and used cars
online! http://uk.cars.yahoo.com/<!-- An xsdconfig file must begin with a "config" element in the
http://www.bea.com/2002/09/xbean/config namespace. Also, be sure
to declare any namespaces used to qualify types in your schema -->
<xb:config xmlns:sth="http://www.capetechnologies.com/ro/ServiceTypeHierarchy"
xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
<!-- Use the "qname" element to map schema type names to generated
Java type names. In these examples, the name attribute's value is the
XML element name; the javaname attribute's value is the Java type
that should be generated. -->
<xb:qname name="sth:service-type" javaname="ServiceTypeXml"/>
<xb:qname name="sth:monitored-property"
javaname="MonitoredPropertyXml"/>
</xb:config>
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="http://www.capetechnologies.com/ro/ServiceTypeHierarchy" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.capetechnologies.com/ro/ServiceTypeHierarchy" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
<xs:annotation>
<xs:documentation>Service types, their hierarchical relationship, and supported monitored properties</xs:documentation>
</xs:annotation>
<xs:element name="service-type-hierarchy">
<xs:complexType>
<xs:sequence>
<xs:element name="mp-groups">
<xs:complexType>
<xs:sequence>
<xs:element ref="mp-group" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- Enforce uniqueness of mp-group.id attribute within mp-groups -->
<xs:key name="mp-group-pk">
<xs:selector xpath="mp-group"/>
<xs:field xpath="@id"/>
</xs:key>
</xs:element>
<xs:element name="service-types">
<xs:complexType>
<xs:sequence>
<xs:element ref="service-type" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- Enforce uniqueness of service-type.id attribute within service-types -->
<xs:key name="service-type-pk">
<xs:selector xpath=".//service-type"/>
<xs:field xpath="@id"/>
</xs:key>
</xs:element>
</xs:sequence>
<xs:attribute name="customer" type="xs:string" use="optional"/>
</xs:complexType>
<!-- Ensure that each mp-group-ref attribute is a proper foreign key to mp-group.id -->
<xs:keyref name="mp-group-fk" refer="mp-group-pk">
<xs:selector xpath=".//service-type"/>
<xs:field xpath="@mp-group-ref"/>
</xs:keyref>
</xs:element>
<!-- Global types start here -->
<xs:element name="monitored-property">
<xs:complexType>
<xs:attribute name="key" type="xs:string" use="required"/>
<xs:attribute name="label" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="service-type">
<xs:complexType>
<xs:sequence>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element ref="service-type" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="required"/>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="mp-group-ref" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="mp-group">
<xs:complexType>
<xs:sequence>
<xs:element ref="monitored-property" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="required"/>
</xs:complexType>
<!-- Enforce uniqueness of monitored-property.key attribute within a mp-group -->
<xs:key name="monitored-property-in-group-key">
<xs:selector xpath="monitored-property"/>
<xs:field xpath="@key"/>
</xs:key>
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<service-type-hierarchy customer="VFUK" xmlns="http://www.capetechnologies.com/ro/ServiceTypeHierarchy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.capetechnologies.com/ro/ServiceTypeHierarchy sth_1.xsd">
<!-- Monitored Property Groups -->
<mp-groups>
<mp-group id="cddv">
<monitored-property key="count" label="count"/>
<monitored-property key="duration" label="duration"/>
<monitored-property key="data" label="data"/>
<monitored-property key="value" label="value"/>
</mp-group>
<mp-group id="cv">
<monitored-property key="count" label="count"/>
<monitored-property key="value" label="value"/>
</mp-group>
<mp-group id="cdv">
<monitored-property key="count" label="count"/>
<monitored-property key="duration" label="duration"/>
<monitored-property key="value" label="value"/>
</mp-group>
</mp-groups>
<!-- Service Types -->
<service-types>
<!-- root service type -->
<service-type id="ST_084" name="SMS" mp-group-ref="cv">
<description>My favourite service type</description>
<service-type id="ST_085" name="PrePaid SMS Mobile Originating" mp-group-ref="cv">
<description>Another service type</description>
</service-type>
<service-type id="ST_086" name="PostPaid SMS Mobile Originating" mp-group-ref="cv"/>
</service-type>
<!-- root service type -->
<service-type id="ST_048" name="Mobile Voice" mp-group-ref="cv">
<service-type id="ST_049" name="Postpaid SMS Mobile Terminating" mp-group-ref="cdv">
<service-type id="ST_026" name="Foreign Roaming Mobile Terminating" mp-group-ref="cdv"/>
</service-type>
</service-type>
<!-- root service type -->
<service-type id="ST_090" name="Data" mp-group-ref="cddv">
<service-type id="ST_091" name="West Ham Video Clips" mp-group-ref="cdv"/>
</service-type>
</service-types>
</service-type-hierarchy>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]