| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Reader | |
| public static WstxInputSource | Returns: Input source, if entity could be resolved; null if it could not be resolved. In latter case processor may use its own default resolution mechanism.Input source that contains reference to be expanded. parent, URL Reference context to use for resolving path, if
known. If null, reference context of the parent will
be used; and if that is null (which is possible), the
current working directory will be assumed. pathCtxt, String Name/id of the entity being expanded, if this is an
entity expansion; null otherwise (for example, when resolving external
subset). entityName, String Public identifier of the resource, if known; null/empty
otherwise. Default implementation just ignores the identifier. publicId, String System identifier of the resource. Although interface
allows null/empty, default implementation considers this an error. systemId, XMLResolver Custom resolver to use first for resolution,
if any (may be null). customResolver, ReaderConfig Reader configuration object used by the parser that is
resolving the entity cfg, int Xml version as declared by the main parsed
document. Currently only relevant for checking that XML 1.0 document
does not include XML 1.1 external parsed entities.
If XML_V_UNKNOWN, no checks will be done. xmlVersion)Basic external resource resolver implementation; usable both with DTD and entity resolution. |
| public static WstxInputSource | resolveEntityUsing(WstxInputSource refCtxt, String entityName, String publicId, String systemId, XMLResolver resolver, ReaderConfig cfg, int xmlVersion)
A very simple utility expansion method used generally when the only way to resolve an entity is via passed resolver; and where failing to resolve it is not fatal. |
| protected static WstxInputSource | sourceFrom(WstxInputSource
Input source context active when resolving a new
"sub-source"; usually the main document source. parent, ReaderConfig cfg, String Name of the entity to be expanded, if any; may be
null (and currently always is) refName, int xmlVersion, Object Object that should provide the new input source; non-type safe o)Factory method that accepts various types of Objects, and tries to
create a |
| private static WstxInputSource | sourceFromIS(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, InputStream is, String pubId, String sysId)
|
| private static WstxInputSource | sourceFromR(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, Reader r, String pubId, String sysId)
|
| private static WstxInputSource | sourceFromSS(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, StreamSource ssrc)
|
| public static WstxInputSource | sourceFromString(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, String refContent)
We have multiple ways to look at what would it mean to get a String as the resolved result. |
| private static WstxInputSource | sourceFromURL(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, URL url, String pubId)
|
| DefaultInputResolver | back to summary |
|---|---|
| private DefaultInputResolver() | |
| constructOptimizedReader | back to summary |
|---|---|
| public static Reader constructOptimizedReader(ReaderConfig cfg, InputStream in, boolean isXml11, String encoding) throws XMLStreamException | |
| resolveEntity | back to summary |
|---|---|
| public static WstxInputSource resolveEntity(WstxInputSource parent, URL pathCtxt, String entityName, String publicId, String systemId, XMLResolver customResolver, ReaderConfig cfg, int xmlVersion) throws IOException, XMLStreamException Basic external resource resolver implementation; usable both with DTD and entity resolution.
| |
| resolveEntityUsing | back to summary |
|---|---|
| public static WstxInputSource resolveEntityUsing(WstxInputSource refCtxt, String entityName, String publicId, String systemId, XMLResolver resolver, ReaderConfig cfg, int xmlVersion) throws IOException, XMLStreamException A very simple utility expansion method used generally when the only way to resolve an entity is via passed resolver; and where failing to resolve it is not fatal. | |
| sourceFrom | back to summary |
|---|---|
| protected static WstxInputSource sourceFrom(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, Object o) throws IllegalArgumentException, IOException, XMLStreamException Factory method that accepts various types of Objects, and tries to
create a
| |
| sourceFromIS | back to summary |
|---|---|
private static WstxInputSource sourceFromIS(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, InputStream is, String pubId, String sysId) throws IOException, XMLStreamException
| |
| sourceFromR | back to summary |
|---|---|
private static WstxInputSource sourceFromR(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, Reader r, String pubId, String sysId) throws IOException, XMLStreamException
| |
| sourceFromSS | back to summary |
|---|---|
private static WstxInputSource sourceFromSS(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, StreamSource ssrc) throws IOException, XMLStreamException
| |
| sourceFromString | back to summary |
|---|---|
| public static WstxInputSource sourceFromString(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, String refContent) throws IOException, XMLStreamException We have multiple ways to look at what would it mean to get a String as the resolved result. The most straight-forward is to consider it literal replacement (with possible embedded entities), so let's use that (alternative would be to consider it to be a reference like URL -- those need to be returned as appropriate objects instead). Note public to give access for unit tests that need it... | |
| sourceFromURL | back to summary |
|---|---|
private static WstxInputSource sourceFromURL(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, URL url, String pubId) throws IOException, XMLStreamException
| |