Package net.sf.saxon.trans
Class PackageLoaderHE
- java.lang.Object
- 
- net.sf.saxon.trans.PackageLoaderHE
 
- 
- All Implemented Interfaces:
- IPackageLoader
 - Direct Known Subclasses:
- PackageLoaderPE
 
 public class PackageLoaderHE extends java.lang.Object implements IPackageLoader This class reads the XML exported form of a package and reconstructs the package object in memory.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static interfacePackageLoaderHE.ExpressionLoaderstatic interfacePackageLoaderHE.PatternLoader
 - 
Field SummaryFields Modifier and Type Field Description java.util.Map<java.lang.String,StylesheetPackage>allPackagesjava.util.List<Action>completionActionsprotected static java.util.Map<java.lang.String,PackageLoaderHE.ExpressionLoader>eMapjava.util.Stack<java.util.List<ComponentInvocation>>fixupsprotected static java.util.Map<java.lang.String,java.lang.String>licensableConstructsjava.util.Stack<LocalBinding>localBindingsprotected java.util.Stack<StylesheetPackage>packStackStylesheetPackagetopLevelPackagejava.util.Map<SymbolicName,UserFunction>userFunctions
 - 
Constructor SummaryConstructors Constructor Description PackageLoaderHE(Configuration config)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCompletionAction(Action action)protected voidaddVendorFunctionLibrary(FunctionLibraryList targetList, Configuration config)static NamespaceMapfromExportedNamespaces(java.lang.String nsAtt)NodeInfogetChild(NodeInfo parent, int n)Get the n'th element child of an element (zero-based)protected static Expression[]getChildExpressionArray(PackageLoaderHE loader, NodeInfo element)protected static java.util.List<Expression>getChildExpressionList(PackageLoaderHE loader, NodeInfo element)NodeInfogetChildWithRole(NodeInfo parent, java.lang.String role)ConfigurationgetConfiguration()ExpressiongetExpressionWithRole(NodeInfo parent, java.lang.String role)ExpressiongetFirstChildExpression(NodeInfo parent)java.lang.StringgetInheritedAttribute(NodeInfo element, java.lang.String localName)intgetIntegerAttribute(NodeInfo element, java.lang.String localName)Read an integer-valued attributejava.util.List<StructuredQName>getListOfQNameAttribute(NodeInfo element, java.lang.String localName)ExpressiongetNthChildExpression(NodeInfo parent, int n)protected static intgetOperator(java.lang.String opAtt)StylesheetPackagegetPackage(java.lang.String key)java.util.Stack<StylesheetPackage>getPackStack()PatterngetPatternWithRole(NodeInfo parent, java.lang.String role)StructuredQNamegetQNameAttribute(NodeInfo element, java.lang.String localName)ExpressiongetSecondChildExpression(NodeInfo parent)StylesheetPackagegetTopLevelPackage()SchemaTypegetTypeAttribute(NodeInfo element, java.lang.String attName)ExpressionloadExpression(NodeInfo element)StylesheetPackageloadPackage(javax.xml.transform.Source source)StylesheetPackageloadPackageDoc(NodeInfo doc)voidloadPackageElement(NodeInfo packageElement, StylesheetPackage pack)AtomicComparermakeAtomicComparer(java.lang.String name, NodeInfo element)protected UserFunctionmakeFunction(java.lang.String flags)RetainedStaticContextmakeRetainedStaticContext(NodeInfo element)voidneedsEELicense(java.lang.String name)voidneedsPELicense(java.lang.String name)SequenceTypeparseAlphaCode(NodeInfo element, java.lang.String name)Parse the SequenceType whose value is held in the attribute named "name", as an alphacodeItemTypeparseAlphaCodeForItemType(NodeInfo element, java.lang.String name)ItemTypeparseItemTypeAttribute(NodeInfo element, java.lang.String attName)Parse the ItemType whose value is held in the attribute named "name"SequenceTypeparseSequenceType(NodeInfo element, java.lang.String name)Parse the SequenceType whose value is held in the attribute named "name"static voidprocessAccumulatorList(PackageLoaderHE loader, SourceDocument inst, java.lang.String accumulatorNames)protected booleanprocessComponentReference(StylesheetPackage pack, ComponentInvocation call)UserFunctionreadFunction(NodeInfo functionElement)protected voidreadSchemaNamespaces(NodeInfo packageElement)
 
- 
- 
- 
Field Detail- 
packStackprotected final java.util.Stack<StylesheetPackage> packStack 
 - 
fixupspublic final java.util.Stack<java.util.List<ComponentInvocation>> fixups 
 - 
completionActionspublic final java.util.List<Action> completionActions 
 - 
topLevelPackagepublic StylesheetPackage topLevelPackage 
 - 
allPackagespublic final java.util.Map<java.lang.String,StylesheetPackage> allPackages 
 - 
localBindingspublic java.util.Stack<LocalBinding> localBindings 
 - 
userFunctionspublic final java.util.Map<SymbolicName,UserFunction> userFunctions 
 - 
eMapprotected static final java.util.Map<java.lang.String,PackageLoaderHE.ExpressionLoader> eMap 
 - 
licensableConstructsprotected static final java.util.Map<java.lang.String,java.lang.String> licensableConstructs 
 
- 
 - 
Constructor Detail- 
PackageLoaderHEpublic PackageLoaderHE(Configuration config) 
 
- 
 - 
Method Detail- 
processAccumulatorListpublic static void processAccumulatorList(PackageLoaderHE loader, SourceDocument inst, java.lang.String accumulatorNames) 
 - 
