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 interfacestatic 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 TypeMethodDescriptionvoidaddCompletionAction(Action action) protected voidaddVendorFunctionLibrary(FunctionLibraryList targetList, Configuration config) static NamespaceMapfromExportedNamespaces(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) intgetIntegerAttribute(NodeInfo element, String localName) Read an integer-valued attributegetListOfQNameAttribute(NodeInfo element, String localName) getNthChildExpression(NodeInfo parent, int n) protected static intgetOperator(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) voidloadPackageElement(NodeInfo packageElement, StylesheetPackage pack) makeAtomicComparer(String name, NodeInfo element) protected SystemFunctionmakeEXPathBinaryFunction(StructuredQName qName, int arity) protected SystemFunctionmakeEXPathFileFunction(StructuredQName qName, int arity) protected UserFunctionmakeFunction(String flags) makeRetainedStaticContext(NodeInfo element) voidneedsEELicense(String name) voidneedsPELicense(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 voidprocessAccumulatorList(PackageLoaderHE loader, SourceDocument inst, String accumulatorNames) protected booleanreadFunction(NodeInfo functionElement) protected voidreadSchemaNamespaces(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:
loadPackagein interfaceIPackageLoader- Throws:
XPathException
-
loadPackageDoc
- Specified by:
loadPackageDocin 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
-