[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: How do you this XML document to this other one (DTD to D

Subject: RE: How do you this XML document to this other one (DTD to DTD)
From: Francois_Deza@xxxxxxxxxx
Date: Thu, 29 Apr 1999 11:08:08 +0100
dtd to dtd

Ed,

thanks for the solution.
It looks like i am going to have only one template in the stylesheet.
The one for the root you gave to me.
I wonder if it makes sense to use XSL as a data reformatter in thix
context.
I mean this is not modular.
The problem here is that i have to populate a output data structure from an
input data structure.

Do you think  it makes sense to use XSL as a data reformatter in thix
context?
Francois





Ed Simon <ed.simon@xxxxxxxxxxx> on 04/28/99 11:41:08 PM

Please respond to xsl-list@xxxxxxxxxxxxxxxx

To:   "'xsl-list@xxxxxxxxxxxxxxxx'" <xsl-list@xxxxxxxxxxxxxxxx>
cc:    (bcc: Francois Deza/AMS/AMSINC)
Subject:  RE: How do you this XML document to this other one (DTD to DTD)




When applied to the input XML in your message, this stylesheet

<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"
  indent-result="yes"
  result-ns="">

<xsl:template match="/">
     <IndCompleteOrderForm>

          <Surname><xsl:value-of
select="PRODUCT_FORM/IND_SURNAME"/></Surname>

          <IndCustomer>
               <BirthDate><xsl:value-of
select="PRODUCT_FORM/IND_BIRTHDATE"/></BirthDate>
          </IndCustomer>

          <PrimAddress>
               <StreetName><xsl:value-of
select="PRODUCT_FORM/PRIMARY_ADDR_STREET_NAME"/></StreetName>
               <StreetNumber><xsl:value-of
select="PRODUCT_FORM/PRIMARY_ADDR_STREET_NUMBER"/></StreetNumber>
          </PrimAddress>

     </IndCompleteOrderForm>
</xsl:template>

</xsl:stylesheet>

produces

<IndCompleteOrderForm>
     <Surname>Deza</Surname>

     <IndCustomer>
          <BirthDate>13-11-63</BirthDate>
     </IndCustomer>

     <PrimAddress>
          <StreetName>Am Seestern</StreetName>
          <StreetNumber>444</StreetNumber>
     </PrimAddress>
</IndCompleteOrderForm>

which is the result you were looking for.

Ed

-----Original Message-----
From: Francois_Deza@xxxxxxxxxx [mailto:Francois_Deza@xxxxxxxxxx]
Sent: April 28, 1999 5:14 PM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: How do you this XML document to this other one (DTD to DTD)




How do you map this thru a XSL stylesheet

Input XML:

<PRODUCT_FORM>
     <IND_SURNAME>Deza</IND_SURNAME>
     <IND_BIRTHDATE>13-11-63</IND_BIRTHDATE>
     <PRIMARY_ADDR_STREET_NAME>Am Seestern</PRIMARY_ADDR_STREET_NAME>
     <PRIMARY_ADDR_STREET_NUMBER>444</PRIMARY_ADDR_STREET_NUMBER>
</PRODUCT_FORM>


to this

Output XML:

<IndCompleteOrderForm>

     <Surname>Deza</Surname>

     <IndCustomer>
          <BirthDate>13-11-63</BirthDate>
     </IndCustomer>

     <PrimAddress>
          <StreetName>Am Seestern</StreetName>
          <StreetNumber>444</StreetNumber>
     </PrimAddress>

</IndCompleteOrderForm>


As you can see data are shuffled and restructured. From a tree of depth1 we
 go to a tree of irregular depth.

Francois



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list







 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.