public class XSDSchema extends SchemaElement
SchemaElement.XPathStaticContext
NAMESPACE_ANY, NAMESPACE_LOCAL, NAMESPACE_OTHER, NAMESPACE_TARGET, REQUIRE_NULL_NS, REQUIRE_TARGET_NS, USE_DEFAULT_NS, USE_DEFAULT_NS_WITHOUT_IMPORT
NODE_LETTER
Constructor and Description |
---|
XSDSchema()
Create an XSDSchema object, representing the xs:schema element in a schema document
|
Modifier and Type | Method and Description |
---|---|
void |
addGlobalParam(GlobalParam param)
Declare a global parameter for XPath expressions in this schema document (Saxon extension)
|
boolean |
defaultOpenContentAppliesToEmpty()
Ask if the default open content wildcard applies to types that would otherwise
have an EMPTY content model
|
java.util.Set<java.lang.String> |
getAllowedExtensions()
Get the set of extensions allowed in this schema document
|
java.lang.String |
getAttributeFormDefault()
Returns the attributeFormDefault property of this Schema.
|
int |
getBlockDefault()
Returns the default BlockList for this Schema.
|
AttributeGroupReference |
getDefaultAttributeGroupReference()
Get a reference to the default attribute group
|
java.lang.String |
getDefaultOpenContentMode()
Get the default open content mode, as a string (interleave or suffix)
|
Wildcard |
getDefaultOpenContentWildcard()
Get the default open content wildcard, if any
|
java.lang.String |
getElementFormDefault()
Returns the elementFormDefault property of this Schema.
|
int |
getErrorCount()
Get the number of errors detected in this schema document
|
Executable |
getExecutable()
Get the Executable corresponding to this schema document.
|
int |
getFinalDefault()
Returns the default value of "final" for this Schema.
|
GlobalParam |
getGlobalParam(StructuredQName name)
Get the GlobalParam object representing a named parameter (Saxon extension)
|
java.util.Collection<GlobalParam> |
getGlobalParams()
Return the set of global parameters defined in this schema document
|
SingleNamespaceSchema |
getSchema()
Get the PreparedSchema to which schema components are being added
|
SchemaCompiler |
getSchemaCompiler()
Get the SchemaCompiler in use
|
java.lang.String |
getTargetNamespace()
Get the target namespace of this schema document.
|
java.lang.String |
getXPathDefaultNamespace()
Get the value of the defaultXPathDefaultNamespace attribute defined on this element
|
void |
incrementErrorCount()
Increment the number of errors detected in this schema document
|
boolean |
isChameleon()
Determine if this is a chameleon schema document, that is, one with no targetNamespace
of its own, whose effective target namespace (and for many purposes, default namespace)
are set to the targetNamespace of the referring schema document.
|
protected boolean |
isFinalState(int state)
For elements whose content model is parsed using a finite state machine, test whether
a given state is a final state.
|
boolean |
isImportedNamespace(java.lang.String uri)
Determine whether a given URI is that of a namespace that has been imported into this
schema document.
|
void |
postValidate(SchemaCompiler compiler)
Process child elements after validation
|
protected void |
prepareAttributes()
Validate and process the attributes on this element in the schema document
|
void |
setAttributeFormDefault(java.lang.String attributeFormDefault)
Sets the attributeFormDefault property of this Schema.
|
void |
setBlockDefault(int value)
Sets the default Block values for this Schema.
|
void |
setDefaultOpenContent(Wildcard wildcard,
java.lang.String mode,
boolean appliesToEmpty)
Set the open content wildcard and mode
|
void |
setElementFormDefault(java.lang.String elementFormDefault)
Sets the elementFormDefault property of this Schema.
|
void |
setFinalDefault(int value)
Set the default "final" list for this Schema.
|
void |
setReferrer(SchemaElement referrer)
Set the xs:include, xs:import, or xs:redefine element that caused this schema document to be loaded
|
void |
setSchema(SingleNamespaceSchema schema)
Set the SingleNamespaceSchema to which schema components are being added
|
void |
setSchemaCompiler(SchemaCompiler manager)
Set the SchemaCompiler in use
|
void |
validate(SchemaCompiler compiler)
Validate this schema element, checking all document-level constraints
|
protected void |
validateChildren(SchemaCompiler compiler)
Validate the children of this node, recursively.
|
allocateAnonymousTypeCode, allowAttributes, checkContentModel, checkLocalTargetNamespace, checkMutuallyExclusiveAttributes, checkOnlyChildIsAnnotation, checkPermittedType, duplicate, duplicateElement, error, error, getComponentName, getContainingComplexType, getContainingSimpleType, getFingerprint, getSchemaNodeFactory, getXSDSchema, illegalElement, indefiniteArticle, invalidAttributeValue, isTopLevel, makeNamespaceContext, missingAttribute, missingChildElement, mustBeFirstElement, mustPrecede, mutuallyExclusive, mutuallyExclusiveAttributes, mutuallyExclusiveElementAndAttribute, parseBooleanAttribute, parseFinalOrBlock, processAllAttributes, processAllowedNamespaces, processDisallowedNamespaces, processDisallowedQNames, processId, processMaxOccurs, processMinOccurs, requireAttribute, setSchemaNodeFactory, validateSubtree, warning
addAttribute, addNamespace, addNamespace, attributes, checkNotNamespaceSensitiveElement, copy, delete, fixupInsertedNamespaces, generateId, getAllNamespaces, getAttributeValue, getBaseURI, getColumnNumber, getDeclaredNamespaces, getLineNumber, getNodeKind, getNodeName, getRoot, getSchemaType, getSystemId, getURIForPrefix, initialise, isId, isIdref, isIdRefNode, isInScopeNamespace, isNilled, iteratePrefixes, removeAttribute, removeNamespace, removeTypeAnnotation, rename, replaceStringValue, setAttributeInfo, setAttributes, setLocation, setNamespaceMap, setNilled, setNodeName, setSystemId, setTypeAnnotation
addChild, compact, getFirstChild, getLastChild, getNthChild, getNumberOfChildren, getRawSequenceNumber, getSequenceNumber, getUnicodeStringValue, hasChildNodes, insertChildren, insertChildrenAt, iterateChildren, removeChild, replaceChildrenAt, setChildren, setRawSequenceNumber
atomize, compareOrder, effectiveBooleanValue, equals, getConfiguration, getDisplayName, getFingerprint, getLocalPart, getNamePool, getNextInDocument, getNextSibling, getParent, getPhysicalRoot, getPrefix, getPreviousInDocument, getPreviousSibling, getRawParent, getSiblingPosition, getSuccessorElement, getTreeInfo, getURI, hasFingerprint, hashCode, head, insertSiblings, isDeleted, iterateAxis, iterateAxis, newBuilder, replace, saveLocation, setRawParent, setSiblingPosition
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
asActiveSource, children, children, deliver, getGenre, getPublicId, isSameNodeInfo, isStreamed, toShortString
getLength, getStringValue, itemAt, iterate, reduce, subsequence
asIterable, concatenate, containsNode, materialize
makeRepeatable
public XSDSchema()
public SingleNamespaceSchema getSchema()
getSchema
in class SchemaElement
public Executable getExecutable()
public java.util.Set<java.lang.String> getAllowedExtensions()
public void setSchema(SingleNamespaceSchema schema)
schema
- the SingleNamespaceSchema containing the compiled schema componentspublic void setSchemaCompiler(SchemaCompiler manager)
manager
- the schema compilerpublic SchemaCompiler getSchemaCompiler()
public void setReferrer(SchemaElement referrer)
referrer
- the referring xs:include, xs:import, or xs:redefine elementpublic boolean isChameleon()
protected void prepareAttributes() throws SchemaException
prepareAttributes
in class SchemaElement
SchemaException
- if any errors are found in the attributespublic boolean isImportedNamespace(java.lang.String uri)
uri
- the namespace URI ("" for the null namespace)public void validate(SchemaCompiler compiler) throws SchemaException
validate
in class SchemaElement
compiler
- used for reporting errorsSchemaException
- if any XML representation constraints are violatedprotected void validateChildren(SchemaCompiler compiler) throws SchemaException
validateChildren
in class SchemaElement
compiler
- used for error reportingSchemaException
- if the subtree is not validprotected boolean isFinalState(int state)
SchemaElement
isFinalState
in class SchemaElement
state
- the state to be testedpublic void postValidate(SchemaCompiler compiler) throws SchemaException
postValidate
in class SchemaElement
compiler
- used for reporting errorsSchemaException
- if errors are foundpublic java.lang.String getTargetNamespace()
public java.lang.String getAttributeFormDefault()
public int getBlockDefault()
public java.lang.String getElementFormDefault()
public int getFinalDefault()
public Wildcard getDefaultOpenContentWildcard()
public java.lang.String getDefaultOpenContentMode()
public boolean defaultOpenContentAppliesToEmpty()
public void setAttributeFormDefault(java.lang.String attributeFormDefault)
attributeFormDefault
- the Form value of the attributeFormDefault
property for this Schema, as a string, "qualified" or "unqualified".
The caller is responsible for validating the value.public void setBlockDefault(int value)
value
- the default Block values to set for this Schema, as
a bit-significant integer.public void setElementFormDefault(java.lang.String elementFormDefault)
elementFormDefault
- the Form value of the elementFormDefault
property for this Schema.public void setFinalDefault(int value)
value
- the default final values to set for this Schema, as a bit-significant
integerpublic void setDefaultOpenContent(Wildcard wildcard, java.lang.String mode, boolean appliesToEmpty)
wildcard
- the default open content wildcardmode
- the default open content mode, as a stringappliesToEmpty
- true if the default open content wildcard applies to types that would otherwise
have variety emptypublic java.lang.String getXPathDefaultNamespace()
public AttributeGroupReference getDefaultAttributeGroupReference()
public int getErrorCount()
public void incrementErrorCount()
public void addGlobalParam(GlobalParam param) throws SchemaException
param
- the details of the parameterSchemaException
- if the variable name is a duplicatepublic GlobalParam getGlobalParam(StructuredQName name)
name
- the parameter namepublic java.util.Collection<GlobalParam> getGlobalParams()
Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.