you might also try something like:
 
<xsl:template match="[EMAIL PROTECTED]|[EMAIL PROTECTED]">
    <!-- do your operation here -->
</xsl:template>
 
the brackets "perform" the test. the "|" serves as logical OR,
but to make sure your XML definitly contains the node with
some attribute, put some definition in your DTD.
 
 
markus
 
-----Ursprüngliche Nachricht-----
Von: huzhl <[EMAIL PROTECTED]>
An: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Datum: Montag, 24. Juni 2002 07:27
Betreff: Re: some help..

you can use the "@" symbol to test the attribut,
 
<xsl:template match="node1">
    <xsl:if test="@attr1">  /*test whether has the attribute attr1 or not*/
       /*do your operation at here*/
    </xsl:if>
</xsl:template>
----- Original Message -----
Sent: Monday, June 24, 2002 1:23 PM
Subject: some help..

Hi all,
 
I have a XML file like this..
 
<root>
    <node1 attr1="efhg" attr2="efhef"/>
    <node2 attr2="erfje" attr3="efjef"/>
</root>
 
Is there any method/function in XSL to check whether
any of the attributes in the node exists..
 
Regards,

Vinod Nayak i-flex solutions ltd. Voice: (91)-228 43 00, x 6501
Fax:   (91)-22-843 13
[EMAIL PROTECTED]
 
 

---------------------------------------------------------------------------- This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. ----------------------------------------------------------------------------

Reply via email to