$Content
returns the immediate text content of an XML node. If the node
has sub-nodes then $content is the sum of all the text nodes which
lie immediately beneath the node. If you only require the first text
node than you should use $smallContent. If you require all the text
nodes included beneath the node then you are advsied to use
$bigContent.
Notes:
$Content is always present in both the source and target; it
cannot be null, only empty
Notes on Mapping to $Content
Mapping from $Content will produce
at least one node.
If $Content is the identifier of
the target transform, then only one node may be created with no
content, as merging will occur.
Mapping from an attribute in the source will create a node if the attribute is an empty string.
Mapping from an attribute will not create a node if the attribute is null (that is, not present in the source)
Example
You can use $Content just as though it
was an attribute:
TRANSFORM A <- B
-- copy the old content to the attribute
attr1 := $Content;
-- set the new node content with the value in the attribute
$Content := attr2;