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?

> 
> Lastly, how many text nodes are within this <Test> element?
> 
> <Test>abc&amp;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&amp;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&amp;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]


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