The following example illustrates how to condense an existing XPCML document. The example includes original XPCML source, the resulting condensed XPCML, and the extended schema.
<?xml version="1.0" encoding="UTF-8"?> <xpcml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xpcml.xsd" version="4.0"> <program name="prog1" path="/QSYS.LIB/W95LIB.LIB/PROG1.PGM"> <parameterList> <stringParm name="parm1" passDirection="in" passMode="value" minvrm="V5R2M0" ccsid="37" length="10">Value 1</stringParm> </parameterList> </program> </xpcml>
<?xml version="1.0" encoding="UTF-8"?> <xpcml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="myXSD.xsd" version="4.0"> <program name="prog1" path="/QSYS.LIB/W95LIB.LIB/PROG1.PGM"> <parameterList> <parm1_>Value 1</parm1_> </parameterList> </program> </xpcml>
<!-- parm1's XSD definition --> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'> <!-- Link back to XPCML.xsd --> <xs:include schemaLocation='xpcml.xsd'/> <xs:element name="parm1_" substitutionGroup="stringParmGroup" > <xs:complexType> <xs:simpleContent> <xs:restriction base="stringParmType"> <!-- Attributes defined for parm1 --> <xs:attribute name="name" type="string50" fixed="parm1" /> <xs:attribute name="length" type="xs:string" fixed="10" /> <xs:attribute name="passMode" type="xs:string" fixed="value" /> <xs:attribute name="ccsid" type="xs:string" fixed="37" /> <xs:attribute name="minvrm" type="xs:string" fixed="V5R2M0" /> </xs:restriction> </xs:simpleContent> </xs:complexType> </xs:element> </schema>