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

Re: Re: Create a node set and then apply a template to

Subject: Re: Re: Create a node set and then apply a template to it
From: "paul morgan" <pmorg@xxxxxxxxx>
Date: Mon, 29 Apr 2002 09:54:22 -0700
xsl create nodeset
Hi Dimitre,

I must be missing something (not a big surprise) ... when I run the sample code you supplied I get the following XSLT error:

    Can not convert #RTREEFRAG to a NodeList!

I'm using Xalan-J 2.3.1, from FXSL I grabbed "strSplit-to-Words.xsl" and "strfoldl.xsl" (the Xalan versions), and in the example, I substituted:

    xmlns:vendor="http://xml.apache.org/xalan"
for:
    xmlns:vendor="urn:schemas-microsoft-com:xslt"

The interesting thing is that if I comment out the line:

   <xsl:apply-templates select="vendor:node-set($vwordNodes)/*"/>

I still get the error ... does this make any sense?

Thanks
--

On Sat, 27 Apr 2002 06:40:39  
 Dimitre Novatchev wrote:
>You can tokenize the text using the str-split-to-words template from
>FXSL.
>
>If you capture the result into a xsl:variable, then convert it from an
>RTF to a node-set, then you'd be able to apply other templates on this
>node-set. In your concrete case this stylesheet:
>
><xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:vendor="urn:schemas-microsoft-com:xslt"
>>
>
>   <xsl:import href="strSplit-to-Words.xsl"/>
>
>   <xsl:output indent="yes" omit-xml-declaration="yes"/>
>   
>    <xsl:template match="/">
>      <xsl:variable name="vwordNodes">
>        <xsl:call-template name="str-split-to-words">
>          <xsl:with-param name="pStr" select="/"/>
>          <xsl:with-param name="pDelimiters" 
>                          select="', 	

'"/>
>        </xsl:call-template>
>      </xsl:variable>
>      
>      <xsl:apply-templates select="vendor:node-set($vwordNodes)/*"/>
>    </xsl:template>
>    
>    <xsl:template match="word">
>      <xsl:value-of select="concat(position(), ' ', ., '
')"/>
>    </xsl:template>
>
></xsl:stylesheet>



See Dave Matthews Band live or win a signed guitar
http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_020201/splash.asp 

 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.