[Home] [By Thread] [By Date] [Recent Entries]
In all my production work I have very rarely had to match on text() nodes, though it is not entirely unheard of. I tell my students if they think they need to match on text(), think again because usually they don't. Same with XQuery, and I cringe when I see XQuery examples of addressing text() nodes directly when it us unnecessary (and even just plain wrong). But to answer your question, the data model has a single text node for your example, and so when the match happens once, the current node is the entire string of Unicode characters. Note, however, that often text nodes will be broken up *by the user*, though never by the processor. The user can break it up as follows: <name>Nancy <!--nee Jones--> Smith</name> ... where there are three child nodes of <name>, two text() nodes and a comment() node. If you only have text characters between the start tag and the end tag of the element, the data model promises you will have only a single text node. I hope this helps. . . . . . . . . . . Ken At 2010-12-20 08:09 -0500, David Lee wrote: XSLT 2.0 I have a problem (probably my own misuse of XSLT) but I run into cases where -- Contact us for world-wide XML consulting & instructor-led training Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|

Cart



