Subject: xslt assistance please From: "Azariah Jeyakumar" <azariah.jeyakumar@xxxxxxxxxxxxxx> Date: Fri, 13 Oct 2000 11:24:18 -0700 |
Hi, Would someone help me get started with XSLT? I need to transform 1.xml to 2.xml. Thanks a lot Azariah 1.xml -------- <root> <AccountBaseDescriptorType> <element name="Name" type="string" minOccurs="0" /> <element name="Medium" type="string" minOccurs="0" /> <element name="Address" type="string" minOccurs="0" /> <element name="Id" type="Integer64" minOccurs="0" /> <element name="remaining" type="string" minOccurs="0" /> </AccountBaseDescriptorType> <AccountCreatableDescriptorType base="AccountBaseDescriptorType" > <mandatory> <Name/> <Address/> </mandatory> <prohibited> <Id/> </prohibited> <defaults> <Medium value="TW_MEDIUM_SMTP_HTTP"/> </defaults> </AccountCreatableDescriptorType> <AccountDescriptorType base="AccountBaseDescriptorType" > <mandatory fields="ALL"> </mandatory> </AccountDescriptorType> </root> 2.xml -------- <complexType name="AccountBaseDescriptorType"> <all> <element name="Name" type="string" minOccurs=0 /> <element name="Medium" type="string" minOccurs=0 /> <element name="Address" type="string" minOccurs=0 /> <element name="Id" type="Integer64" minOccurs=0 /> <element name="remaining" type="string" minOccurs=0 /> </all> </complexType> <complexType name="AccountCreatableDescriptorType" base="AccountBaseDescriptorType" derivedBy="restriction" > <all> <element name="Name" type="string" minOccurs=1 /> <element name="Medium" type="string" use="default" value="TW_MEDIUM_SMTP_HTTP" /> <element name="Address" type="string" minOccurs=1 /> <element name="Id" type="Integer64" minOccurs=0 maxOccurs=0 /> <element name="remaining" type="string" minOccurs=0 /> </all> </complexType> <complexType name="AccountDescriptorType" base="AccountBaseDescriptorType" derivedBy="restriction" > <all> <element name="Name" type="string" minOccurs=1 /> <element name="Medium" type="string" minOccurs=1 /> <element name="Address" type="string" minOccurs=1 /> <element name="Id" type="Integer64" minOccurs=1 /> <element name="remaining" type="string" minOccurs=1 /> </all> </complexType> PS1: My goal is to generate 2.xml. So, it is OK to restructure 1.xml to make the transformation easier-to-write. PS2: Performance is not a consideration for the transformation. PS3: The element names "Account...DescriptorType" should not be hard-coded in the .xsl file. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Fw: Dynamic stilesheet assignement, Benoit Cerrina | Thread | Re: xslt assistance please, Lee Goddard |
RE: Dynamically selecting Attribute, Jeff Saylor | Date | RE: NEWBY QUESTION : multiple html , sara . mitchell |
Month |