Processing mixed content

Problem

If you want to access the data of an mixed-content-model element,
(data nd) returns all child data.
E.g. if the content is "<MIXED>123<B>456</B>78</MIXED>"
(data nd) would return "12345678".
data returns all data of all child nodes.
You cannot determine which data is inside <B> and which data is outside.

Solution

The node-property content returns the child-elements and data in one single node-list.
These node-list exhibits the correct order of the data and nodes.
You access these node-list by calling (node-property 'content (current-node))

Example

Stylesheets

SGML-document
mixed.sgml, output type rtf


Index