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

Re: Identifying Existence of Attributes

Subject: Re: Identifying Existence of Attributes
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Sat, 15 Mar 2003 09:43:37 +0100
 Re: Identifying Existence of Attributes
<balajeec@xxxxxxxxxx> wrote in message
news:551A143C7FC0F64FA508178F55A7E01902FE2412@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi ,
> I have an element by the name
> <Text>
> I want to check whether the current <Text> node has the attribute by the
name
> "indent"
> defined in it.
> How can i do it.??
>

Just test for @indent

e.g.:

<xsl:if test="@indent ">
  <!-- do something -->
</xsl:if>


Translated in English the above means: "if the current node has an attribute
named 'indent' do something".

The test does not depend on whether the current node is named "Text",
because you said this is already a known fact.


In case you want to check that both the current node is named "Text" and it
has an attribute named "indent", the XPath expression that returns the truth
value of this fact is:

self::Text and @indent



=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL




 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.