net.sf.saxon.type
public interface ComplexType extends SchemaType
Field Summary | |
---|---|
static int | OPEN_CONTENT_ABSENT |
static int | OPEN_CONTENT_INTERLEAVE |
static int | OPEN_CONTENT_NONE |
static int | OPEN_CONTENT_SUFFIX |
static int | VARIETY_ELEMENT_ONLY |
static int | VARIETY_EMPTY |
static int | VARIETY_MIXED |
static int | VARIETY_SIMPLE |
Method Summary | |
---|---|
boolean | allowsAttributes()
Return true if this type (or any known type derived from it by extension) allows the element
to have one or more attributes. |
boolean | containsElementWildcard()
Ask whether this type (or any known type derived from it by extension) allows the element
to have children that match a wildcard |
void | gatherAllPermittedChildren(IntHashSet children)
Get a list of all the names of elements that can appear as children of an element having this
complex type, as integer fingerprints. |
void | gatherAllPermittedDescendants(IntHashSet descendants)
Get a list of all the names of elements that can appear as descendants of an element having this
complex type, as integer fingerprints. |
SimpleType | getAttributeUseType(int fingerprint)
Find an attribute use within this complex type definition having a given attribute name
(identified by fingerprint), and return the schema type associated with that attribute.
|
int | getElementParticleCardinality(int fingerprint)
Find an element particle within this complex type definition having a given element name
(identified by fingerprint), and return the cardinality associated with that element particle,
that is, the number of times the element can occur within this complex type. |
SchemaType | getElementParticleType(int fingerprint, boolean considerExtensions)
Find an element particle within this complex type definition having a given element name
(identified by fingerprint), and return the schema type associated with that element particle.
|
SimpleType | getSimpleContentType()
Get the simple content type. |
int | getVariety()
Get the variety of this complex type. |
boolean | isAbstract()
Test whether this complex type has been marked as abstract. |
boolean | isAllContent()
Test whether this complex type has "all" content, that is, a content model
using an xs:all compositor |
boolean | isComplexContent()
Test whether this complex type has complex content. |
boolean | isEmptiable()
Test whether the content model of this complex type allows empty content. |
boolean | isEmptyContent()
Test whether the content model of this complex type is empty. |
boolean | isMixedContent()
Test whether this complex type allows mixed content. |
boolean | isRestricted()
Test whether this complex type is derived by restriction. |
boolean | isSimpleContent()
Test whether this complexType has simple content. |
Returns: true if attributes are allowed
Returns: true if the content model of this type, or its extensions, contains an element wildcard
Parameters: children an integer set, initially empty, which on return will hold the fingerprints of all permitted child elements; if the result contains the value -1, this indicates that it is not possible to enumerate all the children, typically because of wildcards. In this case the other contents of the set should be ignored.
Parameters: descendants an integer set, initially empty, which on return will hold the fingerprints of all permitted descendant elements; if the result contains the value -1, this indicates that it is not possible to enumerate all the descendants, typically because of wildcards. In this case the other contents of the set should be ignored.
If there are types derived from this type by extension, search those too.
Parameters: fingerprint Identifies the name of the child element within this content model
Returns: the schema type associated with the attribute use identified by the fingerprint. If there is no such attribute use, return null.
Parameters: fingerprint Identifies the name of the child element within this content model
Returns: the cardinality associated with the child element particle with the given name. If there is no such particle, return EMPTY.
Parameters: fingerprint Identifies the name of the child element within this content model considerExtensions
Returns: the schema type associated with the child element particle with the given name. If there is no such particle, return null.
Returns: For a complex type with simple content, returns the simple type of the content. Otherwise, returns null.
Returns: true if this complex type is abstract.
Returns: true if the type has an "all" content model
Returns: true if and only if this complex type has a complex content model, that is, if its variety is one of empty, mixed, or element-only.
Returns: true if empty content is valid
Returns: true if the content model is defined as empty
Returns: true if mixed content is allowed
Returns: true if this complex type is derived by restriction
Returns: true if and only if this complex type has a simple content model, that is, if its variety is simple.