This class implements a SAX EntityResolver, StAX XMLResolver, Schema Validation LSResourceResolver and Transform URIResolver.
Modifier and Type | Class and Description |
---|---|
pack-priv class | CatalogResolverImpl.
Implements LSInput. |
Modifier and Type | Field and Description |
---|---|
pack-priv Catalog | |
pack-priv CatalogResolverImpl | |
pack-priv CatalogResolver. |
Access | Constructor and Description |
---|---|
public | CatalogResolverImpl(Catalog
A Catalog. catalog)Construct an instance of the CatalogResolver from a Catalog. |
public | CatalogResolverImpl(Catalog
a Catalog object catalog, CatalogResolver.the action type actionConstruct an instance of the CatalogResolver from a Catalog and the
|
Modifier and Type | Method and Description |
---|---|
public Source | resolve(String
the href attribute that specifies the URI of a style sheet,
which may be relative or absolute href, String The base URI against which the href attribute will be made
absolute if the absolute URI is required base)Implements javax. Implements URIResolver. |
public InputSource | resolveEntity(String
the public identifier of the external entity being
referenced, or null if none was supplied publicId, String the system identifier of the external entity being
referenced. A system identifier is required on all external entities. XML
requires a system identifier on all external entities, so this value is
always specified. systemId)Implements javax. Implements |
public InputStream | resolveEntity(String
the public identifier of the external entity being
referenced, or null if none was supplied publicId, String the system identifier of the external entity being
referenced. A system identifier is required on all external entities. XML
requires a system identifier on all external entities, so this value is
always specified. systemId, String the absolute base URI, not used by the CatalogResolver baseUri, String the namespace of the entity to resolve, not used by the
CatalogResolver. namespace)Implements javax. Implements |
public LSInput | resolveResource(String
the type of the resource being resolved,
not used by the CatalogResolver type, String the namespace of the resource being resolved,
not used by the CatalogResolver namespaceURI, String the public identifier of the external entity being
referenced, or publicId, String null if no public identifier was
supplied or if the resource is not an entity.the system identifier, a URI reference of the
external resource being referenced systemId, String the absolute base URI, not used by the CatalogResolver baseURI)Implements javax. Implements |
private void |
catalog | back to summary |
---|---|
pack-priv Catalog catalog |
entityResolver | back to summary |
---|---|
pack-priv CatalogResolverImpl entityResolver |
resolveType | back to summary |
---|---|
pack-priv CatalogResolver. |
CatalogResolverImpl | back to summary |
---|---|
public CatalogResolverImpl(Catalog catalog) Construct an instance of the CatalogResolver from a Catalog.
|
CatalogResolverImpl | back to summary |
---|---|
public CatalogResolverImpl(Catalog catalog, CatalogResolver. Construct an instance of the CatalogResolver from a Catalog and the
|
resolve | back to summary |
---|---|
public Source resolve(String href, String base) Implements javax. Doc from javax. Implements URIResolver. The method searches through the catalog entries
in the main and alternative catalogs to attempt to find a match
with the specified
If the value is a URN, the
|
resolveEntity | back to summary |
---|---|
public InputSource resolveEntity(String publicId, String systemId) Implements javax. Doc from javax. Implements
|
resolveEntity | back to summary |
---|---|
public InputStream resolveEntity(String publicId, String systemId, String baseUri, String namespace) Implements javax. Doc from javax. Implements
The
|
resolveResource | back to summary |
---|---|
public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) Implements javax. Doc from javax. Implements
The
|
setEntityResolver | back to summary |
---|---|
private void setEntityResolver(SAXSource source) Establish an entityResolver for newly resolved URIs. This is called from the URIResolver to set an EntityResolver on the SAX parser to be used for new XML documents that are encountered as a result of the document() function, xsl:import, or xsl:include. This is done because the XSLT processor calls out to the SAXParserFactory itself to create a new SAXParser to parse the new document. The new parser does not automatically inherit the EntityResolver of the original (although arguably it should). Quote from JAXP specification on Class SAXTransformerFactory:
|
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public String | getBaseURI()
Implements org. The base URI to be used (see section 5.1.4 in [IETF RFC 2396]) for
resolving a relative |
public InputStream | getByteStream()
Implements org. An attribute of a language and binding dependent type that represents a stream of bytes. |
public boolean | getCertifiedText()
Implements org. If set to true, assume that the input is certified (see section 2.13 in [XML 1.1]) when parsing [XML 1.1]. |
public Reader | getCharacterStream()
Implements org. An attribute of a language and binding dependent type that represents a stream of 16-bit units. |
public String | |
public String | getPublicId()
Implements org. The public identifier for this input source. |
public String | |
public String | getSystemId()
Implements org. The system identifier, a URI reference [IETF RFC 2396], for this input source. |
public void | setBaseURI(String baseURI)
Implements org. The base URI to be used (see section 5.1.4 in [IETF RFC 2396]) for
resolving a relative |
public void | setByteStream(InputStream byteStream)
Implements org. An attribute of a language and binding dependent type that represents a stream of bytes. |
public void | setCertifiedText(boolean certifiedText)
Implements org. If set to true, assume that the input is certified (see section 2.13 in [XML 1.1]) when parsing [XML 1.1]. |
public void | setCharacterStream(Reader characterStream)
Implements org. An attribute of a language and binding dependent type that represents a stream of 16-bit units. |
public void | setEncoding(String encoding)
Implements org. The character encoding, if known. |
public void | setPublicId(String publicId)
Implements org. The public identifier for this input source. |
public void | setStringData(String stringData)
Implements org. String data to parse. |
public void | setSystemId(String systemId)
Implements org. The system identifier, a URI reference [IETF RFC 2396], for this input source. |
systemId | back to summary |
---|---|
private String systemId |
LSInputImpl | back to summary |
---|---|
public LSInputImpl(String systemId) |
getBaseURI | back to summary |
---|---|
public String getBaseURI() Implements org. Doc from org. The base URI to be used (see section 5.1.4 in [IETF RFC 2396]) for
resolving a relative
|
getByteStream | back to summary |
---|---|
public InputStream getByteStream() Implements org. Doc from org. An attribute of a language and binding dependent type that represents
a stream of bytes.
|
getCertifiedText | back to summary |
---|---|
public boolean getCertifiedText() Implements org. Doc from org. If set to true, assume that the input is certified (see section 2.13 in [XML 1.1]) when parsing [XML 1.1].
|
getCharacterStream | back to summary |
---|---|
public Reader getCharacterStream() Implements org. Doc from org. An attribute of a language and binding dependent type that represents a stream of 16-bit units. The application must encode the stream using UTF-16 (defined in [Unicode] and in [ISO/IEC 10646]). It is not a requirement to have an XML declaration when using character streams. If an XML declaration is present, the value of the encoding attribute will be ignored.
|
getEncoding | back to summary |
---|---|
public String getEncoding() Implements org. Doc from org. The character encoding, if known. The encoding must be a string
acceptable for an XML encoding declaration ([XML 1.0] section
4.3.3 "Character Encoding in Entities").
|
getPublicId | back to summary |
---|---|
public String getPublicId() Implements org. Doc from org. The public identifier for this input source. This may be mapped to an input source using an implementation dependent mechanism (such as catalogues or other mappings). The public identifier, if specified, may also be reported as part of the location information when errors are reported.
|
getStringData | back to summary |
---|---|
public String getStringData() Implements org. Doc from org. String data to parse. If provided, this will always be treated as a
sequence of 16-bit units (UTF-16 encoded characters). It is not a
requirement to have an XML declaration when using
|
getSystemId | back to summary |
---|---|
public String getSystemId() Implements org. Doc from org. The system identifier, a URI reference [IETF RFC 2396], for this
input source. The system identifier is optional if there is a byte
stream, a character stream, or string data. It is still useful to
provide one, since the application will use it to resolve any
relative URIs and can include it in error messages and warnings. (The
LSParser will only attempt to fetch the resource identified by the
URI reference if there is no other input available in the input
source.)
|
setBaseURI | back to summary |
---|---|
public void setBaseURI(String baseURI) Implements org. Doc from org. The base URI to be used (see section 5.1.4 in [IETF RFC 2396]) for
resolving a relative
|
setByteStream | back to summary |
---|---|
public void setByteStream(InputStream byteStream) Implements org. Doc from org. An attribute of a language and binding dependent type that represents
a stream of bytes.
|
setCertifiedText | back to summary |
---|---|
public void setCertifiedText(boolean certifiedText) Implements org. Doc from org. If set to true, assume that the input is certified (see section 2.13 in [XML 1.1]) when parsing [XML 1.1].
|
setCharacterStream | back to summary |
---|---|
public void setCharacterStream(Reader characterStream) Implements org. Doc from org. An attribute of a language and binding dependent type that represents a stream of 16-bit units. The application must encode the stream using UTF-16 (defined in [Unicode] and in [ISO/IEC 10646]). It is not a requirement to have an XML declaration when using character streams. If an XML declaration is present, the value of the encoding attribute will be ignored.
|
setEncoding | back to summary |
---|---|
public void setEncoding(String encoding) Implements org. Doc from org. The character encoding, if known. The encoding must be a string
acceptable for an XML encoding declaration ([XML 1.0] section
4.3.3 "Character Encoding in Entities").
|
setPublicId | back to summary |
---|---|
public void setPublicId(String publicId) Implements org. Doc from org. The public identifier for this input source. This may be mapped to an input source using an implementation dependent mechanism (such as catalogues or other mappings). The public identifier, if specified, may also be reported as part of the location information when errors are reported.
|
setStringData | back to summary |
---|---|
public void setStringData(String stringData) Implements org. Doc from org. String data to parse. If provided, this will always be treated as a
sequence of 16-bit units (UTF-16 encoded characters). It is not a
requirement to have an XML declaration when using
|
setSystemId | back to summary |
---|---|
public void setSystemId(String systemId) Implements org. Doc from org. The system identifier, a URI reference [IETF RFC 2396], for this
input source. The system identifier is optional if there is a byte
stream, a character stream, or string data. It is still useful to
provide one, since the application will use it to resolve any
relative URIs and can include it in error messages and warnings. (The
LSParser will only attempt to fetch the resource identified by the
URI reference if there is no other input available in the input
source.)
|