Namespace Apogee.Content.Xml¶
Classes¶
What
One definition: an element with an id, as it is after every file that touched it, and what it decodes to.
The definitions of a game and its mods: every .xml file of the content folders, read in load order (a folder's files sorted, then its folders, each the same way), each
file holding one definition (a root element with an id) or a list of them (the root's children). A definition is identified by its type (the element's name) and its id.
A later file replaces a definition with the same id (with a warning that names both files), patches it with patch="true" (see remove="true". Each definition is then checked against the schemas and decoded; what is wrong is in
A folder of definitions: where it is in the file system, and the package it belongs to (the first thing that loads is the game's own).
A record: members by name, in the order they were decoded (attributes first, then child elements as the schema declares them).
A file that made a definition:
What a definition decodes into ({id: "crate", weight: 12.5, tags: ["a", "b"]}), which is what tests compare.
Three numbers written "x y z" (or "x, y, z") in a vector3 attribute: a vector in scripts.
A schema is invalid, or uses something the engine's XSD subset does not have. The message names the file and line.
Something wrong in a file: Crate.items[2].count),
XSD, the parts content definitions need: checking XML against a schema and turning it into data (.xsd file loaded into it (and the
ones they include), so that a package can bring the schema of the definitions it adds, and the children it adds to an open element of another's.
Supported: element and attribute declarations (type, ref for elements, default, fixed, use, minOccurs, maxOccurs), complexType with
sequence, choice and all (the order of children is not checked; a choice's members each repeat as they say, so a choice repeated stands for any order),
group and attributeGroup, complexContent and simpleContent extensions, any and anyAttribute, simpleType restrictions
(enumeration, minInclusive, maxInclusive, minExclusive, maxExclusive, pattern, minLength, maxLength, length) and lists, the
built-in types, annotation, and include/import of a file by its location (no namespaces: names are plain). Anything else is a
A binary encoding of an XML document, for cooked packs (APXB): the tree
Reads an XML file of the game, whichever form it is in: text, as it is written and edited, or cooked (
An element as content files and schemas are read: its name, its attributes in the order they were written, its children, its text, and the line it starts on. Comments and
processing instructions are dropped, a DTD is refused (nothing is loaded from outside the file), and names keep their prefix (xs:element, xsi:type): content is
not namespace-aware, so a prefix only has to be declared.
A file is not well-formed XML.
Structs¶
An attribute as written: its name (with a prefix, if it has one) and its text. (Not called XmlAttribute: a type with that ending is read as an attribute class.)
Enums¶
What a file did to a definition.