gnu.kawa.xml

Class Document

Implemented Interfaces:
Named

public class Document
extends Procedure1

Implement the XQuery function 'document'.

Field Summary

static Document
document

Method Summary

void
apply(CallContext ctx)
Object
apply1(Object arg1)
static boolean
availableCached(Object url, String base)
Check if an XML document is available, caching the result.
static URL
makeURL(Object url)
static URL
makeURL(Object url, Object base)
Resolve relative URI, and return an URL instance.
static KDocument
parse(Object url)
static void
parse(Object name, Consumer out)
static Object
parseCached(Object url, String base)
Parse an XML document, caching the result.
static Object
parseCached(URL url)

Methods inherited from class gnu.mapping.Procedure1

apply0, apply1, apply2, apply3, apply4, applyN, numArgs

Methods inherited from class gnu.mapping.Procedure

apply, apply, apply0, apply1, apply2, apply3, apply4, applyN, check0, check1, check2, check3, check4, checkArgCount, checkN, getName, getProperty, getSetter, getSymbol, match0, match1, match2, match3, match4, matchN, maxArgs, minArgs, name, numArgs, removeProperty, set0, set1, setN, setName, setProperty, setProperty, setSetter, setSymbol, toString

Field Details

document

public static final Document document

Method Details

apply

public void apply(CallContext ctx)
            throws Throwable
Overrides:
apply in interface Procedure

apply1

public Object apply1(Object arg1)
            throws Throwable
Overrides:
apply1 in interface Procedure1

availableCached

public static boolean availableCached(Object url,
                                      String base)
            throws java.net.MalformedURLException
Check if an XML document is available, caching the result. Only positive results are cached; failures are not. Thus it is possible for a false result to be followed by a true result, but not vice versa. This implements the standard XQuery fn:doc-available function.

makeURL

public static URL makeURL(Object url)
            throws java.net.MalformedURLException

makeURL

public static URL makeURL(Object url,
                          Object base)
            throws java.net.MalformedURLException
Resolve relative URI, and return an URL instance.

parse

public static KDocument parse(Object url)
            throws Throwable

parse

public static void parse(Object name,
                         Consumer out)
            throws Throwable

parseCached

public static Object parseCached(Object url,
                                 String base)
            throws Throwable
Parse an XML document, caching the result. Only positive results are cached; failures are not.) This implements the standard XQuery fn:doc function.

parseCached

public static Object parseCached(URL url)
            throws Throwable