[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: multiple template value input

Subject: Re: multiple template value input
From: clemens schrenk <clemens.schrenk@xxxxxxx>
Date: Thu, 18 Sep 2003 23:41:26 +0200
for input string
well, yes - i want to have a series of distinct strings, and i really wanna
go for the last option you proposed. but as a matter of fact, i don't know
how to set the xsl:copy-of element as an input string of the called
templated since it is an essential part of the template where itself and the
call-template element is used.
sorry to cause you that much trouble...




Am 18.09.2003 18:04 Uhr schrieb "David Carlisle" unter <davidc@xxxxxxxxx>:

> 
> 
>> all of these work perfectly, except the variable "frank" that is put in as
>> the outcomes of all the for-each loops in the first template put together...
> 
> which is what I would expect, given your code, but if that's what you
> wanted then it's not clear what you do want, so hard to suggest what to
> change.
> 
> 
> 
> <xsl:template match="INSTANCE" name="joseph">
>  <xsl:for-each select="key('tracker', 'Referenced Document')">
>       <xsl:copy-of
> select="substring-before(substring-after(.,'&quot;\&quot;'), '&quot;')"/>
>  </xsl:for-each>
> </xsl:template>
> 
> 
> that for-each will make some collection of strings but you can't have
> adjacent text nodes in xpath so what is returned is a single text node
> with the concatenation. this is as would eb expected in xml, if you need
> to have a series of distinct strings you need some xml element structure
> somewhere. 
> 
> 
> You could
> do
> 
> 
> <xsl:template match="INSTANCE" name="joseph">
>  <xsl:for-each select="key('tracker', 'Referenced Document')">
> <abc>
>       <xsl:value-of
> select="substring-before(substring-after(.,'&quot;\&quot;'), '&quot;')"/>
>  </xsl:for-each>
> </abc>
> </xsl:template>
> 
> 
> then
> 
> <xsl:variable name="frank">
> <xsl:call-template name="joseph">
> </xsl:call-template>
> </xsl:variable>
> 
> 
> would be a result tree fragment consisting of a root node with a set of
> abc element children each containing a text node with your substrings
> 
> then you could use xx:node-set($frank)/abc to access each of those
> strings,
> 
> but depending what you are trying to do you probably don't need an
> node-set extension, why make the variable first, why not just do
> 
> <xsl:for-each select="key('tracker', 'Referenced Document')">
> 
> <xsl:call-template
> your replacement text with input string this:
>       <xsl:copy-of
> select="substring-before(substring-after(.,'&quot;\&quot;'), '&quot;')"/>
>  </xsl:for-each>
> </xsl:call-template>
> </xsl:template>
> 
> and so just handle one string at a time?
> 
> David
> 
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________
> 
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 

____________________________________________________________________________

chance favors the prepared mind:

clemens Schrenk
esterhazygasse 18a/21
1060 wien

clemens.schrenk@xxxxxxx
mobile: +43 69911602281


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.