Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.saxon.event
Class PIGrabber

    java.lang.Object
      net.sf.saxon.event.SequenceReceiver
          net.sf.saxon.event.ProxyReceiver
              net.sf.saxon.event.PIGrabber

All Implemented Interfaces:
  Receiver, javax.xml.transform.Result

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

Field Summary

Fields inherited from class net.sf.saxon.event.ProxyReceiver
`nextReceiver, systemId`

Fields inherited from class net.sf.saxon.event.SequenceReceiver
`pipelineConfiguration, previousAtomic`

Fields inherited from interface javax.xml.transform.Result
`PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING`

Constructor Summary
`PIGrabber()`

Method Summary
`javax.xml.transform.Source[]` | `getAssociatedStylesheets()` Return list of stylesheets that matched, as an array of Source objects
`boolean` | `isTerminated()` Determine whether the parse terminated because the first start element tag was found
`void` | `open()` Start of event stream
`void` | `processingInstruction(java.lang.String target, java.lang.CharSequence data, int locationId, int properties)` Handle xml-stylesheet PI
`void` | `setBaseURI(java.lang.String uri)` Set the base URI
`void` | `setCriteria(java.lang.String media, java.lang.String title, java.lang.String charset)`
`void` | `setFactory(Configuration config)`
`void` | `setURIResolver(javax.xml.transform.URIResolver resolver)` Set the URI resolver to be used for the href attribute
`void` | `startElement(int namecode, int typecode, int locationId, int properties)` Abort the parse when the first start element tag is found

Methods inherited from class net.sf.saxon.event.ProxyReceiver
`attribute, characters, close, comment, endDocument, endElement, getConfiguration, getDocumentLocator, getNamePool, getSystemId, getUnderlyingReceiver, namespace, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocument`

Methods inherited from class net.sf.saxon.event.SequenceReceiver
`append, getPipelineConfiguration`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PIGrabber

    public PIGrabber()

Method Detail

### setFactory

    public void setFactory(Configuration config)

### setCriteria

    public void setCriteria(java.lang.String media,
                            java.lang.String title,
                            java.lang.String charset)

### setBaseURI

    public void setBaseURI(java.lang.String uri)

  Set the base URI

### setURIResolver

    public void setURIResolver(javax.xml.transform.URIResolver resolver)

  Set the URI resolver to be used for the href attribute

### open

    public void open()

  Description copied from class: `ProxyReceiver`
  Start of event stream

  Specified by:
    `open` in interface `Receiver`
  Overrides:
    `open` in class `ProxyReceiver`

### startElement

    public void startElement(int namecode,
                             int typecode,
                             int locationId,
                             int properties)
                      throws XPathException

  Abort the parse when the first start element tag is found

  Specified by:
    `startElement` in interface `Receiver`
  Overrides:
    `startElement` in class `ProxyReceiver`
  Parameters:
    `namecode` - integer code identifying the name of the element within the name pool.
    `typecode` - integer code identifying the element's type within the name pool.
    `properties` - properties of the element node
  Throws:
    `XPathException`

### isTerminated

    public boolean isTerminated()

  Determine whether the parse terminated because the first start element tag was found

### processingInstruction

    public void processingInstruction(java.lang.String target,
                                      java.lang.CharSequence data,
                                      int locationId,
                                      int properties)
                               throws XPathException

  Handle xml-stylesheet PI

  Specified by:
    `processingInstruction` in interface `Receiver`
  Overrides:
    `processingInstruction` in class `ProxyReceiver`
  Throws:
    `XPathException`

### getAssociatedStylesheets

    public javax.xml.transform.Source[] getAssociatedStylesheets()
                                                          throws javax.xml.transform.TransformerException

  Return list of stylesheets that matched, as an array of Source objects

  Returns:
    null if there were no matching stylesheets.
  Throws:
    `XPathException` - if a URI cannot be resolved
    `javax.xml.transform.TransformerException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD