xsl-list
[Top] [All Lists]

Re: [xsl] select attribute of xsl:variable

2010-09-01 07:01:37
pankaj(_dot_)c(_at_)thomsondigital(_dot_)com 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[(_at_)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/

--~------------------------------------------------------------------
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>
--~--