xsl-list
[Top] [All Lists]

Re: variables

2006-02-28 12:23:40
Hi,

At 12:53 PM 2/28/2006, you wrote:
Hi,

Is it possible to make this two lines into one. (somehow to match @label
against current node @uri without creating new variable $current_section)

<xsl:variable name="current_section"><xsl:value-of
select="@uri"/></xsl:variable>

<xsl:for-each
select="document($menue_doc)//*[(_at_)label=$current_section]/descendant::section
">

Certainly:

<xsl:for-each
  
select="document($menue_doc)//*[(_at_)label=current()/@uri]/descendant::section">

That's exactly what the current() function is for.

Cheers,
Wendell


======================================================================
Wendell Piez                            
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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



<Prev in Thread] Current Thread [Next in Thread>