[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: Sat, 12 Feb 2022 08:34:21 +0000
>
> Lastly, how many text nodes are within this <Test> element?
>
> <Test>abc&def</Test>
>
> Answer: 1
>
> Interesting!
>
> So, what is the text?
>
> Is it this: abc&def (i.e., the entity is resolved)?
>
> No!
>
> The text is this: abc&def (the entity is *not* resolved)
>
The content of the text node is the 7-character string "abc&def".
It might be displayed as "abc&def" if you're displaying it using XML serialization. You need to distinguish the content of the text node from its visual representation. The XPath spec doesn't say anything about the visual representation.
Michael Kay
Saxonica
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]