Saxon.Api
Class ResourceRequest
-
public class ResourceRequest
A bundle of information made available when requesting resource resolution using
a ResourceResolver. Any of its properties may be absent.
Field Summary |
|
|---|---|
| string | TEXT_NATURE
|
| string | XML_NATURE
|
| string | XQUERY_NATURE
|
| string | XSD_NATURE
|
| string | XSLT_NATURE
|
Property Summary |
|
|---|---|
| Uri | BaseUri The base URI that was used to resolve any relative URI, if known. |
| Encoding | Encoding
The encoding specified in the request, explicitly or implicitly. For example, this
will
be supplied for a call on |
| string | Nature
The |
| string | Purpose
The |
| string | RelativeUri The relative URI that was actually requested, where applicable. |
| Uri | Uri The URI to be dereferenced. If the request was for a relative URI reference, this will be the absolute URI after resolving against the base URI if known; if no base URI is known, it will be the URI as requested. |
| bool | UriIsNamespace
This boolean flag is set to true when the URI takes the form of a namespace URI (rather
than a location
hint). Specifically, it is set when resolving an |
Field Detail
TEXT_NATURE
TEXT_NATURE represents plain text resources (media type = "text/plain"), for example
unparsed text files
XML_NATURE
XML_NATURE represents XML documents with no specific known vocabulary (for example, documents
requested using the doc() function)
XQUERY_NATURE
XQUERY_NATURE represents XQuery modules (main modules or library modules)
Property Detail
BaseUri
The base URI that was used to resolve any relative URI, if known.
Encoding
The encoding specified in the request, explicitly or implicitly. For example, this
will
be supplied for a call on fn:unparsed-text if an encoding argument was supplied;
for fn:parse-json it will be set to UTF-8 unconditionally.
If a specific encoding is requested, the preferred format for the response is a
TextResource containing a Reader or explicit string-valued Content.
If no encoding is requested for a text resource, the preferred format is a TextResource
containing a (binary) Stream: but a TextResource containing a Reader
or Content is acceptable if the data is already in character form so that no decoding
is needed.
Nature
The Nature of the resource, as defined in the RDDL specifications (based on the role
attribute in XLink). Some of the allowed values are provided as constants, for example
TEXT_NATURE, XSLT_NATURE, XQUERY_NATURE.
Purpose
The Purpose of the request, as defined in the RDDL specifications (based on the arcrole
attribute in XLink).
RelativeUri
The relative URI that was actually requested, where applicable.
Uri
The URI to be dereferenced. If the request was for a relative URI reference, this will be the absolute URI after resolving against the base URI if known; if no base URI is known, it will be the URI as requested.
UriIsNamespace
This boolean flag is set to true when the URI takes the form of a namespace URI (rather
than a location
hint). Specifically, it is set when resolving an import module declaration in XQuery when only
the module namespace is known, and when resolving an xsl:import, or an XML Schema import in XSLT
or XQuery, if only the target namespace of the required schema document is known.