public abstract class Sender extends Object
Modifier and Type | Method and Description |
---|---|
static void |
configureParser(XMLReader parser)
Configure a SAX parser to ensure it has the correct namesapce properties set
|
static void |
send(Source source,
Receiver receiver,
ParseOptions options)
Send the contents of a Source to a Receiver.
|
public static void send(Source source, Receiver receiver, ParseOptions options) throws XPathException
source
- the source to be copied. Note that if the Source contains an InputStream
or Reader then it will be left open, unless it is an AugmentedSource with the pleaseCloseAfterUse
flag set. On the other hand, if it contains a URI that needs to be dereferenced to obtain
an InputStream, then the InputStream will be closed after use.receiver
- the destination to which it is to be copied. The pipelineConfiguration
of this receiver must have been initialized.options
- Parse options. If source is an AugmentedSource, any options set in the
AugmentedSource are used in preference to those set in options. If neither specifies
a particular option, the defaults from the Configuration are used. If null is supplied,
the parse options from the PipelineConfiguration of the receiver are used.XPathException
- if any error occurspublic static void configureParser(XMLReader parser) throws XPathException
parser
- the parser to be configuredXPathException
- if the parser cannot be configured to the
required settings (namespaces=true, namespace-prefixes=false). Note that the SAX
specification requires every XMLReader to support these settings, so this error implies
that the XMLReader is non-conformant; this is not uncommon in cases where the XMLReader
is user-written.Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.