com.icl.saxon
Class  PIGrabber
java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--com.icl.saxon.PIGrabber
- All Implemented Interfaces: 
- org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
- public class PIGrabber- extends org.xml.sax.helpers.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
 
| Method Summary | 
|  org.xml.sax.InputSource[] | getAssociatedStylesheets()Return list of stylesheets that matched, as an array of InputSource objects
 | 
|  java.lang.String[] | getStylesheetURIs()Get the stylesheet URIs as an array of Strings
 | 
|  void | processingInstruction(java.lang.String target,
                      java.lang.String data)Handle xml-stylesheet PI
 | 
|  void | setBaseURI(java.lang.String uri)
 | 
|  void | setCriteria(java.lang.String media,
            java.lang.String title,
            java.lang.String charset)
 | 
|  void | startElement(java.lang.String uri,
             java.lang.String localName,
             java.lang.String qName,
             org.xml.sax.Attributes attributes)Abort the parse when the first start element tag is found
 | 
 
| Methods inherited from class org.xml.sax.helpers.DefaultHandler | 
| characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
PIGrabber
public PIGrabber()
setCriteria
public void setCriteria(java.lang.String media,
                        java.lang.String title,
                        java.lang.String charset)
setBaseURI
public void setBaseURI(java.lang.String uri)
startElement
public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
- Abort the parse when the first start element tag is found- 
- Overrides:
- startElementin class- org.xml.sax.helpers.DefaultHandler
 
processingInstruction
public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
- Handle xml-stylesheet PI- 
- Overrides:
- processingInstructionin class- org.xml.sax.helpers.DefaultHandler
 
getAssociatedStylesheets
public org.xml.sax.InputSource[] getAssociatedStylesheets()
                                                   throws org.xml.sax.SAXException
- Return list of stylesheets that matched, as an array of InputSource objects- 
- Returns:
- null if there were no matching stylesheets.
- Throws:
- org.xml.sax.SAXException- if any stylesheet includes a fragment identifier, as
 this cannot be mapped to an InputSource, or if a URI cannot be resolved
 
getStylesheetURIs
public java.lang.String[] getStylesheetURIs()
                                     throws org.xml.sax.SAXException
- Get the stylesheet URIs as an array of Strings