XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[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?

> 
> 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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS