public class TypeAlternative extends SchemaStructure implements SchemaComponent
COMPONENT_FUNCTION_TYPE, FIXED_UP, INCOMPLETE, INVALID, UNVALIDATED, VALIDATED, VALIDATING
Constructor and Description |
---|
TypeAlternative(EnterpriseConfiguration config,
XPathExpression condition,
java.lang.String text)
Create an TypeAlternative component
|
Modifier and Type | Method and Description |
---|---|
boolean |
fixup(SchemaCompiler compiler)
Fixup references from this schema component to others
|
java.lang.String |
getBaseURI()
Get the base URI of the XPath expression
|
Function |
getComponentAsFunction()
Get the schema component in the form of a function item.
|
XPathExpression |
getCondition()
Get the XPath expression used in the test attribute of the alternative.
|
java.lang.String |
getConditionText()
Get the original text of the condition.
|
java.lang.String |
getDefaultElementNamespace()
Get the default namesapce for elements and types from the static context of the XPath expression
|
NamespaceResolver |
getNamespaceContext()
Get the namespace context for evaluating the XPath expression
|
java.util.Map<StructuredQName,XPathVariable> |
getParameters()
Get the parameters declared for this schema document using the saxon:param extension element
|
SchemaType |
getSchemaType()
Get the fixed-up schema type for this alternative
|
TypeReference |
getTypeReference()
Get the type reference for this alternative
|
void |
serialize(SchemaModelSerializer serializer)
Serialize the schema component
|
void |
setBaseURI(java.lang.String baseURI)
Set the base URI of the XPath expression.
|
void |
setDefaultElementNamespace(java.lang.String namespace)
Set the default namesapce for elements and types from the static context of the XPath expression
|
void |
setNamespaceContext(NamespaceResolver resolver)
Set the namespace context.
|
void |
setParameters(java.util.Map<StructuredQName,XPathVariable> parameters)
Set the parameters declared for this schema document using the saxon:param extension element
|
void |
setTypeReference(TypeReference type)
Set the type reference for this alternative
|
elaborate, getColumnNumber, getConfiguration, getFixupStatus, getGeneratedId, getLineNumber, getPublicId, getRedefinitionLevel, getSchemaDocumentURI, getSystemId, getValidationStatus, hasSameLocation, lookForCycles, makeXPathExpressionPropertyRecord, saveLocation, setConfiguration, setFixupStatus, setGeneratedId, setLineNumber, setLocator, setRedefinitionLevel, setSchemaDocumentURI, setSystemId, setValidationStatus
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRedefinitionLevel, getValidationStatus
public TypeAlternative(EnterpriseConfiguration config, XPathExpression condition, java.lang.String text)
config
- the Saxon configurationcondition
- the compiled XPath expression. May be null if no condition was specified (this
is allowed on the last alternative)text
- the original text of the XPath expression. May be null if no condition was specified (this
is allowed on the last alternative)public XPathExpression getCondition()
public java.lang.String getConditionText()
public void setDefaultElementNamespace(java.lang.String namespace)
namespace
- the default namespace for elements and types. The null namespace is represented as ""public java.lang.String getDefaultElementNamespace()
public void setNamespaceContext(NamespaceResolver resolver)
resolver
- defines the namespace contextpublic NamespaceResolver getNamespaceContext()
public void setBaseURI(java.lang.String baseURI)
baseURI
- the static base URI of the expressionpublic java.lang.String getBaseURI()
public void setTypeReference(TypeReference type)
type
- a reference to the type selected by this alternativepublic TypeReference getTypeReference()
public void setParameters(java.util.Map<StructuredQName,XPathVariable> parameters)
parameters
- the declared saxon:param parameters in scope for the XPath expressionpublic java.util.Map<StructuredQName,XPathVariable> getParameters()
public SchemaType getSchemaType() throws MissingComponentException
MissingComponentException
public boolean fixup(SchemaCompiler compiler) throws SchemaException
fixup
in class SchemaStructure
compiler
- the SchemaCompiler, used primarily for reporting errorsSchemaException
public void serialize(SchemaModelSerializer serializer) throws XPathException
serializer
- the object responsible for serializationXPathException
- if a serialization error occurpublic Function getComponentAsFunction()
SchemaComponent
getComponentAsFunction
in interface SchemaComponent
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.