Subject: RE: using tokenize() and referencing parent elements
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 10 May 2007 19:11:55 +0100
|
> > The answer is to save the context node in a variable before
> going into
> > the for-each.
>
> I don't see how this could help here. Actually, I don't see any
> *simple* way to solve this. Could you please explain a
> little bit further?
OK, the problem's a bit deeper than I realized.
Fact is, if you extract the string value of a node with complex/mixed
content then you're throwing away any information about which parts of the
string came from which node - and that's before you start tokenizing. If you
want to retain this information, you're going to have to process the nodes
one at a time.
Michael Kay
http://www.saxonica.com/
|