Package net.sf.saxon.trans.packages
Class PackageInspector
- java.lang.Object
-
- net.sf.saxon.event.SequenceReceiver
-
- net.sf.saxon.event.ProxyReceiver
-
- net.sf.saxon.trans.packages.PackageInspector
-
public class PackageInspector extends ProxyReceiver
The PIGrabber class is a Receiver that looks at an incoming stylesheet document and extracts the package name and version from the root element; parsing is then abandoned.- Author:
- Michael H. Kay
-
-
Field Summary
-
Fields inherited from class net.sf.saxon.event.ProxyReceiver
nextReceiver
-
Fields inherited from class net.sf.saxon.event.SequenceReceiver
pipelineConfiguration, previousAtomic, systemId
-
Fields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattribute(NodeName name, SimpleType typeCode, CharSequence value, Location locationId, int properties)Notify an attribute.static PackageDetailsgetPackageDetails(File top, Configuration config)voidstartElement(NodeName namecode, SchemaType typecode, Location location, int properties)Abort the parse when the first start element tag is found-
Methods inherited from class net.sf.saxon.event.ProxyReceiver
append, characters, close, comment, endDocument, endElement, getNamePool, getNextReceiver, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocument, usesTypeAnnotations
-
Methods inherited from class net.sf.saxon.event.SequenceReceiver
append, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getPipelineConfiguration, getSystemId, handlesAppend
-
-
-
-
Method Detail
-
startElement
public void startElement(NodeName namecode, SchemaType typecode, Location location, int properties) throws XPathException
Abort the parse when the first start element tag is found- Specified by:
startElementin interfaceReceiver- Overrides:
startElementin classProxyReceiver- Parameters:
namecode- integer code identifying the name of the element within the name pool.typecode- the element's type annotation.location- a location associated with the event (typically either a location in the source document or the stylesheet)properties- properties of the element node- Throws:
XPathException- if an error occurs
-
attribute
public void attribute(NodeName name, SimpleType typeCode, CharSequence value, Location locationId, int properties) throws XPathException
Notify an attribute. Attributes are notified after the startElement event, and before any children. Namespaces and attributes may be intermingled.- Specified by:
attributein interfaceReceiver- Overrides:
attributein classProxyReceiver- Parameters:
name- The name of the attributetypeCode- The type of the attributevalue-locationId- the location of the node in the source, or of the instruction that created itproperties- Bit significant value. The following bits are defined:- DISABLE_ESCAPING
- Disable escaping for this attribute
- NO_SPECIAL_CHARACTERS
- Attribute value contains no special characters
- Throws:
XPathException- if an error occurs
-
getPackageDetails
public static PackageDetails getPackageDetails(File top, Configuration config) throws XPathException
- Throws:
XPathException
-
-