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

Re: Knowing node name in order to test

Subject: Re: Knowing node name in order to test
From: "cutlass" <cutlass@xxxxxxxxxxx>
Date: Mon, 3 Sep 2001 08:20:19 +0100
xml if test node name
try using the name() which gets u the current element name ( or from
whatever position in your XPATH ).

ex.
name()='pass'


cheers, jim fuller



----- Original Message -----
From: "Carlos Fragoso Mariscal" <cfragoso@xxxxxxxx>
To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, September 03, 2001 12:53 AM
Subject:  Knowing node name in order to test


> Hi!
>
> I have got a pair of questions related
> to a web application that translates
> xml to html/wml on demand.
>
> origin.xml
>
> It's a kind of form where parameters/* are
> the input text of the form. Id is the name
> identifier of the input text and value its
> default value. Name tag defines the description
> of the input text.
>
> <parameters>
>    <user id="user">
>       <name>UserName:</name>
>       <value></value>
>    </user>
>    <pass id="password">
>       <name>Password:</name>
>       <value></value>
>    </pass>
>    <server id="password">
>       <name>Password:</name>
>       <value></value>
>    </server>
> </parameters>
>
> Now, here you are my question:
>
> I want them to process as a
> <xsl:for-each> tag where user
> and server should have attribute
> type to text and pass to
> password.
>
> When I'm processing an element
> user, server or pass, how can I
> test the tag name against a string?




>
> current tag name = 'pass' ?!?!
>
> transformation.xsl
>
>    <xsl:template match='authentication/parameters'>
>       <xsl:for-each select='user|pass|server'>
>          <font face="Courier New, Courier, mono" size="2">
>             <b><xsl:value-of select='name'/></b>
>          </font>
>          <br/>
>          <xsl:call-template name='inputText'>
>             <xsl:with-param name='id'>
>                <xsl:value-of select='@id'/>
>             </xsl:with-param>
>             <xsl:with-param name='value'>
>                <xsl:value-of select='value'/>
>             </xsl:with-param>
>             <xsl:if test="  ?  ">
>                <xsl:with-param name='type'>
>                   <xsl:value-of select='password'/>
>                </xsl:with-param>
>             </xsl:if>
>          </xsl:call-template>
>          <br/>
>       </xsl:for-each>
>    </xsl:template>
>
> Thank you in advance!!!
>
>  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.