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

Re: use transformator to add nodes to the xml stucture

Subject: Re: use transformator to add nodes to the xml stucture
From: henry human <henry_human@xxxxxxxx>
Date: Mon, 15 Dec 2008 21:56:39 +0100 (CET)
Re:  use transformator to add nodes to the xml stucture
thanks.


Does it possible to create the template as showing in
the pseudo code:
 <xsl:template match="Sales">
    <Sales>
    //if SalesId exists than
     <xsl:copy-of select="SalesId"/>
    //else 				
     <SalesId></SalesId>
      <Car>
        //if mileage exists than
	 <xsl:copy-of select="Mileage"/>
	//else 
	<Mileage></Mileage>
	//if Description exists than
	<xsl:copy-of select="Description"/>
	//else
	<Descriptio></Description>
	//if discount exist than  
	<xsl:copy-of select="Discount" />
        //else 
        <Discount currency=""></Discount>
      </Car>
    </Sales>
  </xsl:template> 
  
  and Have the Result like this  
    <Sales>
        <SalesId>1</SalesId>
       <Currency>YEN</Currency>

      <Car>
        <Mileage></Mileage>
        <Description></Description>
        <Discount currency=""></Discount>
      </Car>
    </Sales>

?




--- Jesper Tverskov <jesper.tverskov@xxxxxxxxx>
schrieb:

> > Do you use a xslt processor (f.i. saxon) to create
> the
> > output.xml?
> 
> Yes, any XSLT processor will do but go for an XSLT
> 2.0 processor like
> Saxon is possible.
> 
> Cheers,
> Jesper Tverskov

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.