When I use the following schema with generateDS 2.10b:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:com:gends:test:gen-ds-sample"
xmlns="urn:com:gends:test:gen-ds-sample"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="2012-06-06"
xml:lang="en"
xmlns:gen-ds-sample="urn:com:gends:test:gen-ds-sample">
<xs:element name="gen-ds-sample">
<xs:complexType>
<xs:sequence>
<xs:element name="username" type="Username">
<xs:annotation>
<xs:documentation>
The user's login name. Modification of this
field is not allowed. A domain and username combination uniquely
identifies a user.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="first-name" minOccurs="0"
type="FirstName">
<xs:annotation>
<xs:documentation>
The user's first name. Mandatory for local
users, but optional for enterprise users.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="Username">
<xs:restriction base="t0">
<xs:minLength value="1"/>
<xs:maxLength value="256"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="FirstName">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="256"/>
</xs:restriction>
</xs:simpleType>
<!-- locally generated simpleType helpers -->
<xs:simpleType name="t0">
<xs:restriction base="xs:string">
<xs:pattern value="[^:]*"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
when I use the export() function I get this:
<gen-ds-sample:gen-ds-sample>
<gen-ds-sample:username>test</gen-ds-sample:username>
<gen-ds-sample:first-name>first-name</gen-ds-sample:first-name>
</gen-ds-sample:gen-ds-sample>
However, when I use the following schema instead:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:com:gends:test:gen-ds-sample"
xmlns="urn:com:gends:test:gen-ds-sample"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="2012-06-06"
xml:lang="en"
xmlns:gen-ds-sample="urn:com:gends:test:gen-ds-sample">
<xs:annotation>
<xs:appinfo>
<jxb:globalBindings>
<xjc:simple />
</jxb:globalBindings>
</xs:appinfo>
</xs:annotation>
<xs:element name="gen-ds-sample" type="GenDsSample"/>
<xs:complexType name="GenDsSample">
<xs:sequence>
<xs:element name="username" type="Username">
<xs:annotation>
<xs:documentation>
The user's login name. Modification of this field is not
allowed. A domain and username combination uniquely identifies a user.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="first-name" minOccurs="0" type="FirstName">
<xs:annotation>
<xs:documentation>
The user's first name. Mandatory for local users, but
optional for enterprise users.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="Username">
<xs:restriction base="t0">
<xs:minLength value="1"/>
<xs:maxLength value="256"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="FirstName">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="256"/>
</xs:restriction>
</xs:simpleType>
<!-- locally generated simpleType helpers -->
<xs:simpleType name="t0">
<xs:restriction base="xs:string">
<xs:pattern value="[^:]*"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
I get this:
<gen-ds-sample:GenDsSample>
<gen-ds-sample:username>test</gen-ds-sample:username>
<gen-ds-sample:first-name>first-name</gen-ds-sample:first-name>
</gen-ds-sample:GenDsSample>
These schemas are equivalent. The root element on the first one is using an
anonymous complext type where the root element on the second one is using a
named complex type. I get different XML using export(). I would expect
this to be consistent.
George
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users