Package com.saxonica.ee.schema.sdoc
Class SaxonParam
- java.lang.Object
-
- All Implemented Interfaces:
javax.xml.transform.Source
,javax.xml.transform.SourceLocator
,ActiveSource
,GroundedValue
,Item
,MutableNodeInfo
,NamespaceResolver
,NodeInfo
,Sequence
,Location
,SteppingNode
,SiblingCountingNode
,org.xml.sax.Locator
public class SaxonParam extends AnnotationParent
This object represents a saxon:param element in a schema document. The element may appear only as a child of xs:schema. It permits a validation episode to be parameterized, and thus allows a schema to define different sets of assertions (for example) for use under different circumstances, for example at different stages of the life-cycle of the document being validated.The saxon:param element is similar to a stylesheet parameter in XSLT. The permitted attributes are name (the name of the parameter), select (an XPath expression giving a default value for the parameter), as (a SequenceType giving the required type of the parameter).
The element declares a variable that is in scope for all XPath expressions appearing within the same schema document. It is an error for two schema documents to declare the same variable.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.saxonica.ee.schema.sdoc.SchemaElement
SchemaElement.XPathStaticContext
-
-
Field Summary
-
Fields inherited from class com.saxonica.ee.schema.sdoc.SchemaElement
NAMESPACE_ANY, NAMESPACE_LOCAL, NAMESPACE_OTHER, NAMESPACE_TARGET, REQUIRE_NULL_NS, REQUIRE_TARGET_NS, USE_DEFAULT_NS, USE_DEFAULT_NS_WITHOUT_IMPORT
-
Fields inherited from class net.sf.saxon.tree.linked.NodeImpl
NODE_LETTER
-
-
Constructor Summary
Constructors Constructor Description SaxonParam()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StructuredQName
makeQName(java.lang.String lexicalQName)
Make a structured QName, using this Element as the context for namespace resolution, and registering the code in the namepool.SequenceType
makeSequenceType(java.lang.String sequenceType, StaticContext env)
Process an attribute whose value is a SequenceTypeprotected void
prepareAttributes()
Set the attribute list for the element.-
Methods inherited from class com.saxonica.ee.schema.sdoc.AnnotationParent
validate
-
Methods inherited from class com.saxonica.ee.schema.sdoc.SchemaElement
allocateAnonymousTypeCode, allowAttributes, checkContentModel, checkLocalTargetNamespace, checkMutuallyExclusiveAttributes, checkOnlyChildIsAnnotation, checkPermittedType, duplicate, duplicateElement, error, error, getComponentName, getContainingComplexType, getContainingSimpleType, getFingerprint, getSchema, getSchemaNodeFactory, getXSDSchema, illegalElement, indefiniteArticle, invalidAttributeValue, isFinalState, isTopLevel, makeNamespaceContext, missingAttribute, missingChildElement, mustBeFirstElement, mustPrecede, mutuallyExclusive, mutuallyExclusiveAttributes, mutuallyExclusiveElementAndAttribute, parseBooleanAttribute, parseFinalOrBlock, postValidate, processAllAttributes, processAllowedNamespaces, processDisallowedNamespaces, processDisallowedQNames, processId, processMaxOccurs, processMinOccurs, requireAttribute, setSchemaNodeFactory, validateChildren, validateSubtree, warning
-
Methods inherited from class net.sf.saxon.tree.linked.ElementImpl
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
-
Methods inherited from class net.sf.saxon.tree.linked.ParentNodeImpl
addChild, compact, getFirstChild, getLastChild, getNthChild, getNumberOfChildren, getRawSequenceNumber, getSequenceNumber, getUnicodeStringValue, hasChildNodes, insertChildren, insertChildrenAt, iterateChildren, removeChild, replaceChildrenAt, setChildren, setRawSequenceNumber
-
Methods inherited from class net.sf.saxon.tree.linked.NodeImpl
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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, materialize
-
Methods inherited from interface net.sf.saxon.om.Item
getLength, getStringValue, itemAt, iterate, reduce, subsequence
-
Methods inherited from interface net.sf.saxon.om.NodeInfo
asActiveSource, children, children, deliver, getGenre, getPublicId, isSameNodeInfo, isStreamed, toShortString
-
Methods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
-
-
-
Method Detail
-
prepareAttributes
protected void prepareAttributes() throws SchemaException
Description copied from class:SchemaElement
Set the attribute list for the element. This is called to process the attributes (note the distinction from processAttributes in the superclass). Must be supplied in a subclass- Specified by:
prepareAttributes
in classSchemaElement
- Throws:
SchemaException
-
makeSequenceType
public SequenceType makeSequenceType(java.lang.String sequenceType, StaticContext env) throws SchemaException
Process an attribute whose value is a SequenceType- Parameters:
sequenceType
- the source text of the attributeenv
- the static context for evaluating the sequence type- Returns:
- the processed sequence type
- Throws:
SchemaException
- if the syntax is invalid or for example if it refers to a type that is not in the static context
-
makeQName
public final StructuredQName makeQName(java.lang.String lexicalQName) throws SchemaException
Make a structured QName, using this Element as the context for namespace resolution, and registering the code in the namepool. If the name is unprefixed, the default namespace is not used.- Parameters:
lexicalQName
- The lexical QName as written, in the form "[prefix:]localname". The name must have already been validated as a syntactically-correct QName. Leading and trailing whitespace will be trimmed- Returns:
- the StructuredQName representation of this lexical QName
- Throws:
SchemaException
- if the qname is not a lexically-valid QName, or if the name is in a reserved namespace.
-
-