Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
| Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 24th, 2006, 06:44 AM
Authorized User
 
Join Date: Jan 2006
Location: tel aviv, israel, Israel.
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default xslt basic question

this is my input xml file
<entity key="Client IP">
            <launching>
                <parameters>
                    <values>
                        <value parameter-name="launched-product-code" parameter-value="IS"/>
                        <value parameter-name="apptier-id" parameter-value="!~apptier_id!~"/>

                    </values>
                </parameters>
            </launching>
        </entity>

and I want my output to be
<entity key="Client IP">
            <launching>
                <parameters>
                    <values>
                        <value parameter-name="launched-product-code" parameter-value="IS"/>
                        <value parameter-name="timeFrame" parameter-value="!~timeframe!~"/>

                    </values>
                </parameters>
            </launching>
        </entity>

how do I write in in xsl format?
thanks

 
Old January 25th, 2006, 05:28 AM
Authorized User
 
Join Date: Oct 2005
Location: , , Philippines.
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default

what do you mean? do you want to transform this xml code?

 
Old January 25th, 2006, 02:48 PM
Authorized User
 
Join Date: Nov 2004
Location: , , .
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to jkmyoung
Default

<xsl:template match="value[@parameter-name='apptier-id']">
  <xsl:copy>
    <xsl:attribute name="parameter-name">timeFrame</xsl:attribute>
    <xsl:attribute name="parameter-value">!~apptier_id!~</xsl:attribute>
  </xsl:copy>
</xsl:template>

<xsl:template match="*|@*">
  <xsl:copy>
    <xsl:apply-templates/>
  </xsl:copy>
</xsl:template>





Similar Threads
Thread Thread Starter Forum Replies Last Post
help, basic xslt Yanson XSLT 4 June 19th, 2007 06:45 AM
Please HELP Very Basic Question jkoe578 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 November 18th, 2006 10:06 AM
basic xslt Question abhishek verma XSLT 4 January 24th, 2006 05:35 AM
basic question but..... Adam H-W Javascript How-To 2 February 10th, 2004 01:24 PM
Basic XSLT problem.... johrik XSLT 2 February 6th, 2004 09:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.