This constructor for unit testing only
The enclosing component, and follows back-references from types to their elements, from globalElementDef to elementRefs, from simpleType defs to derived simpletype defs, from global group defs to group refs
The enclosing component, and follows back-references from types to their elements, from globalElementDef to elementRefs, from simpleType defs to derived simpletype defs, from global group defs to group refs
Note: the enclosing component of a global element or global group referenced from a element ref or group ref, is NOT the ref object, but the component that contains the ref object
Define this for schema components that have back-references to ref objects.
Define this for schema components that have back-references to ref objects. So group def to group ref, globalelementdecl to element ref, type to element, base type to derived type.
Not for format annotations however. We don't backpoint those to other format annotations that ref them.
All schema components except the root have an enclosing element.
All schema components except the root have an enclosing element.
Let's take the list of file names given, and make a fake schema document with import statements for them.
Let's take the list of file names given, and make a fake schema document with import statements for them. Then the algorithms are all isolated to just the SchemaDocument class and the Include and Import classes.
DFDL Schema top-level global objects
XML Schema global objects.
XML Schema global objects. Given a namespace and name, try to retrieve the named object
These all return factories for the objects, not the objects themselves.
Retrieve schema by namespace name.
Retrieve schema by namespace name.
If the schema has no namespace, then use ""
Whether the component is hidden.
Whether the component is hidden.
Override this in the components that can hide - SequenceGroupRef and ChoiceGroupRef
Annotations can contain expressions, so we need to be able to compile them.
Annotations can contain expressions, so we need to be able to compile them.
We need our own instance so that the expression compiler has this schema component as its context.
Namespace scope for resolving QNames.
Namespace scope for resolving QNames.
We insist that the prefix "xsi" is properly defined for use in xsi:nil attributes, which is how we represent nilled elements when we convert to XML.
Used as factory for the XML Node with the right namespace and prefix etc.
Used as factory for the XML Node with the right namespace and prefix etc.
Given "element" it creates <dfdl:element /> with the namespace definitions based on this schema component's corresponding XSD construct.
Makes sure to inherit the scope so we have all the namespace bindings.
The lexically enclosing schema component
The lexically enclosing schema component
path is used in diagnostic messages and code debug messages; hence, it is very important that it be very dependable.
path is used in diagnostic messages and code debug messages; hence, it is very important that it be very dependable.
Since the root element can be specified by an API call on the Compiler class, or by an API call on the ProcessorFactory, this method reconciles the two.
Since the root element can be specified by an API call on the Compiler class, or by an API call on the ProcessorFactory, this method reconciles the two. E.g., you can't specify the root both places, it's one or the other.
Also, if you don't specify a root element at all, this grabs the first element declaration of the first schema file to use as the root.
ALl non-terms get runtimeData from this definition.
ALl non-terms get runtimeData from this definition. All Terms which are elements and model-groups) override this.
The Term class has a generic termRuntimeData => TermRuntimeData function (useful since all Terms share things like having charset encoding) The Element classes all inherit an elementRuntimeData => ElementRuntimeData and the model groups all have modelGroupRuntimeData => ModelGroupRuntimeData.
There is also VariableRuntimeData and SchemaSetRuntimeData.
Includes instances.
Includes instances. Ie., a global element will appear inside an element ref. a global group inside a group ref, a global type inside an element or for derived simple types inside another simple type, etc.
Used in diagnostic messages and code debug messages
Elements only e.g., /foo/ex:bar
Elements only e.g., /foo/ex:bar
This is the root, or basic target namespace.
This is the root, or basic target namespace. Every schema component gets its target namespace from its xmlSchemaDocument.
Let's use the uri for the first schema document, rather than giving no information at all.
Let's use the uri for the first schema document, rather than giving no information at all.
It would appear that this is only used for informational purposes and as such, doesn't need to be a URL. Can just be String.
A schema set is exactly that, a set of schemas. Each schema has a target namespace (or 'no namespace'), so a schema set is conceptually a mapping from a namespace URI (or empty string, meaning no namespace) onto schema.
Constructing these from XML Nodes is a unit-test interface. The real constructor takes a sequence of file names, and you can optionally specify a root element via the rootSpec argument.
A schema set is a SchemaComponent (derived from that base), so as to inherit the error/warning accumulation behavior that all SchemaComponents share. A schema set invokes our XML Loader, which can produce validation errors, and those have to be gathered so we can give the user back a group of them, not just one.
Schema set is however, a kind of a fake SchemaComponent in that it doesn't correspond to any user-specified schema object. And unlike other schema components obviously it does not live within a schema document.