[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] How can the content of a leaf element be multiple textnodes?
- From: Michael Kay <mike@saxonica.com>
- To: Roger L Costello <costello@mitre.org>
- Date: Fri, 11 Feb 2022 15:16:59 +0000
>
> Okay, I'm confused.
>
> I thought that a leaf element can have either zero or one text node.
You are very confused. I don't know what led you to think that.
>
>
> But the really interesting thing is that if I create an XPath to answer this question: What is the text in the <Test> element?
>
> Test/text()
>
> Shockingly, I get this output:
>
> abcdef
>
The result of the query is a sequence containing two text nodes. The way such a sequence is displayed depends entirely on the calling application. Concatenating them might or might not be a suitable way of displaying the result.
Michael Kay
Saxonica
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]