[xsd-users] CoT schema and xsd

Matt Burnham mwburn at mhpcc.hpc.mil
Tue Jun 27 17:47:06 EDT 2006


We are using xsd (version 1.9.0 on Windows/Linux) for several different schemas and I'm now trying to create a cxx-tree for a new schema. The schema(s) are called Cursor on Target (maintained by Mitre) so I don't own it, and can't change it (if interested you can request access at http://cot.mitre.org/).  First off, has anyone else used xsd to create a cxx-tree for these schemas?  If so how did they resolve the issues i'm having?

I get the following warnings:

event.xsd:568:19: warning: '(anonymous type for (anonymous type for event)/point)' is used to classify 2 attributes/elements:
event.xsd:567:27: warning: 'point', which is defined here
event.xsd:35:30: warning: 'point', which is defined here
event.xsd:568:19: warning: this may result in excessive code duplication
event.xsd:568:19: info: consider explicitly naming this type
event.xsd:568:19: info: or use --morph-anonymous option

It still generates code, but produces error when compiling, so I use the --morph-anonymous option it gets rid of the warnings, but my resulting code still get the following compiler errors:

event.hxx(706) : error C2039: 'type_' : is not a member of 'xsd::cxx::tree::type'
D:\tools\xsd-1.9.0-i686-windows\libxsd\xsd\cxx\tree\elements.hxx(110) : see declaration of 'xsd::cxx::tree::type'
event.hxx(706) : error C2143: syntax error : missing ';' before 'const'
event.hxx(706) : error C2501: 'event::_xsd_event_::event::type_' : missing storage-class or type specifiers
event.hxx(709) : error C2039: 'type_' : is not a member of 'xsd::cxx::tree::type'

I believe it has something to do the schema containing the following "type" attribute:

<xs:attribute name="type" use="required">
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:pattern value="\w+(-\w+)*(;[^;]*)?" />
    </xs:restriction>
  </xs:simpleType>
</xs:attribute>





More information about the xsd-users mailing list