Sign Up
Search
Options
search
Chat
Help
News
Log in
Not Logged in
Home
»
Boards
»
Stylus Studio Developer Network
»
XSLT Help and Discussion
»
change some element based on another
Topic
Topic Page
1
2
3
4
5
6
7
8
9
Prev Topic
Next Topic
next
Subject:
change some element based on another
Author:
hardik mehta
Date:
21 Nov 2006 05:39 AM
Hi all,
I am writing an xsl to change password based on a group. I am developing and automated testing tool for our system.
The test is an xml file like following:
<HTTPRequestSequence>
<vendid>254662</vendorid>
<flowtype>01</flowtype>
<userid>ssded</userid>
<pass>user234</pass>
<some other elements>
.....
......
.....
</some other elements>
</HTTPRequestSequence>
not I want to change passs word based on the the flowtype.
how should the xsl look like ? any answer would be helpful.
regards,
Hardik
next
Subject:
change some element based on another
Author:
hardik mehta
Date:
21 Nov 2006 05:48 AM
Originally Posted: 21 Nov 2006 05:47 AM
what I have done is following.
<xsl:template match="pass">
<xsl:variable name="flow">
<xsl:value-of select="/HTTPRequestSequence/flowtype" />
</xsl:variable>
<xsl:choose>
<xsl:when test="$flow='01'">
<xsl:text>new pass</xsl:text>
</xsl:when>
<xsl:when test="some other tests">
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
but this doesnt work.
next
Subject:
change some element based on another
Author:
Ivan Pedruzzi
Date:
21 Nov 2006 07:10 AM
<xsl:variable name="flow" select="../flowtype"/>
Ivan Pedruzzi
Stylus Studio Team
http://www.stylusstudio.com/xml_download.html
top
Subject:
change some element based on another
Author:
hardik mehta
Date:
21 Nov 2006 09:11 AM
thanks, now it is working.
I cant understand what was wrong with absolute path ?
anyway. thanks,
Hardik
Topic Page
1
2
3
4
5
6
7
8
9
Prev Topic
Next Topic
Powered by
Stylus Studio
, the world's leading
XML IDE
for
XML
,
XSLT
,
XQuery
,
XML Schema
,
DTD
,
XPath
,
WSDL
,
XHTML
,
SQL/XML
, and
XML Mapping
!
Go to Conference:
Select Conference
Stylus Studio Feature Requests
Stylus Studio Technical Forum
Website Feedback
XSLT Help and Discussion
XQuery Help and Discussion
Stylus Studio FAQs
Stylus Studio Code Samples & Utilities
Stylus Studio Announcements
go
Log In Options
Username:
Password:
Site Map
|
Privacy Policy
|
Terms of Use
|
Trademarks
Stylus Scoop XML Newsletter:
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.