Package com.saxonica.functions.qt4
Class ParseHtml
- java.lang.Object
-
- net.sf.saxon.functions.AbstractFunction
-
- net.sf.saxon.functions.SystemFunction
-
- com.saxonica.functions.extfn.Parse
-
- com.saxonica.functions.qt4.ParseHtml
-
- All Implemented Interfaces:
Callable
,FunctionItem
,GroundedValue
,Item
,Sequence
public class ParseHtml extends Parse
Supports the saxon:parse-html() or fn:parse-html, which parses HTML using nu.validator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ParseHtml.Html5Converter
This class "tweaks" the output of nu.validator to deliver what the parse-html() function expects.static class
ParseHtml.HTML5ErrorHandler
-
Constructor Summary
Constructors Constructor Description ParseHtml()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeInfo
call(XPathContext context, Sequence[] arguments)
Evaluate this function call at run-time-
Methods inherited from class com.saxonica.functions.extfn.Parse
setXMLReader
-
Methods inherited from class net.sf.saxon.functions.SystemFunction
dependsOnContextItem, dynamicCall, equals, export, exportAdditionalArguments, exportAttributes, fixArguments, getArity, getCardinality, getContextNode, getDescription, getDetails, getElaborator, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getIntegerBounds, getNetCost, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getSpecialProperties, getStaticBaseUriString, getStreamerName, getUniStringArg, hashCode, importAttributes, isSequenceVariadic, isTrustedResultType, makeCall, makeFunction, makeFunction40, makeFunctionCall, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation, toShortString, toString, typeCheckCaller
-
Methods inherited from class net.sf.saxon.functions.AbstractFunction
atomize, deepEqual40, deepEquals, effectiveBooleanValue, getAnnotations, getUnicodeStringValue, isArray, isMap, makeNewContext, simplify, typeCheck
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sf.saxon.om.FunctionItem
getGenre
-
Methods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, materialize
-
Methods inherited from interface net.sf.saxon.om.Item
getLength, getStringValue, head, isStreamed, itemAt, iterate, reduce, subsequence
-
Methods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
-
-
-
Method Detail
-
call
public NodeInfo call(XPathContext context, Sequence[] arguments) throws XPathException
Description copied from class:Parse
Evaluate this function call at run-time- Specified by:
call
in interfaceCallable
- Overrides:
call
in classParse
- Parameters:
context
- The XPath dynamic evaluation contextarguments
- The values of the arguments to the function call. Each argument value (which is in general a sequence) is supplied in the form of an iterator over the items in the sequence. If required, the supplied sequence can be materialized by calling, for example,new SequenceExtent(arguments[i])
. If the argument is always a singleton, then the single item may be obtained by callingarguments[i].next()
. The implementation is not obliged to read all the items in eachSequenceIterator
if they are not required to compute the result; but if any SequenceIterator is not read to completion, it is good practice to call its close() method.- Returns:
- an iterator over the results of the function. If the result is a single item, it can be
returned in the form of a
SingletonIterator
. If the result is an empty sequence, the method should returnEmptyIterator.getInstance()
- Throws:
XPathException
- if a dynamic error occurs during evaluation of the function. The Saxon run-time code will add information about the error location.
-
-