net.sf.saxon.event

Class PIGrabber

public class PIGrabber extends ProxyReceiver

The PIGrabber class is a Receiver that looks for xml-stylesheet processing instructions and tests whether they match specified criteria; for those that do, it creates an InputSource object referring to the relevant stylesheet

Author: Michael H. Kay

Method Summary
Source[]getAssociatedStylesheets()
Return list of stylesheets that matched, as an array of Source objects
booleanisTerminated()
Determine whether the parse terminated because the first start element tag was found
voidopen()
voidprocessingInstruction(String target, CharSequence data, int locationId, int properties)
Handle xml-stylesheet PI
voidsetBaseURI(String uri)
Set the base URI
voidsetCriteria(String media, String title, String charset)
voidsetFactory(Configuration config)
voidsetURIResolver(URIResolver resolver)
Set the URI resolver to be used for the href attribute
voidstartElement(int namecode, int typecode, int locationId, int properties)
Abort the parse when the first start element tag is found

Method Detail

getAssociatedStylesheets

public Source[] getAssociatedStylesheets()
Return list of stylesheets that matched, as an array of Source objects

Returns: null if there were no matching stylesheets.

Throws: net.sf.saxon.trans.XPathException if a URI cannot be resolved

isTerminated

public boolean isTerminated()
Determine whether the parse terminated because the first start element tag was found

open

public void open()

processingInstruction

public void processingInstruction(String target, CharSequence data, int locationId, int properties)
Handle xml-stylesheet PI

setBaseURI

public void setBaseURI(String uri)
Set the base URI

setCriteria

public void setCriteria(String media, String title, String charset)

setFactory

public void setFactory(Configuration config)

setURIResolver

public void setURIResolver(URIResolver resolver)
Set the URI resolver to be used for the href attribute

startElement

public void startElement(int namecode, int typecode, int locationId, int properties)
Abort the parse when the first start element tag is found