6.4.2.1 General Structure

Given a subtree of a workspace, the general form of the document view is determined as follows:

  1. The relevant mappings from the repository namespace registry are rendered as a set of namespace declarations in the top-most XML element (though the xml namespace is excluded, since its presence would be redundant).

  2. Each content repository node N becomes an XML element of the same name, N.

  3. Each child node C of N becomes a subelement C of XML element N.

  4. The order of the subelements of element N must reflect the order in which the corresponding child nodes are returned by Node.getNodes.

  5. Each property P of node N becomes an XML attribute P of XML element N.

  6. The value of each property P is converted to string form according to the standard conversion (see 6.2.6 Property Type Conversion) and becomes the value of the XML attribute P. Entity references are used to escape characters which should not be included as literals within attribute values (see 6.4.4 Escaping of Values).

The following sections describe the exceptions to the above general rules.