Re: [xsl] Need help for XSL beautifaction

Subject: Re: [xsl] Need help for XSL beautifaction
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 16 May 2006 18:59:42 -0400

I'm not quite sure what you're asking here, but I'm guessing

<xsl:copy-of select="$text-1[current()/textNo='text-1']"/>

is what you're after. This does assume $text-1 is bound to a node set. (If it isn't you can't do this, in XPath 1.0.)

Depending on what your context is (or: where exactly is your textNo node) and what the relation is between it and $text-1, this could get even simpler. You haven't shown enough for us to tell.


At 05:40 PM 5/16/2006, you wrote:
Hi all!

Do you have any ideas how I can code this XSL more beautiful:

<xsl:if test="textNo = 'text-1'" >
      <xsl:copy-of select="$text-1"/>

In other words: Is there a chance to use the <copy-of> directly with the value of "textNo", without the <xsl:if> ?

Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.      
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

Current Thread