[xsde-users] Link generated parser and serializer to a wildcard
xs.any element
Andrea Tessadri
tessadriandrea at gmail.com
Tue Apr 2 05:14:34 EDT 2019
In a communication protocol I have a message description xsd containing a
payload defined as xs:any like this:
<xs:complexType name="PayloadType">
<xs:sequence>
<xs:choice>
<xs:any namespace="##other" processContents="skip" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="Compressed" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
</xs:choice>
<xs:element name="Format" type="xs:string" default="XML" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
I have also several xsd files describing how the payload should be.
Let's say one of them is a heartbeat message like this
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="quali
attributeFormDefault="unqualified" version="1.0">
<xs:include schemaLocation="BaseTypes.xsd"/>
<xs:element name="Heartbeat" type="HeartbeatType"/>
<xs:complexType name="HeartbeatType">
<xs:sequence>
<xs:element name="TimeStamp" type="ZuluDateTimeType"/>
<xs:element name="Location" type="LocationType"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
What I would like to do is to link the serializer of the heartbeat xsd to
the payload of the message when I am preparing a message carrying a
heartbeat as payload.
This case seems different from wildcard examples since I don't need to
create my own serializer for the wildcard. I just would like to bind the
already generated serial to the particular instance of the message carrying
the heartbeat.
More information about the xsde-users
mailing list