[Home] [By Thread] [By Date] [Recent Entries]

  • From: Michael Kay <mike@s...>
  • To: Roger L Costello <costello@m...>
  • 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]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member