getConfigurationpublic Configuration getConfiguration() 
 - 
getTopLevelPackagepublic StylesheetPackage getTopLevelPackage() 
 - 
getPackagepublic StylesheetPackage getPackage(java.lang.String key) 
 - 
getPackStackpublic java.util.Stack<StylesheetPackage> getPackStack() 
 - 
addCompletionActionpublic void addCompletionAction(Action action) 
 - 
loadPackagepublic StylesheetPackage loadPackage(javax.xml.transform.Source source) throws XPathException - Specified by:
- loadPackagein interface- IPackageLoader
- Throws:
- XPathException
 
 - 
loadPackageDocpublic StylesheetPackage loadPackageDoc(NodeInfo doc) throws XPathException - Specified by:
- loadPackageDocin interface- IPackageLoader
- Throws:
- XPathException
 
 - 
needsPELicensepublic void needsPELicense(java.lang.String name) 
 - 
needsEELicensepublic void needsEELicense(java.lang.String name) 
 - 
loadPackageElementpublic void loadPackageElement(NodeInfo packageElement, StylesheetPackage pack) throws XPathException - Throws:
- XPathException
 
 - 
addVendorFunctionLibraryprotected void addVendorFunctionLibrary(FunctionLibraryList targetList, Configuration config) 
 - 
readSchemaNamespacesprotected void readSchemaNamespaces(NodeInfo packageElement) throws XPathException - Throws:
- XPathException
 
 - 
readFunctionpublic UserFunction readFunction(NodeInfo functionElement) throws XPathException - Throws:
- XPathException
 
 - 
makeFunctionprotected UserFunction makeFunction(java.lang.String flags) 
 - 
getChildpublic NodeInfo getChild(NodeInfo parent, int n) Get the n'th element child of an element (zero-based)- Parameters:
- parent- the parent element
- n- which child to get (zero-based)
- Returns:
- the n'th child, or null if not available
 
 - 
getFirstChildExpressionpublic Expression getFirstChildExpression(NodeInfo parent) throws XPathException - Throws:
- XPathException
 
 - 
getSecondChildExpressionpublic Expression getSecondChildExpression(NodeInfo parent) throws XPathException - Throws:
- XPathException
 
 - 
getNthChildExpressionpublic Expression getNthChildExpression(NodeInfo parent, int n) throws XPathException - Throws:
- XPathException
 
 - 
getExpressionWithRolepublic Expression getExpressionWithRole(NodeInfo parent, java.lang.String role) throws XPathException - Throws:
- XPathException
 
 - 
loadExpressionpublic Expression loadExpression(NodeInfo element) throws XPathException - Throws:
- XPathException
 
 - 
makeRetainedStaticContextpublic RetainedStaticContext makeRetainedStaticContext(NodeInfo element) 
 - 
getPatternWithRolepublic Pattern getPatternWithRole(NodeInfo parent, java.lang.String role) throws XPathException - Throws:
- XPathException
 
 - 
getTypeAttributepublic SchemaType getTypeAttribute(NodeInfo element, java.lang.String attName) 
 - 
getQNameAttributepublic StructuredQName getQNameAttribute(NodeInfo element, java.lang.String localName) 
 - 
getListOfQNameAttributepublic java.util.List<StructuredQName> getListOfQNameAttribute(NodeInfo element, java.lang.String localName) throws XPathException - Throws:
- XPathException
 
 - 
getIntegerAttributepublic int getIntegerAttribute(NodeInfo element, java.lang.String localName) throws XPathException Read an integer-valued attribute- Parameters:
- element- the element on which the attribute appears
- localName- 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.
 
 - 
getInheritedAttributepublic java.lang.String getInheritedAttribute(NodeInfo element, java.lang.String localName) 
 - 
parseSequenceTypepublic SequenceType parseSequenceType(NodeInfo element, java.lang.String name) throws XPathException Parse the SequenceType whose value is held in the attribute named "name"- Parameters:
- element- the element containing this attribute
- name- 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
 
 - 
parseAlphaCodepublic SequenceType parseAlphaCode(NodeInfo element, java.lang.String name) throws XPathException Parse the SequenceType whose value is held in the attribute named "name", as an alphacode- Parameters:
- element- the element containing this attribute
- name- 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
 
 - 
parseAlphaCodeForItemTypepublic ItemType parseAlphaCodeForItemType(NodeInfo element, java.lang.String name) throws XPathException - Throws:
- XPathException
 
 - 
parseItemTypeAttributepublic ItemType parseItemTypeAttribute(NodeInfo element, java.lang.String attName) throws XPathException Parse the ItemType whose value is held in the attribute named "name"- Parameters:
- element- the element containing this attribute
- attName- 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
 
 - 
makeAtomicComparerpublic AtomicComparer makeAtomicComparer(java.lang.String name, NodeInfo element) throws XPathException - Throws:
- XPathException
 
 - 
getChildExpressionListprotected static java.util.List<Expression> getChildExpressionList(PackageLoaderHE loader, NodeInfo element) throws XPathException - Throws:
- XPathException
 
 - 
getChildExpressionArrayprotected static Expression[] getChildExpressionArray(PackageLoaderHE loader, NodeInfo element) throws XPathException - Throws:
- XPathException
 
 - 
getOperatorprotected static int getOperator(java.lang.String opAtt) 
 - 
processComponentReferenceprotected boolean processComponentReference(StylesheetPackage pack, ComponentInvocation call) throws XPathException - Throws:
- XPathException
 
 - 
fromExportedNamespacespublic static NamespaceMap fromExportedNamespaces(java.lang.String nsAtt) 
 
- 
 
-