Hi there,
Say I have the following XML
<?xml version="1.0" encoding="utf-8"?>
<Person>
<FirstName>Bjorn</FirstName>
<LastName>Ellis-Gowland</LastName>
</Person>
That is 'governed' by the following XSD (XML Schema)
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Person">
<xs:complexType>
<xs:all>
<xs:element name="FirstName" type="xs:string" />
<xs:element name="LastName" type="xs:string" />
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
I also have a XSD that is as follows
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="AnonymousPerson">
<xs:complexType>
<xs:all>
<xs:element name="FirstNameInitial">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="1" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="LastNameInitial">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="1" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
My initial Person.xsd XML can be transformed into a state that is valid for my AnonymousPerson.xsd.
How do I define this transformation of valid Person.xsd XML data to AnonymousPerson.xsd XML data?
Thanks!!!!!