If your XPath expression is inside the repeating row of a table, then the element corresponding to the row of the table is the context node, say, Row.
•If you use an absolute path, for example $XML/Row/@id, then the XPath expression will return a sequence of the @id values of allRow elements. If you are using an operation that expects one atomic value, the operation will generate an error.
•If you use a relative path, for example @id, then, since for every repeating row, you have a context $XML/Row, the XPath expression will correctly return the single atomic value of the one @id attribute of the current Row element.
If an element with mixed content (text and element/s) is located with an XPath locator expression, then the text content of the mixed-content element only is returned. The text content of descendant elements is ignored.
If the XML tree had the following structure and content:
Then the target element would be updated with the text content of the mixed-content element source, while ignoring the content of its child element subsource. The node named target will be updated to <target>AAA</target>.
If you wish to include the text content of descendant node/s, use a string function. Using the XML example above, for instance, the expression string($XML1/Element1/source, '') will return "AAABBB".
Charts use the XPath compliant method of serializing: When a mixed-content element is located using an XPath locator expression, then the text content of descendant elements is also serialized.