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,
String text)
Create an TypeAlternative component
|
Modifier and Type | Method and Description |
---|---|
boolean |
fixup(SchemaCompiler compiler)
Fixup references from this schema component to others
|
String |
getBaseURI()
Get the base URI of the XPath expression
|
FunctionItem |
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.
|
String |
getConditionText()
Get the original text of the condition.
|
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
|
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(String baseURI)
Set the base URI of the XPath expression.
|
void |
setDefaultElementNamespace(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(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, getLineNumber, getPublicId, getRedefinitionLevel, getSchemaDocumentURI, getSystemId, getValidationStatus, lookForCycles, makeXPathExpressionPropertyRecord, setConfiguration, setFixupStatus, 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, 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 String getConditionText()
public void setDefaultElementNamespace(String namespace)
namespace
- the default namespace for elements and types. The null namespace is represented as ""public String getDefaultElementNamespace()
public void setNamespaceContext(NamespaceResolver resolver)
resolver
- defines the namespace contextpublic NamespaceResolver getNamespaceContext()
public void setBaseURI(String baseURI)
baseURI
- the static base URI of the expressionpublic String getBaseURI()
public void setTypeReference(TypeReference type)
type
- a reference to the type selected by this alternativepublic TypeReference getTypeReference()
public void setParameters(Map<StructuredQName,XPathVariable> parameters)
parameters
- the declared saxon:param parameters in scope for the XPath expressionpublic Map<StructuredQName,XPathVariable> getParameters()
public SchemaType getSchemaType()
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 FunctionItem getComponentAsFunction()
SchemaComponent
getComponentAsFunction
in interface SchemaComponent
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.