You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by "Jones, Monte J CTR USAF AFSPC SLG/WML" <Mo...@Peterson.af.mil> on 2009/11/20 16:27:06 UTC

Parsing User Defined Data Types

I am attempting to parse an XML with user defined data types.  I am
using these because some of these data types appear in multiple places
in the XML document.  For example one of the types I have is a location
which is defined as indicated below.  I use this for many assets, each
with different other parameters.

 

<xsd:complextType name="Location">

                <xsd:sequence>

                                <xsd:element name="Latitude">

<xsd:restriction base="xsd:float">

<xsd:minInclusive value="-90.0" />

<xsd:maxInclusive value="90.0" />

                                                </xsd:restriction>

                                </xsd:element>

                                <xsd:element name="Longitude">

<xsd:restriction base="xsd:float">

<xsd:minInclusive value="-180.0" />

<xsd:maxInclusive value="180.0" />

                                                </xsd:restriction>

                                </xsd:element>

                                <xsd:element name="Altitude">

<xsd:restriction base="xsd:float">

<xsd:minInclusive value="-300.0" />

<xsd:maxInclusive value="43000.0" />

                                                </xsd:restriction>

                                </xsd:element>

                </xsd:sequence>

</xsd:complexType>

 

The schema validates, and the problem comes in that this structure
contains no actual data, only the definitions of data.  The auto
generated -pskel and -pimpl files has shells for this, but then I am
having trouble with the use for different assets because I do not have a
defined implementation for the shell.

 

Can anyone point me in the right direction for resolving this issue.

 

 

Monte J. Jones, Contractor

Colorado Professional Resources

SMC/SLG/WMLE

1050 E Stewart Ave

Colorado Springs, CO 80914

719-556-9903

 

 


Re: Parsing User Defined Data Types

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Monte,

Jones, Monte J CTR USAF AFSPC SLG/WML <Mo...@Peterson.af.mil> writes:

> The auto generated -pskel and -pimpl files has shells for this, but then 

I am pretty sure you are using CodeSynthesis XSD[1] and it is better to
ask this kind of questions on the xsd-users[2] mailing list. Can you
please re-send your question to xsd-users@codesynthesis.com?

[1] http://www.codesynthesis.com/products/xsd/
[2] http://www.codesynthesis.com/mailman/listinfo/xsd-users

Boris

-- 
Boris Kolpackov, Code Synthesis        http://codesynthesis.com/~boris/blog
Open-source XML data binding for C++   http://codesynthesis.com/products/xsd
XML data binding for embedded systems  http://codesynthesis.com/products/xsde
Command line interface to C++ compiler http://codesynthesis.com/projects/cli