TOC PREV NEXT INDEX


XSD Simple Type to C/C++ Type Mappings


XSD built-in simple type declarations are mapped directly to C types defined in the osSysTypes.h run-time header file. The general mapping of each XSD simple type to a C type is as follows:
XSD Built-In Type
C Type (in osSysTypes)
C Type (base)
anyURI
OSXMLSTRING
unsigned char*
anyType
OSXSDAnyType
struct
base64Binary
OSDynOctStr
struct
boolean
OSBOOL
unsigned char
byte
OSINT8
char
date
OSXMLSTRING
unsigned char*
dateTime
OSXMLSTRING
unsigned char*
decimal
OSREAL
double
double
OSREAL
double
duration
OSXMLSTRING
unsigned char*
ENTITIES
OSRTDList
linked list struct
ENTITY
OSXMLSTRING
unsigned char*
float
OSREAL
double
gDay
OSXMLSTRING
unsigned char*
gMonth
OSXMLSTRING
unsigned char*
gMonthDay
OSXMLSTRING
unsigned char*
gYear
OSXMLSTRING
unsigned char*
gYearMonth
OSXMLSTRING
unsigned char*
hexBinary
OSDynOctStr
struct
ID
OSXMLSTRING
unsigned char*
IDREF
OSXMLSTRING
unsigned char*
IDREFS
OSRTDList
linked list struct
integer
OSINT32
int
int
OSINT32
int
language
OSXMLSTRING
unsigned char*
long
OSINT64
long (64-bit integer type)
Name
OSXMLSTRING
unsigned char*
NCName
OSXMLSTRING
unsigned char*
negativeInteger
OSINT32
int
NMTOKEN
OSXMLSTRING
unsigned char*
NMTOKENS
OSRTDList
linked list struct
nonNegativeInteger
OSUINT32
unsigned int
nonPositiveInteger
OSINT32
int
normalizedString
OSXMLSTRING
unsigned char*
positiveInteger
OSUINT32
unsigned int
short
OSINT16
short
string
OSXMLSTRING
unsigned char*
time
OSXMLSTRING
unsigned char*
token
OSXMLSTRING
unsigned char*
unsignedByte
OSUINT8
unsigned char
unsignedShort
OSUINT16
unsigned short
unsignedInt
OSUINT32
unsigned int
unsignedLong
OSUINT64
unsigned long (64-bit)


For C++, class wrappers are added around each of these types when they are used in simple type declarations. In most cases, these classes contain a single public member variable called value that holds the value of the type. They also contain a constructor and assignment operator for setting the value.
The following sections provide more detail on these mappings.

Copyright © Objective Systems 2002-2008
This document may be distributed in any form, electronic or otherwise, provided that it is distributed in its entirety and that the copyright and this notice are included.

Objective Systems, Inc.

55 Dowlin Forge Road
Exton, Pennsylvania 19341
http://www.obj-sys.com
Phone: (484) 875-9841
Toll-free: (877) 307-6855 (US only)
Fax: (484) 875-9830
info@obj-sys.com

TOC PREV NEXT INDEX