[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Can grouping here the solution ?
In all of my professional work with XSLT I have very rarely ever had
to address text() nodes individually.
At 2011-11-21 18:41 +0100, Robby Pelssers wrote: You can do something like In your example above where you have "datum/text()" and "page/text()", you are better served by using simply "datum" and "page". Consider if your user has the following: <datum>2003<!--OCR read this '3' as an '8'-->-05-02</datum> The expression "substring(datum,6,2)" evaluates as "05" as expected. The expression "substring(datum/text(),6,2)" triggers a runtime error because of supplying more than one node for the first argument. Remember in XPath that the value of an element is the concatenation of that element's descendent text nodes. I tell my students if they ever think they need to address a text node directly, to think again because they probably don't. I hope this is helpful. . . . . . . . . . . Ken
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|