Re: [xml-dev] How can the content of a leaf element be multiple text nodes?

From
Michael Kay <>
To
Roger L Costello <>
Date
2022-02-11T15:16:59Z
ID
<>
Thread
Re: [xml-dev] How can the content of a leaf element be multiple text nodes?
> 
> 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