ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <bimargul...@gmail.com>
Subject Re: xmlschema help
Date Wed, 17 Nov 2010 22:19:59 GMT
Sandy,

You are correct that XMLSchema won't help you here. It is more
focussed on reading, editing, and writing schemas, and not on analysis
of their contents.

--benson


On Wed, Nov 17, 2010 at 4:51 PM, Mustard, Sandy
<sandy.mustard@siemens.com> wrote:
> Benson,
>
>
>
> Sorry to trouble you.  I have looked at the xmlschema project and was
> wondering if there is a simple way to have it do what I need.
>
>
>
> My schema is basically a set of complex types that have a complex content
> with an extension of a parent complex type and associated attributes.  I
> want to get a list of all attributes for a complex type that includes those
> attributes defined on the complex type and includes all attributes that are
> defined on any parent extension complex type.   I want to flatten the
> ‘inheritance’.  So if I have this:
>
>
>
>    <xsd:complexType name="my_object">
>
>       <xsd:complexContent>
>
>          <xsd:extension base=" object">
>
>             <xsd:attribute name="owning_user" type="xsd:anyURI"
> use="optional"/>
>
>             <xsd:attribute name="creation_date" type=" xsd:dateTime "
> use="optional"/>
>
>          </xsd:extension>
>
>       </xsd:complexContent>
>
>    </xsd:complexType>
>
> <xsd:complexType name=" object">
>
>       <xsd:complexContent>
>
>          <xsd:extension base="base">
>
>             <xsd:attribute name="timestamp" type="xsd:string"
> use="optional"/>
>
>          </xsd:extension>
>
>       </xsd:complexContent>
>
>    </xsd:complexType>
>
>    <xsd:complexType name=" base ">
>
>             <xsd:attribute name="elemId" type="xsd:string" use="required"/>
>
>     </xsd:complexType>
>
>
>
> I want to output
>
>
>
>    <xsd:complexType name="my_object">
>
>       <xsd:complexContent>
>
>             <xsd:attribute name="elemId" type="xsd:string" use="required"/>
>
>             <xsd:attribute name="timestamp" type="xsd:string"
> use="optional"/>
>
>             <xsd:attribute name="owning_user" type="xsd:anyURI"
> use="optional"/>
>
>             <xsd:attribute name="creation_date" type=" xsd:dateTime "
> use="optional"/>
>
>       </xsd:complexContent>
>
>    </xsd:complexType>
>
>
>
> I could not find any APIs that will collect all the ‘inherited’ attributes.
> Is there something that would do that for me?  If not, can you suggest a
> solution?  Is this a proper use of xmlschema or should something else be
> used?
>
>
>
> Thank you,
>
> Sandy Mustard
>
>

Mime
View raw message