com.icl.saxon
Class PIGrabber
public
class
PIGrabber
extends DefaultHandler
The PIGrabber class is a SAX ContentHandler 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 |
SAXSource[] | getAssociatedStylesheets()
Return list of stylesheets that matched, as an array of Source objects |
String[] | getStylesheetURIs()
Get the stylesheet URIs as an array of Strings |
void | processingInstruction(String target, String data)
Handle xml-stylesheet PI |
void | setBaseURI(String uri)
Set the base URI |
void | setCriteria(String media, String title, String charset) |
void | setURIResolver(URIResolver resolver)
Set the URI resolver to be used for the href attribute |
void | startElement(String uri, String localName, String qName, Attributes attributes)
Abort the parse when the first start element tag is found |
public SAXSource[] getAssociatedStylesheets()
Return list of stylesheets that matched, as an array of Source objects
Returns: null if there were no matching stylesheets.
Throws: TransformerException if a URI cannot be resolved
public String[] getStylesheetURIs()
Get the stylesheet URIs as an array of Strings
public void processingInstruction(String target, String data)
Handle xml-stylesheet PI
public void setBaseURI(String uri)
Set the base URI
public void setCriteria(String media, String title, String charset)
public void setURIResolver(URIResolver resolver)
Set the URI resolver to be used for the href attribute
public void startElement(String uri, String localName, String qName, Attributes attributes)
Abort the parse when the first start element tag is found