Package net.sf.saxon.trans
Class PackageLoaderHE
java.lang.Object
net.sf.saxon.trans.PackageLoaderHE
- All Implemented Interfaces:
IPackageLoader
- Direct Known Subclasses:
PackageLoaderPE
This class reads the XML exported form of a package and reconstructs the package object in memory.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static interface
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Map
<String, StylesheetPackage> protected static final Map
<String, PackageLoaderHE.ExpressionLoader> final Stack
<List<ComponentInvocation>> protected final Stack
<StylesheetPackage> final Map
<SymbolicName, UserFunction> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCompletionAction
(Action action) protected void
addVendorFunctionLibrary
(FunctionLibraryList targetList, Configuration config) static NamespaceMap
fromExportedNamespaces
(String nsAtt) Get the n'th element child of an element (zero-based)protected static Expression[]
getChildExpressionArray
(PackageLoaderHE loader, NodeInfo element) protected static List
<Expression> getChildExpressionList
(PackageLoaderHE loader, NodeInfo element) getChildWithRole
(NodeInfo parent, String role) getExpressionWithRole
(NodeInfo parent, String role) getFirstChildExpression
(NodeInfo parent) getInheritedAttribute
(NodeInfo element, String localName) int
getIntegerAttribute
(NodeInfo element, String localName) Read an integer-valued attributegetListOfQNameAttribute
(NodeInfo element, String localName) getNthChildExpression
(NodeInfo parent, int n) protected static int
getOperator
(String opAtt) getPackage
(String key) getPatternWithRole
(NodeInfo parent, String role) getQNameAttribute
(NodeInfo element, String localName) getSecondChildExpression
(NodeInfo parent) getTypeAttribute
(NodeInfo element, String attName) loadExpression
(NodeInfo element) loadPackage
(Source source) loadPackageDoc
(NodeInfo doc) void
loadPackageElement
(NodeInfo packageElement, StylesheetPackage pack) makeAtomicComparer
(String name, NodeInfo element) protected SystemFunction
makeEXPathBinaryFunction
(StructuredQName qName, int arity) protected SystemFunction
makeEXPathFileFunction
(StructuredQName qName, int arity) protected UserFunction
makeFunction
(String flags) makeRetainedStaticContext
(NodeInfo element) void
needsEELicense
(String name) void
needsPELicense
(String name) parseAlphaCode
(NodeInfo element, String name) Parse the SequenceType whose value is held in the attribute named "name", as an alphacodeparseAlphaCodeForItemType
(NodeInfo element, String name) parseItemTypeAttribute
(NodeInfo element, String attName) Parse the ItemType whose value is held in the attribute named "name"parseSequenceType
(NodeInfo element, String name) Parse the SequenceType whose value is held in the attribute named "name"static void
processAccumulatorList
(PackageLoaderHE loader, SourceDocument inst, String accumulatorNames) protected boolean
readFunction
(NodeInfo functionElement) protected void
readSchemaNamespaces
(NodeInfo packageElement)
-
Field Details
-
packStack
-
fixups
-
completionActions
-
topLevelPackage
-
allPackages
-
localBindings
-
userFunctions
-
eMap
-
licensableConstructs
-
-
Constructor Details
-
PackageLoaderHE
-
-
Method Details
-
processAccumulatorList
public static void processAccumulatorList(PackageLoaderHE loader, SourceDocument inst, String accumulatorNames) -
getConfiguration
-
getTopLevelPackage
-
getPackage
-
getPackStack
-
addCompletionAction
-
loadPackage
- Specified by:
loadPackage
in interfaceIPackageLoader
- Throws:
XPathException
-
loadPackageDoc
- Specified by:
loadPackageDoc
in interfaceIPackageLoader
- Throws:
XPathException
-
needsPELicense
-
needsEELicense
-
loadPackageElement
public void loadPackageElement(NodeInfo packageElement, StylesheetPackage pack) throws XPathException - Throws:
XPathException
-
addVendorFunctionLibrary
-
readSchemaNamespaces
- Throws:
XPathException
-
readFunction
- Throws:
XPathException
-
makeFunction
-
getChild
Get the n'th element child of an element (zero-based)- Parameters:
parent
- the parent elementn
- which child to get (zero-based)- Returns:
- the n'th child, or null if not available
-
getChildWithRole
-
getFirstChildExpression
- Throws:
XPathException
-
getSecondChildExpression
- Throws:
XPathException
-
getNthChildExpression
- Throws:
XPathException
-
getExpressionWithRole
- Throws:
XPathException
-
loadExpression
- Throws:
XPathException
-
makeRetainedStaticContext
-
fromExportedNamespaces
-
getPatternWithRole
- Throws:
XPathException
-
getTypeAttribute
-
getQNameAttribute
-
getListOfQNameAttribute
public List<StructuredQName> getListOfQNameAttribute(NodeInfo element, String localName) throws XPathException - Throws:
XPathException
-
getIntegerAttribute
Read an integer-valued attribute- Parameters:
element
- the element on which the attribute appearslocalName
- the name of the attribute- Returns:
- the integer value of the attribute if present and correct; or Integer.MIN_VALUE if absent
- Throws:
XPathException
- if the attribute is present but not integer-valued.
-
getInheritedAttribute
-
parseSequenceType
Parse the SequenceType whose value is held in the attribute named "name"- Parameters:
element
- the element containing this attributename
- the local name of the attribute- Returns:
- the SequenceType held in the content of the attribute, or "item()*" if the attribute is absent
- Throws:
XPathException
- if the sequence type is invalid
-
parseAlphaCode
Parse the SequenceType whose value is held in the attribute named "name", as an alphacode- Parameters:
element
- the element containing this attributename
- the local name of the attribute- Returns:
- the SequenceType held in the content of the attribute, or "item()*" if the attribute is absent
- Throws:
XPathException
- if the sequence type is invalid
-
parseAlphaCodeForItemType
- Throws:
XPathException
-
parseItemTypeAttribute
Parse the ItemType whose value is held in the attribute named "name"- Parameters:
element
- the element containing this attributeattName
- the local name of the attribute- Returns:
- the SequenceType held in the content of the attribute, or "item()" if the attribute is absent
- Throws:
XPathException
- if the item type is invalid
-
makeAtomicComparer
- Throws:
XPathException
-
makeEXPathBinaryFunction
protected SystemFunction makeEXPathBinaryFunction(StructuredQName qName, int arity) throws XPathException - Throws:
XPathException
-
makeEXPathFileFunction
protected SystemFunction makeEXPathFileFunction(StructuredQName qName, int arity) throws XPathException - Throws:
XPathException
-
getChildExpressionList
protected static List<Expression> getChildExpressionList(PackageLoaderHE loader, NodeInfo element) throws XPathException - Throws:
XPathException
-
getChildExpressionArray
protected static Expression[] getChildExpressionArray(PackageLoaderHE loader, NodeInfo element) throws XPathException - Throws:
XPathException
-
getOperator
-
processComponentReference
protected boolean processComponentReference(StylesheetPackage pack, ComponentInvocation call) throws XPathException - Throws:
XPathException
-