xsl-list
[Top] [All Lists]

RE: [xsl] for-each tokenize() and context problem

2009-11-19 13:38:51
Thanks for the clarification.

I guess where my confusion came from, is that I assumed that I still had 
context because the for-eachs where nested inside a template match statement 
and that context would always be there. (Even discounting the fact I was 
tokenizing a string.)

Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries

-----Original Message-----
From: Martin Honnen [mailto:Martin(_dot_)Honnen(_at_)gmx(_dot_)de] 
Sent: Thursday, November 19, 2009 12:22 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] for-each tokenize() and context problem

Mario Madunic wrote:

Any for-each that is a descendant of a for-each (with no parent for-each) 
will lose its context. The context will be the current node, in this case 
text. Am I correct in this assumption?

No, the result of the tokenize is a sequence of string values and that 
way in the for-each select="tokenize(...)" you have a string value as 
the context item and you can't do XPath like ancestor on string items 
(or any atomic values), you can only do XPath on nodes.


-- 

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


--------------------------------------------------------------------
Please consider the environment before printing this e-mail.

CONFIDENTIALITY STATEMENT: This communication (and  any and all information or 
material transmitted with this communication) is confidential, may be 
privileged and is intended only for the use of the intended recipient. If you 
are not the intended recipient, any review, retransmission, circulation, 
distribution, reproduction, conversion to hard copy, copying or other use of 
this communication, information or material is strictly prohibited and may be 
illegal. If you received this communication in error or if it is forwarded to 
you without the express authorization of New Flyer, please notify us 
immediately by telephone or by return email and permanently delete the 
communication, information and material from any computer, disk drive, diskette 
or other storage device or media. Thank you.


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