1

I've been looking for similar issue but did not find.

I have an XML file that looks like this :

<Deed DeedStatus="N" 
CompanyName="Test Value"
xmlns="schemas/deedv2"> 

and the deedv2 XSD :

<xs:simpleType name="DeedStatusType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="N">
                <xs:annotation>
                    <xs:documentation>
                        Testingg
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
        </xs:restriction>
    </xs:simpleType>

I'm trying to use convert the "N" value to appear as "Testing" in another XML. Is there a way I can do this without writing code? Thank you in advance.

1 Answers1

0

No, XML and XSD cannot generate another XML file.

XSLT is the XML standard for transforming XML and would be ideal for generating an XML file based upon an input XML file and the contents of xs:annotation/xs:documentation in an XSD.

For an example of opening in XSLT two XML files (your XML plus your XSD, which is itself XML), see @michael.hor257k's answer to this question: How to merge two xml files using xslt generating text output.

kjhughes
  • 106,133
  • 27
  • 181
  • 240