[xsd-users] Specifying Element content for "anyType" Elements

Jan Klimke jan.klimke at hpi.uni-potsdam.de
Tue Sep 9 12:36:45 EDT 2008


Hello,

after generating the c++/tree classes for GML to use them with a
WebFeatureService i ran into problems building request structures which
contain anyType'ed elements.

An example:

I need an instance of the following "PropertyName"-element:

<xsd:element name="PropertyName" type="ogc:PropertyNameType"
substitutionGroup="ogc:expression"/>

<xsd:complexType name="PropertyNameType">
      <xsd:complexContent mixed="true">
         <xsd:extension base="ogc:ExpressionType"/>
      </xsd:complexContent>
   </xsd:complexType>

<xsd:complexType name="ExpressionType" abstract="true"/>

<xsd:element name="expression" type="ogc:ExpressionType" abstract="true"/>

There where no methods generated to set the contents of such an element.
And a DOM node does not exist when the structure is assambled (to set
the elements content there).

How can i manage to set the contents ?



Another problem i have is the there are not classes genereated for some
elements (and their types).

  <xsd:element name="Not"  type="ogc:UnaryLogicOpType"
substitutionGroup="ogc:logicOps"/>

<xsd:complexType name="UnaryLogicOpType">
      <xsd:complexContent>
         <xsd:extension base="ogc:LogicOpsType">
            <xsd:sequence>
               <xsd:choice>
                  <xsd:element ref="ogc:comparisonOps"/>
                  <xsd:element ref="ogc:spatialOps"/>
                  <xsd:element ref="ogc:logicOps"/>
               </xsd:choice>
            </xsd:sequence>
         </xsd:extension>
      </xsd:complexContent>
   </xsd:complexType>


Because of classes where only generated for Types i am not able to
create an <Not> element. Is it possible to force the creation of this
kind of element ?


Thank you for your help,
Jan Klimke




More information about the xsd-users mailing list