Re: [xsl] select attribute of xsl:variable

Subject: Re: [xsl] select attribute of xsl:variable
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Wed, 01 Sep 2010 14:01:22 +0200
pankaj.c@xxxxxxxxxxxxxxxxxx wrote:
<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=""

Well in your code you have


<xsl:template match="display/textbox/textbox-head/title">
<xsl:variable name="role_title"
select="parent::textbox-body/parent::textbox[@role]"/>

yet in your code snippet you have no "display" element at all and your "title" element has a parent named "textbox-head" and a grandparent named "textbox" so "parent::textbox-body" is never going to find anything as "textbox-head" and "parent::textbox-body" are different.


--


	Martin Honnen
	http://msmvps.com/blogs/martin_honnen/

Current Thread