[xsd-users] Q: how to fill out any_sequence
Xie, Chunying
cxie at qti.qualcomm.com
Mon Sep 8 16:49:20 EDT 2014
Hi, Boris:
I got your email from my colleague Ravi (raviraja at qti.qualcomm.com<mailto:raviraja at qti.qualcomm.com>), who contacted you earlier this year. I have xsd from RFC 4575 for conference event. In the user-type part, there is a user-defined element after endpoint that I need to fill in. The xsd looks like the following. The element name is "etype" with value as string value.
<xs:complexType name="user-type">
<xs:sequence>
<xs:element name="display-text" type="xs:string"
minOccurs="0" />
<xs:element name="associated-aors" type="uris-type"
minOccurs="0" />
<xs:element name="roles" type="user-roles-type" minOccurs="0" />
<xs:element name="languages" type="user-languages-type"
minOccurs="0" />
<xs:element name="cascaded-focus" type="xs:anyURI"
minOccurs="0" />
<xs:element name="endpoint" type="endpoint-type"
minOccurs="0" maxOccurs="unbounded" />
<xs:any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="entity" type="xs:anyURI" />
<xs:attribute name="state" type="state-type" use="optional"
default="full" />
<xs:anyAttribute namespace="##other" processContents="lax" />
I had a lot of trouble filling in this field once it is translated into C++ code as the following:
typedef ::xsd::cxx::tree::element_sequence any_sequence;
typedef any_sequence::iterator any_iterator;
typedef any_sequence::const_iterator any_const_iterator;
const any_sequence&
any () const;
any_sequence&
any ();
void
any (const any_sequence& s);
Per definition, the it can be any element from any namespace if I am not mistaken. Do I need to create a new namespace for this new element. How I am to fill in any_sequence/element_sequence. I am wondering if you have some sample code that I can mirror with, since I have been googling around without finding anything useful.
Really appreciate your help.
Chunying Xie
Qualcomm Inc
5775 Morehouse Drive
San Diego, CA 92121
More information about the xsd-users
mailing list