Hi pankaj,
Done Use
<xsl:variable name="role_title"
select="parent::textbox-head/parent::textbox/@role"/>
Thanks
Praveen Chauhan
(Aptara india)
-----Original Message-----
From: Hermann Stamm-Wilbrandt [mailto:STAMMW(_at_)de(_dot_)ibm(_dot_)com]
Sent: Wednesday, September 01, 2010 5:36 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] select attribute of xsl:variable
"textbox-head / textbox-body" mismatch.
$ cat textbox.xml
<textbox id="b0030" role="alt1">
<textbox-head>
<title>XXXXXXXXXXXXXX</title>
</textbox-head>
</textbox>
$
$ xpath++ "/textbox/textbox-head/title/parent::textbox-body/parent::textbox
[(_at_)role]" textbox.xml
$
$ xpath++ "/textbox/textbox-head/title/parent::*/parent::textbox[(_at_)role]"
textbox.xml
----------------------------------------------------------------------------
---
<textbox id="b0030" role="alt1">
<textbox-head>
<title>XXXXXXXXXXXXXX</title>
</textbox-head>
</textbox>
$
Mit besten Gruessen / Best wishes,
Hermann Stamm-Wilbrandt
Developer, XML Compiler, L3
WebSphere DataPower SOA Appliances
----------------------------------------------------------------------
IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats:
Martin Jetter
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
From: pankaj(_dot_)c(_at_)thomsondigital(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Date: 09/01/2010 01:54 PM
Subject: Re: [xsl] select attribute of xsl:variable
<textbox id="b0030" role="alt1">
<textbox-head>
<title>XXXXXXXXXXXXXX</title>
</textbox-head>
</textbox>
With Case 1 I get correct output
<textbox aid:pstyle="TE A title" id="b0030" role="alt1"> ..............
With Case 2 output is :
<textbox aid:pstyle="" id="b0030" role="alt1">
Empty aid:pstyle=""
I tried to display the value also and it gives me "EMPTY" in case second.
<xsl:text>{</xsl:text><xsl:value-of
select="$boxtype"/><xsl:text>}</xsl:text> GIVES {}.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--