Aron Olsen created XMLSCHEMA-48:
-----------------------------------

             Summary: How to inherit attributes down to final complex type
                 Key: XMLSCHEMA-48
                 URL: https://issues.apache.org/jira/browse/XMLSCHEMA-48
             Project: XmlSchema
          Issue Type: Question
    Affects Versions: 2.2.1
            Reporter: Aron Olsen
            Priority: Trivial
             Fix For: 2.1.1


Hi there,
I am in the scenary of traversing the out-come of reading an XSD.
I am somewhat trying to simplify the output of XMLSchema, in order to have the 
properties (elements and attributes) mapped to DB-tables (complex types) and 
DB-table-columns (mayby XSD-complex, geometries for instance or other 
DB-complex-types or XSD-simple, string, int etc.).
I am bewildered about how attributes are to be inherited down to a complex XSD 
type when deriving from another XSD-type by restriction. As I have learned so 
far, all attributes are to be inherited by default, as opposed to 
element-properties of the base-type.
Is this rightly understood by me?
In my simplified model I keep track of the base-type hierarchy, and how the 
inheritance is defined (extension, restriction, final). For each level I have 
tracked all the attributes of each complex type. Do I need to "collect" 
base-type attributes not referenced in a current complex type, when the current 
complex type is deriving from a super-type by restriction?
In other words: Do XmlSchema do any automic inheritance derivations "behind the 
scenes", or do we have to do such on our own behalf?
As you will understand: If XmlSchema is not doing the attribute-inheriting for 
me, I have to do it my self. This will involve "inherit all attributes from 
base-type which is not mentioned in current type".
Hope my question is understandable: How to inherit attributes when extending by 
restriction.
/Aron




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to