public class XPointerEngine extends Object
Constructor and Description |
---|
XPointerEngine()
Instantiates a new XPointerEngine.
|
XPointerEngine(net.sf.saxon.s9api.Processor processor)
Instantiates a new XPointerEngine
|
Modifier and Type | Method and Description |
---|---|
String |
execute(String pointerStr,
Source source)
Execute xpointer expression on a xml source returning a xml string
|
int |
executeToDestination(String pointerStr,
Source source,
net.sf.saxon.s9api.Destination destination)
Execute a xpointer expression on a xml source.
|
XPointerErrorHandler |
getXPointerErrorHandler()
Getting the error handler
|
static XPointerErrorHandler |
newDefaultXPointerErrorHandler()
Return a default error handler
|
static XPointerErrorHandler |
newNilXPointerErrorHandler()
Return an error handler which forget error messages
|
XPointerEngine |
setBaseURI(String baseURI)
Setting the base uri for the pointer resolution
The base uri is used for xml:base calculations
|
XPointerEngine |
setLanguage(String language)
Setting the language for the pointer resolution
The language is used for xml:lang calculation
|
XPointerEngine |
setXPointerErrorHandler(XPointerErrorHandler xPointerErrorHandler)
Setting an error handler to capture parsing errors or warnings
|
String |
verifyXPathExpression(Iterable<XmlNsScheme> xmlNsSchemes,
String xpathExpression)
Utility method for verifying xpath expression
|
public XPointerEngine()
public XPointerEngine(net.sf.saxon.s9api.Processor processor)
processor
- the saxon processor to usepublic static XPointerErrorHandler newNilXPointerErrorHandler()
public static XPointerErrorHandler newDefaultXPointerErrorHandler()
public XPointerEngine setBaseURI(String baseURI)
baseURI
- of the parent xmlpublic XPointerEngine setLanguage(String language)
language
- of the parent xmlpublic XPointerErrorHandler getXPointerErrorHandler()
public XPointerEngine setXPointerErrorHandler(XPointerErrorHandler xPointerErrorHandler)
xPointerErrorHandler
- a XPointerErrorHandlerpublic String execute(String pointerStr, Source source)
pointerStr
- xpointer expressionsource
- xml sourcepublic int executeToDestination(String pointerStr, Source source, net.sf.saxon.s9api.Destination destination) throws XPointerException
Destination
pointerStr
- xpointer expressionsource
- xml sourcedestination
- Saxon destination of result streamXPointerException
- the x pointer exceptionpublic String verifyXPathExpression(Iterable<XmlNsScheme> xmlNsSchemes, String xpathExpression)
xmlNsSchemes
- namespaces listxpathExpression
- xpath expression to testCopyright © 2011–2019. All rights reserved.