Justin
I've been contemplating some definition changes. Let me know what you think.
Node - instead of referring to something that contains properties and other
nodes, Node will be the abstract base type for everything, including
properties and values.
Container - this is what "Node" used to be. It contains other Containers,
Properties, and Data
Properties - extends "Node"; an association between a name and a value.
Datum - extends "Node"; a single piece of data
Document - extends "Container"; a candidate for "root node". It reads in an
XML document by running a parser and saves changes by running an "unparser"
--
Which brings me also to... levels of validation...
We can have validation on many levels
1. Validation on the Data level. Makes sure data entered is of the right
type. E.G. a person cannot enter "Yes" when a number is required
2. Validation on the Property level. Makes sure the property is valid. E.g.
a person cannot enter multiple values for a single-value property
3. Validation on the Container level. Makes sure required properties are
present and have the right values.
4. Validation on the Document level. Makes sure required containers are
present and checks for dependencies between containers.
5. External validation. Runs an external program to check the validation of
the final configuration file.
A particular application would rarely want to implement all five of these
levels, but these different levels allow a lot of flexibility.
Jason
|