< prev index next >
src/java.xml/share/classes/javax/xml/catalog/CatalogFeatures.java
Print this page
*** 30,133 ****
import java.util.Map;
import jdk.xml.internal.SecuritySupport;
/**
* The CatalogFeatures holds a collection of features and properties.
- * <p>
*
*
* <table class="plain">
* <caption>Catalog Features</caption>
* <thead>
* <tr>
! * <th rowspan="2">Feature</th>
! * <th rowspan="2">Description</th>
! * <th rowspan="2">Property Name</th>
! * <th rowspan="2">System Property [1]</th>
! * <th rowspan="2">jaxp.properties [1]</th>
! * <th colspan="2" style="text-align:center">Value [2]</th>
! * <th rowspan="2">Action</th>
* </tr>
* <tr>
! * <th>Type</th>
! * <th>Value</th>
* </tr>
* </thead>
* <tbody>
*
* <tr>
! * <td><a id="FILES">FILES</a></td>
* <td>A semicolon-delimited list of URIs to locate the catalog files.
* The URIs must be absolute and have a URL protocol handler for the URI scheme.
* </td>
* <td>javax.xml.catalog.files</td>
* <td>javax.xml.catalog.files</td>
* <td>javax.xml.catalog.files</td>
* <td>String</td>
! * <td>URIs</td>
! * <td>
* Reads the first catalog as the current catalog; Loads others if no match
* is found in the current catalog including delegate catalogs if any.
* </td>
* </tr>
*
* <tr>
! * <td rowspan="2"><a id="PREFER">PREFER</a></td>
* <td rowspan="2">Indicates the preference between the public and system
* identifiers. The default value is public [3].</td>
* <td rowspan="2">javax.xml.catalog.prefer</td>
* <td rowspan="2">N/A</td>
* <td rowspan="2">N/A</td>
* <td rowspan="2">String</td>
! * <td>{@code system}</td>
! * <td>Searches system entries for a match; Searches public entries when
* external identifier specifies only a public identifier</td>
* </tr>
* <tr>
! * <td>{@code public}</td>
! * <td>Searches system entries for a match; Searches public entries when
* there is no matching system entry.</td>
* </tr>
*
* <tr>
! * <td rowspan="2"><a id="DEFER">DEFER</a></td>
* <td rowspan="2">Indicates that the alternative catalogs including those
* specified in delegate entries or nextCatalog are not read until they are
* needed. The default value is true.</td>
* <td rowspan="2">javax.xml.catalog.defer [4]</td>
* <td rowspan="2">javax.xml.catalog.defer</td>
* <td rowspan="2">javax.xml.catalog.defer</td>
* <td rowspan="2">String</td>
! * <td>{@code true}</td>
! * <td>Loads alternative catalogs as needed.
* </td>
* </tr>
* <tr>
! * <td>{@code false}</td>
! * <td>Loads all catalogs[5]. </td>
* </tr>
*
* <tr>
! * <td rowspan="3"><a id="RESOLVE">RESOLVE</a></td>
* <td rowspan="3">Determines the action if there is no matching entry found after
* all of the specified catalogs are exhausted. The default is strict.</td>
* <td rowspan="3">javax.xml.catalog.resolve [4]</td>
* <td rowspan="3">javax.xml.catalog.resolve</td>
* <td rowspan="3">javax.xml.catalog.resolve</td>
* <td rowspan="3">String</td>
! * <td>{@code strict}</td>
! * <td>Throws CatalogException if there is no match.
* </td>
* </tr>
* <tr>
! * <td>{@code continue}</td>
! * <td>Allows the XML parser to continue as if there is no match.
* </td>
* </tr>
* <tr>
! * <td>{@code ignore}</td>
! * <td>Tells the XML parser to skip the external references if there no match.
* </td>
* </tr>
*
* </tbody>
* </table>
--- 30,140 ----
import java.util.Map;
import jdk.xml.internal.SecuritySupport;
/**
* The CatalogFeatures holds a collection of features and properties.
*
*
* <table class="plain">
* <caption>Catalog Features</caption>
* <thead>
* <tr>
! * <th scope="col" rowspan="2">Feature</th>
! * <th scope="col" rowspan="2">Description</th>
! * <th scope="col" rowspan="2">Property Name</th>
! * <th scope="col" rowspan="2">System Property [1]</th>
! * <th scope="col" rowspan="2">jaxp.properties [1]</th>
! * <th scope="col" colspan="2" style="text-align:center">Value [2]</th>
! * <th id="Action" rowspan="2">Action</th>
* </tr>
* <tr>
! * <th id="VType">Type</th>
! * <th id="VValue">Value</th>
* </tr>
* </thead>
+ *
* <tbody>
*
* <tr>
! * <th scope="row" style="font-weight:normal" id="FILES">FILES</th>
* <td>A semicolon-delimited list of URIs to locate the catalog files.
* The URIs must be absolute and have a URL protocol handler for the URI scheme.
* </td>
* <td>javax.xml.catalog.files</td>
* <td>javax.xml.catalog.files</td>
* <td>javax.xml.catalog.files</td>
* <td>String</td>
! * <th id="URIs" scope="row" style="font-weight:normal">URIs</th>
! * <td headers="FILES URIs Action">
* Reads the first catalog as the current catalog; Loads others if no match
* is found in the current catalog including delegate catalogs if any.
* </td>
* </tr>
*
* <tr>
! * <th rowspan="2" scope="row" style="font-weight:normal" id="PREFER">PREFER</th>
* <td rowspan="2">Indicates the preference between the public and system
* identifiers. The default value is public [3].</td>
* <td rowspan="2">javax.xml.catalog.prefer</td>
* <td rowspan="2">N/A</td>
* <td rowspan="2">N/A</td>
* <td rowspan="2">String</td>
! * <th scope="row" id="system" style="font-weight:normal">{@code system}</th>
! * <td headers="PREFER system Action">
! * Searches system entries for a match; Searches public entries when
* external identifier specifies only a public identifier</td>
* </tr>
* <tr>
! * <th scope="row" id="public" style="font-weight:normal">{@code public}</th>
! * <td headers="PREFER public Action">
! * Searches system entries for a match; Searches public entries when
* there is no matching system entry.</td>
* </tr>
*
* <tr>
! * <th rowspan="2" scope="row" style="font-weight:normal" id="DEFER">DEFER</th>
* <td rowspan="2">Indicates that the alternative catalogs including those
* specified in delegate entries or nextCatalog are not read until they are
* needed. The default value is true.</td>
* <td rowspan="2">javax.xml.catalog.defer [4]</td>
* <td rowspan="2">javax.xml.catalog.defer</td>
* <td rowspan="2">javax.xml.catalog.defer</td>
* <td rowspan="2">String</td>
! * <th scope="row" id="true" style="font-weight:normal">{@code true}</th>
! * <td headers="DEFER true Action">
! * Loads alternative catalogs as needed.
* </td>
* </tr>
* <tr>
! * <th scope="row" id="false" style="font-weight:normal">{@code false}</th>
! * <td headers="DEFER false Action">
! * Loads all catalogs[5]. </td>
* </tr>
*
* <tr>
! * <th rowspan="3" scope="row" style="font-weight:normal" id="RESOLVE">RESOLVE</th>
* <td rowspan="3">Determines the action if there is no matching entry found after
* all of the specified catalogs are exhausted. The default is strict.</td>
* <td rowspan="3">javax.xml.catalog.resolve [4]</td>
* <td rowspan="3">javax.xml.catalog.resolve</td>
* <td rowspan="3">javax.xml.catalog.resolve</td>
* <td rowspan="3">String</td>
! * <th scope="row" id="strict" style="font-weight:normal">{@code strict}</th>
! * <td headers="RESOLVE strict Action">
! * Throws CatalogException if there is no match.
* </td>
* </tr>
* <tr>
! * <th scope="row" id="continue" style="font-weight:normal">{@code continue}</th>
! * <td headers="RESOLVE continue Action">
! * Allows the XML parser to continue as if there is no match.
* </td>
* </tr>
* <tr>
! * <th scope="row" id="ignore" style="font-weight:normal">{@code ignore}</th>
! * <td headers="RESOLVE ignore Action">
! * Tells the XML parser to skip the external references if there no match.
* </td>
* </tr>
*
* </tbody>
* </table>
*** 154,164 ****
* of the main Catalog file will be used.
* <p>
* <b>[5]</b> If the intention is to share an entire catalog store, it may be desirable to
* set the property {@code javax.xml.catalog.defer} to false to allow the entire
* catalog to be pre-loaded.
! * <p>
* <h3>Scope and Order</h3>
* Features and properties can be set through the catalog file, the Catalog API,
* system properties, and {@code jaxp.properties}, with a preference in the same order.
* <p>
* Properties that are specified as attributes in the catalog file for the
--- 161,171 ----
* of the main Catalog file will be used.
* <p>
* <b>[5]</b> If the intention is to share an entire catalog store, it may be desirable to
* set the property {@code javax.xml.catalog.defer} to false to allow the entire
* catalog to be pre-loaded.
! *
* <h3>Scope and Order</h3>
* Features and properties can be set through the catalog file, the Catalog API,
* system properties, and {@code jaxp.properties}, with a preference in the same order.
* <p>
* Properties that are specified as attributes in the catalog file for the
*** 193,212 ****
.with(Feature.DEFER, "true")
.with(Feature.RESOLVE, "ignore")
.build();
* }</pre>
*
- * <p>
* <h3>JAXP XML Processor Support</h3>
* The Catalog Features are supported throughout the JAXP processors, including
* SAX and DOM ({@link javax.xml.parsers}), and StAX parsers ({@link javax.xml.stream}),
* Schema Validation ({@link javax.xml.validation}), and XML Transformation
* ({@link javax.xml.transform}). The features described above can be set through JAXP
* factories or processors that define a setProperty or setAttribute interface.
* For example, the following code snippet sets a URI to a catalog file on a SAX
* parser through the {@code javax.xml.catalog.files} property:
! * <p>
* <pre>{@code
* SAXParserFactory spf = SAXParserFactory.newInstance();
* spf.setFeature(XMLConstants.USE_CATALOG, true); [1]
* SAXParser parser = spf.newSAXParser();
* parser.setProperty(CatalogFeatures.Feature.FILES.getPropertyName(), "file:///etc/xml/catalog");
--- 200,218 ----
.with(Feature.DEFER, "true")
.with(Feature.RESOLVE, "ignore")
.build();
* }</pre>
*
* <h3>JAXP XML Processor Support</h3>
* The Catalog Features are supported throughout the JAXP processors, including
* SAX and DOM ({@link javax.xml.parsers}), and StAX parsers ({@link javax.xml.stream}),
* Schema Validation ({@link javax.xml.validation}), and XML Transformation
* ({@link javax.xml.transform}). The features described above can be set through JAXP
* factories or processors that define a setProperty or setAttribute interface.
* For example, the following code snippet sets a URI to a catalog file on a SAX
* parser through the {@code javax.xml.catalog.files} property:
! *
* <pre>{@code
* SAXParserFactory spf = SAXParserFactory.newInstance();
* spf.setFeature(XMLConstants.USE_CATALOG, true); [1]
* SAXParser parser = spf.newSAXParser();
* parser.setProperty(CatalogFeatures.Feature.FILES.getPropertyName(), "file:///etc/xml/catalog");
*** 238,262 ****
*
* <p>
* The Catalog support is available for any process in the JAXP library that
* supports a resolver. The following table lists all such processes.
*
- * <p>
* <h3><a id="ProcessesWithCatalogSupport">Processes with Catalog Support</a></h3>
*
* <table class="striped">
* <caption>Processes with Catalog Support</caption>
* <thead>
* <tr>
! * <th>Process</th>
! * <th>Catalog Entry Type</th>
! * <th>Example</th>
* </tr>
* </thead>
* <tbody>
* <tr>
! * <td>DTDs and external entities</td>
* <td>public, system</td>
* <td>
* <pre>{@literal
The following DTD reference:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
--- 244,267 ----
*
* <p>
* The Catalog support is available for any process in the JAXP library that
* supports a resolver. The following table lists all such processes.
*
* <h3><a id="ProcessesWithCatalogSupport">Processes with Catalog Support</a></h3>
*
* <table class="striped">
* <caption>Processes with Catalog Support</caption>
* <thead>
* <tr>
! * <th scope="col">Process</th>
! * <th scope="col">Catalog Entry Type</th>
! * <th scope="col">Example</th>
* </tr>
* </thead>
* <tbody>
* <tr>
! * <th scope="row">DTDs and external entities</th>
* <td>public, system</td>
* <td>
* <pre>{@literal
The following DTD reference:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
*** 267,277 ****
<systemSuffix systemIdSuffix="html1-strict.dtd" uri="catalog/xhtml1-strict.dtd"/>
* }</pre>
* </td>
* </tr>
* <tr>
! * <td>XInclude</td>
* <td>uri</td>
* <td>
* <pre>{@literal
The following XInclude element:
<xi:include href="http://openjdk.java.net/xml/disclaimer.xml"/>
--- 272,282 ----
<systemSuffix systemIdSuffix="html1-strict.dtd" uri="catalog/xhtml1-strict.dtd"/>
* }</pre>
* </td>
* </tr>
* <tr>
! * <th scope="row">XInclude</th>
* <td>uri</td>
* <td>
* <pre>{@literal
The following XInclude element:
<xi:include href="http://openjdk.java.net/xml/disclaimer.xml"/>
*** 282,292 ****
<uriSuffix uriSuffix="disclaimer.xml" uri="file:///pathto/local/disclaimer.xml"/>
* }</pre>
* </td>
* </tr>
* <tr>
! * <td>XSD import</td>
* <td>uri</td>
* <td>
* <pre>{@literal
The following import element:
<xsd:import namespace="http://openjdk.java.net/xsd/XSDImport_person"
--- 287,297 ----
<uriSuffix uriSuffix="disclaimer.xml" uri="file:///pathto/local/disclaimer.xml"/>
* }</pre>
* </td>
* </tr>
* <tr>
! * <th scope="row">XSD import</th>
* <td>uri</td>
* <td>
* <pre>{@literal
The following import element:
<xsd:import namespace="http://openjdk.java.net/xsd/XSDImport_person"
*** 300,310 ****
<uriSuffix uriSuffix="http://openjdk.java.net/xsd/XSDImport_person" uri="file:///pathto/local/XSDImport_person.xsd"/>
* }</pre>
* </td>
* </tr>
* <tr>
! * <td>XSD include</td>
* <td>uri</td>
* <td>
* <pre>{@literal
The following include element:
<xsd:include schemaLocation="http://openjdk.java.net/xsd/XSDInclude_person.xsd"/>
--- 305,315 ----
<uriSuffix uriSuffix="http://openjdk.java.net/xsd/XSDImport_person" uri="file:///pathto/local/XSDImport_person.xsd"/>
* }</pre>
* </td>
* </tr>
* <tr>
! * <th scope="row">XSD include</th>
* <td>uri</td>
* <td>
* <pre>{@literal
The following include element:
<xsd:include schemaLocation="http://openjdk.java.net/xsd/XSDInclude_person.xsd"/>
*** 315,325 ****
<uriSuffix uriSuffix="XSDInclude_person.xsd" uri="file:///pathto/local/XSDInclude_person.xsd"/>
* }</pre>
* </td>
* </tr>
* <tr>
! * <td>XSL import and include</td>
* <td>uri</td>
* <td>
* <pre>{@literal
The following include element:
<xsl:include href="http://openjdk.java.net/xsl/include.xsl"/>
--- 320,330 ----
<uriSuffix uriSuffix="XSDInclude_person.xsd" uri="file:///pathto/local/XSDInclude_person.xsd"/>
* }</pre>
* </td>
* </tr>
* <tr>
! * <th scope="row">XSL import and include</th>
* <td>uri</td>
* <td>
* <pre>{@literal
The following include element:
<xsl:include href="http://openjdk.java.net/xsl/include.xsl"/>
*** 330,340 ****
<uriSuffix uriSuffix="include.xsl" uri="file:///pathto/local/include.xsl"/>
* }</pre>
* </td>
* </tr>
* <tr>
! * <td>XSL document function</td>
* <td>uri</td>
* <td>
* <pre>{@literal
The document in the following element:
<xsl:variable name="dummy" select="document('http://openjdk.java.net/xsl/list.xml')"/>
--- 335,345 ----
<uriSuffix uriSuffix="include.xsl" uri="file:///pathto/local/include.xsl"/>
* }</pre>
* </td>
* </tr>
* <tr>
! * <th scope="row">XSL document function</th>
* <td>uri</td>
* <td>
* <pre>{@literal
The document in the following element:
<xsl:variable name="dummy" select="document('http://openjdk.java.net/xsl/list.xml')"/>
< prev index next >