From 88cc019f69200624f1adebc3e0381865c87b443c Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 4 Jul 2025 07:11:17 -0400 Subject: [PATCH 1/4] correct Javadoc --- src/org/apache/html/dom/HTMLElementImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/apache/html/dom/HTMLElementImpl.java b/src/org/apache/html/dom/HTMLElementImpl.java index e4f6a80e0d..dff8aa463b 100644 --- a/src/org/apache/html/dom/HTMLElementImpl.java +++ b/src/org/apache/html/dom/HTMLElementImpl.java @@ -132,7 +132,7 @@ boolean getBinary( String name ) { /** * Convenience method used to set a boolean attribute. If the value is true, * the attribute is set to an empty string. If the value is false, the attribute - * is removed. HTML 4.0 understands empty strings as set attributes. + * is removed. HTML 4.0 understands empty strings as set attributes. * * @param name The name of the attribute * @param value The value of the attribute From f1f2c46cc51fc6654332a73762c64f5aa65b863f Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 4 Jul 2025 07:37:36 -0400 Subject: [PATCH 2/4] Clarify meaning of the term baseSystemID --- docs/xni-core.xml | 2 +- samples/xni/PSVIWriter.java | 12 ++--- samples/xni/PassThroughFilter.java | 10 +--- src/org/apache/xerces/dom/DOMInputImpl.java | 24 +++++----- .../apache/xerces/impl/XMLEntityManager.java | 11 ++--- .../apache/xerces/impl/XMLEntityScanner.java | 2 +- .../apache/xerces/impl/dtd/DTDGrammar.java | 8 ++-- .../xerces/impl/dtd/XMLDTDProcessor.java | 10 ++-- .../xs/opti/DefaultXMLDocumentHandler.java | 14 +++--- .../xerces/parsers/AbstractDOMParser.java | 10 ++-- .../parsers/AbstractXMLDocumentParser.java | 14 +++--- .../apache/xerces/util/HTTPInputSource.java | 39 +++++++-------- .../xerces/util/XMLEntityDescriptionImpl.java | 48 +++++++++---------- .../util/XMLResourceIdentifierImpl.java | 24 ++++++---- src/org/apache/xerces/xni/XMLDTDHandler.java | 15 +++--- src/org/apache/xerces/xni/XMLLocator.java | 4 +- .../xerces/xni/parser/XMLInputSource.java | 38 +++++++-------- .../xerces/xni/parser/XMLParseException.java | 2 +- 18 files changed, 128 insertions(+), 159 deletions(-) diff --git a/docs/xni-core.xml b/docs/xni-core.xml index 99a88bc729..0cf7294d6b 100644 --- a/docs/xni-core.xml +++ b/docs/xni-core.xml @@ -521,7 +521,7 @@ This interface is used to communicate the document location to the various handler interfaces. The application can use the methods on this interface to query the public, literal system, and expanded system - base system identifier as well as the line number, column number + identifier as well as the line number, column number and the encoding of the entity currently being parsed.

diff --git a/samples/xni/PSVIWriter.java b/samples/xni/PSVIWriter.java index dc38d2bf12..959650a012 100644 --- a/samples/xni/PSVIWriter.java +++ b/samples/xni/PSVIWriter.java @@ -315,19 +315,13 @@ public XMLDocumentSource getDocumentSource() { * Note: This method is not called for entity references * appearing as part of attribute values. * - * @param name The name of the entity. - * @param publicId The public identifier of the entity if the entity - * is external, null otherwise. - * @param systemId The system identifier of the entity if the entity - * is external, null otherwise. - * @param baseSystemId The base system identifier of the entity if - * the entity is external, null otherwise. - * @param encoding The auto-detected IANA encoding name of the entity + * @param name the name of the entity + * @param encoding the auto-detected IANA encoding name of the entity * stream. This value will be null in those situations * where the entity encoding is not auto-detected (e.g. * internal entities or a document entity that is * parsed from a java.io.Reader). - * @param augs Additional information that may include infoset augmentations + * @param augs additional information that may include infoset augmentations * * @throws XNIException Thrown by handler to signal an error. */ diff --git a/samples/xni/PassThroughFilter.java b/samples/xni/PassThroughFilter.java index 1424ff453b..67df52ed43 100644 --- a/samples/xni/PassThroughFilter.java +++ b/samples/xni/PassThroughFilter.java @@ -220,14 +220,8 @@ public void endElement(QName element, Augmentations augs) * Note: This method is not called for entity references * appearing as part of attribute values. * - * @param name The name of the entity. - * @param publicId The public identifier of the entity if the entity - * is external, null otherwise. - * @param systemId The system identifier of the entity if the entity - * is external, null otherwise. - * @param baseSystemId The base system identifier of the entity if - * the entity is external, null otherwise. - * @param encoding The auto-detected IANA encoding name of the entity + * @param name the name of the entity. + * @param encoding the auto-detected IANA encoding name of the entity * stream. This value will be null in those situations * where the entity encoding is not auto-detected (e.g. * internal entities or a document entity that is diff --git a/src/org/apache/xerces/dom/DOMInputImpl.java b/src/org/apache/xerces/dom/DOMInputImpl.java index 5023702233..ab5f1970e9 100644 --- a/src/org/apache/xerces/dom/DOMInputImpl.java +++ b/src/org/apache/xerces/dom/DOMInputImpl.java @@ -88,15 +88,15 @@ public DOMInputImpl() {} * identifiers, leaving resolution of the entity and opening of * the input stream up to the caller. * - * @param publicId The public identifier, if known. - * @param systemId The system identifier. This value should + * @param publicId the public identifier, if known + * @param systemId the system identifier. This value should * always be set, if possible, and can be * relative or absolute. If the system identifier * is relative, then the base system identifier * should be set. - * @param baseSystemId The base system identifier. This value should - * always be set to the fully expanded URI of the - * base system identifier, if possible. + * @param baseSystemId the base system identifier. This value should + * always be set to the expanded absolute URI of the + * system identifier, if possible. */ public DOMInputImpl(String publicId, String systemId, @@ -111,17 +111,17 @@ public DOMInputImpl(String publicId, String systemId, /** * Constructs an input source from a byte stream. * - * @param publicId The public identifier, if known. - * @param systemId The system identifier. This value should + * @param publicId the public identifier, if known + * @param systemId the system identifier. This value should * always be set, if possible, and can be * relative or absolute. If the system identifier * is relative, then the base system identifier * should be set. - * @param baseSystemId The base system identifier. This value should - * always be set to the fully expanded URI of the - * base system identifier, if possible. - * @param byteStream The byte stream. - * @param encoding The encoding of the byte stream, if known. + * @param baseSystemId the base system identifier. This value should + * always be set to the fully expanded absolute URI of the + * system identifier, if possible. + * @param byteStream the byte stream + * @param encoding the encoding of the byte stream, if known */ public DOMInputImpl(String publicId, String systemId, diff --git a/src/org/apache/xerces/impl/XMLEntityManager.java b/src/org/apache/xerces/impl/XMLEntityManager.java index 332b432508..67004f40ff 100644 --- a/src/org/apache/xerces/impl/XMLEntityManager.java +++ b/src/org/apache/xerces/impl/XMLEntityManager.java @@ -543,12 +543,11 @@ public int getParamEntityRefCount(String entityName) { * Note: The name should be a unique symbol. The * SymbolTable can be used for this purpose. * - * @param name The name of the entity. - * @param publicId The public identifier of the entity. - * @param literalSystemId The system identifier of the entity. - * @param baseSystemId The base system identifier of the entity. - * This is the system identifier of the entity - * where the entity being added and + * @param name the name of the entity + * @param publicId the public identifier of the entity + * @param literalSystemId the system identifier of the entity + * @param baseSystemId the base URL of the entity. This is the URL of the entity + * where the entity is being added and * is used to expand the system identifier when * the system identifier is a relative URI. * When null the system identifier of the first diff --git a/src/org/apache/xerces/impl/XMLEntityScanner.java b/src/org/apache/xerces/impl/XMLEntityScanner.java index 9edf9569dd..a4bf58749a 100644 --- a/src/org/apache/xerces/impl/XMLEntityScanner.java +++ b/src/org/apache/xerces/impl/XMLEntityScanner.java @@ -84,7 +84,7 @@ public XMLEntityScanner() { // /** - * Returns the base system identifier of the currently scanned + * Returns the base URL of the currently scanned * entity, or null if none is available. */ public final String getBaseSystemId() { diff --git a/src/org/apache/xerces/impl/dtd/DTDGrammar.java b/src/org/apache/xerces/impl/dtd/DTDGrammar.java index a06f4d8fc6..8d21943879 100644 --- a/src/org/apache/xerces/impl/dtd/DTDGrammar.java +++ b/src/org/apache/xerces/impl/dtd/DTDGrammar.java @@ -365,12 +365,10 @@ public int getAttributeDeclIndex(int elementDeclIndex, String attributeDeclName) * location cannot be reported during the parsing of * the document DTD. However, it is strongly * recommended that a locator be supplied that can - * at least report the base system identifier of the - * DTD. + * at least report the base URI of the DTD. * - * @param augs Additional information that may include infoset - * augmentations. - * @throws XNIException Thrown by handler to signal an error. + * @param augs additional information that may include infoset augmentations + * @throws XNIException thrown by handler to signal an error */ public void startDTD(XMLLocator locator, Augmentations augs) throws XNIException { //Initialize stack diff --git a/src/org/apache/xerces/impl/dtd/XMLDTDProcessor.java b/src/org/apache/xerces/impl/dtd/XMLDTDProcessor.java index 9e9f290820..7fe151c7e7 100644 --- a/src/org/apache/xerces/impl/dtd/XMLDTDProcessor.java +++ b/src/org/apache/xerces/impl/dtd/XMLDTDProcessor.java @@ -639,16 +639,14 @@ public void processingInstruction(String target, XMLString data, Augmentations a /** * The start of the DTD. * - * @param locator The document locator, or null if the document + * @param locator the document locator, or null if the document * location cannot be reported during the parsing of * the document DTD. However, it is strongly * recommended that a locator be supplied that can - * at least report the base system identifier of the - * DTD. - * @param augs Additional information that may include infoset - * augmentations. + * at least report the base URI of the DTD. + * @param augs additional information that may include infoset augmentations * - * @throws XNIException Thrown by handler to signal an error. + * @throws XNIException thrown by handler to signal an error */ public void startDTD(XMLLocator locator, Augmentations augs) throws XNIException { diff --git a/src/org/apache/xerces/impl/xs/opti/DefaultXMLDocumentHandler.java b/src/org/apache/xerces/impl/xs/opti/DefaultXMLDocumentHandler.java index 949b0235e8..b7a1809290 100644 --- a/src/org/apache/xerces/impl/xs/opti/DefaultXMLDocumentHandler.java +++ b/src/org/apache/xerces/impl/xs/opti/DefaultXMLDocumentHandler.java @@ -342,16 +342,14 @@ public void endDocument(Augmentations augs) throws XNIException { /** * The start of the DTD. * - * @param locator The document locator, or null if the document - * location cannot be reported during the parsing of + * @param locator the document locator, or null if the document + * location cannot be reported during the parsing of * the document DTD. However, it is strongly - * recommended that a locator be supplied that can - * at least report the base system identifier of the - * DTD. - * @param augmentations Additional information that may include infoset - * augmentations. + * recommended that a locator be supplied that can + * at least report the base URI of the DTD. + * @param augmentations additional information that may include infoset augmentations * - * @throws XNIException Thrown by handler to signal an error. + * @throws XNIException thrown by handler to signal an error */ public void startDTD(XMLLocator locator, Augmentations augmentations) throws XNIException { diff --git a/src/org/apache/xerces/parsers/AbstractDOMParser.java b/src/org/apache/xerces/parsers/AbstractDOMParser.java index fde2cb934a..8964b38c15 100644 --- a/src/org/apache/xerces/parsers/AbstractDOMParser.java +++ b/src/org/apache/xerces/parsers/AbstractDOMParser.java @@ -1781,16 +1781,14 @@ else if (nodeType == Node.PROCESSING_INSTRUCTION_NODE) { /** * The start of the DTD. * - * @param locator The document locator, or null if the document + * @param locator the document locator, or null if the document * location cannot be reported during the parsing of * the document DTD. However, it is strongly * recommended that a locator be supplied that can - * at least report the base system identifier of the - * DTD. - * @param augs Additional information that may include infoset - * augmentations. + * at least report the base URI of the DTD. + * @param augs additional information that may include infoset augmentations * - * @throws XNIException Thrown by handler to signal an error. + * @throws XNIException thrown by handler to signal an error */ public void startDTD (XMLLocator locator, Augmentations augs) throws XNIException { if (DEBUG_EVENTS) { diff --git a/src/org/apache/xerces/parsers/AbstractXMLDocumentParser.java b/src/org/apache/xerces/parsers/AbstractXMLDocumentParser.java index 079dab698b..e6f6dfc071 100644 --- a/src/org/apache/xerces/parsers/AbstractXMLDocumentParser.java +++ b/src/org/apache/xerces/parsers/AbstractXMLDocumentParser.java @@ -359,16 +359,14 @@ public XMLDocumentSource getDocumentSource (){ /** * The start of the DTD. * - * @param locator The document locator, or null if the document - * location cannot be reported during the parsing of + * @param locator the document locator, or null if the document + * location cannot be reported during the parsing of * the document DTD. However, it is strongly - * recommended that a locator be supplied that can - * at least report the base system identifier of the - * DTD. - * @param augs Additional information that may include infoset - * augmentations. + * recommended that a locator be supplied that can + * at least report the base URI of the DTD. + * @param augs additional information that may include infoset augmentations * - * @throws XNIException Thrown by handler to signal an error. + * @throws XNIException thrown by handler to signal an error */ public void startDTD(XMLLocator locator, Augmentations augs) throws XNIException { fInDTD = true; diff --git a/src/org/apache/xerces/util/HTTPInputSource.java b/src/org/apache/xerces/util/HTTPInputSource.java index 5224141de3..94e1107902 100644 --- a/src/org/apache/xerces/util/HTTPInputSource.java +++ b/src/org/apache/xerces/util/HTTPInputSource.java @@ -59,15 +59,14 @@ public final class HTTPInputSource extends XMLInputSource { * identifiers, leaving resolution of the entity and opening of * the input stream up to the caller. * - * @param publicId The public identifier, if known. - * @param systemId The system identifier. This value should + * @param publicId the public identifier, if known + * @param systemId the system identifier. This value should * always be set, if possible, and can be * relative or absolute. If the system identifier * is relative, then the base system identifier - * should be set. - * @param baseSystemId The base system identifier. This value should - * always be set to the fully expanded URI of the - * base system identifier, if possible. + * should also be set. + * @param baseSystemId the base system identifier. This value should + * always be an absolute base URI applicable to the system identifier. */ public HTTPInputSource(String publicId, String systemId, String baseSystemId) { super(publicId, systemId, baseSystemId); @@ -87,15 +86,14 @@ public HTTPInputSource(XMLResourceIdentifier resourceIdentifier) { /** * Constructs an input source from a byte stream. * - * @param publicId The public identifier, if known. - * @param systemId The system identifier. This value should + * @param publicId the public identifier, if known + * @param systemId the system identifier. This value should * always be set, if possible, and can be * relative or absolute. If the system identifier * is relative, then the base system identifier - * should be set. - * @param baseSystemId The base system identifier. This value should - * always be set to the fully expanded URI of the - * base system identifier, if possible. + * should also be set. + * @param baseSystemId the base system identifier. This value should + * always be an absolute base URI applicable to the system identifier. * @param byteStream The byte stream. * @param encoding The encoding of the byte stream, if known. */ @@ -107,18 +105,17 @@ public HTTPInputSource(String publicId, String systemId, /** * Constructs an input source from a character stream. * - * @param publicId The public identifier, if known. - * @param systemId The system identifier. This value should + * @param publicId the public identifier, if known + * @param systemId the system identifier. This value should * always be set, if possible, and can be * relative or absolute. If the system identifier * is relative, then the base system identifier - * should be set. - * @param baseSystemId The base system identifier. This value should - * always be set to the fully expanded URI of the - * base system identifier, if possible. - * @param charStream The character stream. - * @param encoding The original encoding of the byte stream - * used by the reader, if known. + * should also be set. + * @param baseSystemId the base system identifier. This value should + * always be an absolute base URI applicable to the system identifier. + * @param charStream the character stream + * @param encoding the original encoding of the byte stream + * used by the reader, if known */ public HTTPInputSource(String publicId, String systemId, String baseSystemId, Reader charStream, String encoding) { diff --git a/src/org/apache/xerces/util/XMLEntityDescriptionImpl.java b/src/org/apache/xerces/util/XMLEntityDescriptionImpl.java index af47915c7d..cf3d6d7c2e 100644 --- a/src/org/apache/xerces/util/XMLEntityDescriptionImpl.java +++ b/src/org/apache/xerces/util/XMLEntityDescriptionImpl.java @@ -41,11 +41,11 @@ public XMLEntityDescriptionImpl() {} // () /** * Constructs an entity description. * - * @param entityName The name of the entity. - * @param publicId The public identifier. - * @param literalSystemId The literal system identifier. - * @param baseSystemId The base system identifier. - * @param expandedSystemId The expanded system identifier. + * @param entityName the name of the entity + * @param publicId the public identifier + * @param literalSystemId the literal system identifier + * @param baseSystemId the base URI against which the system identifier is resolved + * @param expandedSystemId the expanded system identifier resolved against the base system identifier */ public XMLEntityDescriptionImpl(String entityName, String publicId, String literalSystemId, String baseSystemId, String expandedSystemId) { @@ -55,12 +55,12 @@ public XMLEntityDescriptionImpl(String entityName, String publicId, String liter /** * Constructs a resource identifier. * - * @param entityName The name of the entity. - * @param publicId The public identifier. - * @param literalSystemId The literal system identifier. - * @param baseSystemId The base system identifier. - * @param expandedSystemId The expanded system identifier. - * @param namespace The namespace. + * @param entityName the name of the entity + * @param publicId the public identifier + * @param literalSystemId the literal system identifier + * @param baseSystemId the base URI against which the system identifier is resolved + * @param expandedSystemId the expanded system identifier resolved against the base system identifier + * @param namespace the namespace */ public XMLEntityDescriptionImpl(String entityName, String publicId, String literalSystemId, String baseSystemId, String expandedSystemId, String namespace) { @@ -98,12 +98,12 @@ public String getEntityName() { /** *

Sets the values of this entity description.

- * - * @param entityName The name of the entity. - * @param publicId The public identifier. - * @param literalSystemId The literal system identifier. - * @param baseSystemId The base system identifier. - * @param expandedSystemId The expanded system identifier. + * + * @param entityName the name of the entity + * @param publicId the public identifier + * @param literalSystemId the literal system identifier + * @param baseSystemId the base URI against which the system identifier is resolved + * @param expandedSystemId the expanded system identifier resolved against the base system identifier */ public void setDescription(String entityName, String publicId, String literalSystemId, String baseSystemId, String expandedSystemId) { @@ -112,13 +112,13 @@ public void setDescription(String entityName, String publicId, String literalSys /** *

Sets the values of this entity description.

- * - * @param entityName The name of the entity. - * @param publicId The public identifier. - * @param literalSystemId The literal system identifier. - * @param baseSystemId The base system identifier. - * @param expandedSystemId The expanded system identifier. - * @param namespace The namespace. + * + * @param entityName the name of the entity + * @param publicId the public identifier + * @param literalSystemId the literal system identifier + * @param baseSystemId the base URI against which the system identifier is resolved + * @param expandedSystemId the expanded system identifier resolved against the base system identifier + * @param namespace the namespace */ public void setDescription(String entityName, String publicId, String literalSystemId, String baseSystemId, String expandedSystemId, String namespace) { diff --git a/src/org/apache/xerces/util/XMLResourceIdentifierImpl.java b/src/org/apache/xerces/util/XMLResourceIdentifierImpl.java index c463457b8d..68c1108349 100644 --- a/src/org/apache/xerces/util/XMLResourceIdentifierImpl.java +++ b/src/org/apache/xerces/util/XMLResourceIdentifierImpl.java @@ -60,10 +60,10 @@ public XMLResourceIdentifierImpl() {} // () /** * Constructs a resource identifier. * - * @param publicId The public identifier. - * @param literalSystemId The literal system identifier. - * @param baseSystemId The base system identifier. - * @param expandedSystemId The expanded system identifier. + * @param publicId the public identifier + * @param literalSystemId the literal system identifier + * @param baseSystemId the URI against which the system identifier should be resolved + * @param expandedSystemId the literalSystemId resolved against baseSystemId */ public XMLResourceIdentifierImpl(String publicId, String literalSystemId, String baseSystemId, @@ -75,11 +75,11 @@ public XMLResourceIdentifierImpl(String publicId, /** * Constructs a resource identifier. * - * @param publicId The public identifier. - * @param literalSystemId The literal system identifier. - * @param baseSystemId The base system identifier. - * @param expandedSystemId The expanded system identifier. - * @param namespace The namespace. + * @param publicId the public identifier + * @param literalSystemId the literal system identifier + * @param baseSystemId the URI against which the system identifier should be resolved + * @param expandedSystemId the literalSystemId resolved against baseSystemId + * @param namespace the namespace */ public XMLResourceIdentifierImpl(String publicId, String literalSystemId, String baseSystemId, String expandedSystemId, @@ -129,7 +129,11 @@ public void setLiteralSystemId(String literalSystemId) { fLiteralSystemId = literalSystemId; } // setLiteralSystemId(String) - /** Sets the base system identifier. */ + /** + * Sets the base of the system identifier. + * + * @param baseSystemId the URI against which the system identifier should be resolved + */ public void setBaseSystemId(String baseSystemId) { fBaseSystemId = baseSystemId; } // setBaseSystemId(String) diff --git a/src/org/apache/xerces/xni/XMLDTDHandler.java b/src/org/apache/xerces/xni/XMLDTDHandler.java index 59cec6e751..81d9985ea3 100644 --- a/src/org/apache/xerces/xni/XMLDTDHandler.java +++ b/src/org/apache/xerces/xni/XMLDTDHandler.java @@ -58,16 +58,13 @@ public interface XMLDTDHandler { /** * The start of the DTD. * - * @param locator The document locator, or null if the document - * location cannot be reported during the parsing of + * @param locator the document locator, or null if the document + * location cannot be reported during the parsing of * the document DTD. However, it is strongly - * recommended that a locator be supplied that can - * at least report the base system identifier of the - * DTD. - * @param augmentations Additional information that may include infoset - * augmentations. - * - * @throws XNIException Thrown by handler to signal an error. + * recommended that a locator be supplied that can + * at least report the base URI of the DTD. + * @param augmentations additional information that may include infoset augmentations + * @throws XNIException thrown by handler to signal an error */ public void startDTD(XMLLocator locator, Augmentations augmentations) throws XNIException; diff --git a/src/org/apache/xerces/xni/XMLLocator.java b/src/org/apache/xerces/xni/XMLLocator.java index 4caf22382d..d665e87a7f 100644 --- a/src/org/apache/xerces/xni/XMLLocator.java +++ b/src/org/apache/xerces/xni/XMLLocator.java @@ -36,10 +36,10 @@ public interface XMLLocator { /** Returns the literal system identifier. */ public String getLiteralSystemId(); - /** Returns the base system identifier. */ + /** Returns the URI against which the system identifier should be resolved. */ public String getBaseSystemId(); - /** Returns the expanded system identifier. */ + /** Returns the system identifier after resolution against the base system identifier. */ public String getExpandedSystemId(); /** Returns the line number, or -1 if no line number is available. */ diff --git a/src/org/apache/xerces/xni/parser/XMLInputSource.java b/src/org/apache/xerces/xni/parser/XMLInputSource.java index da7a3b021d..597137c148 100644 --- a/src/org/apache/xerces/xni/parser/XMLInputSource.java +++ b/src/org/apache/xerces/xni/parser/XMLInputSource.java @@ -103,17 +103,14 @@ public XMLInputSource(XMLResourceIdentifier resourceIdentifier) { /** * Constructs an input source from a byte stream. * - * @param publicId The public identifier, if known. - * @param systemId The system identifier. This value should + * @param publicId the public identifier, if known + * @param systemId the system identifier. This value should * always be set, if possible, and can be * relative or absolute. If the system identifier - * is relative, then the base system identifier - * should be set. - * @param baseSystemId The base system identifier. This value should - * always be set to the fully expanded URI of the - * base system identifier, if possible. - * @param byteStream The byte stream. - * @param encoding The encoding of the byte stream, if known. + * is relative, then the baseSystemId should be set. + * @param baseSystemId the URI against which the system identifier should be resolved + * @param byteStream the byte stream + * @param encoding the encoding of the byte stream, if known */ public XMLInputSource(String publicId, String systemId, String baseSystemId, InputStream byteStream, @@ -128,18 +125,15 @@ public XMLInputSource(String publicId, String systemId, /** * Constructs an input source from a character stream. * - * @param publicId The public identifier, if known. - * @param systemId The system identifier. This value should + * @param publicId the public identifier, if known + * @param systemId the system identifier. This value should * always be set, if possible, and can be * relative or absolute. If the system identifier - * is relative, then the base system identifier - * should be set. - * @param baseSystemId The base system identifier. This value should - * always be set to the fully expanded URI of the - * base system identifier, if possible. - * @param charStream The character stream. - * @param encoding The original encoding of the byte stream - * used by the reader, if known. + * is relative, then the baseSystemId should be set. + * @param baseSystemId the URI against which the system identifier should be resolved + * @param charStream the character stream + * @param encoding the original encoding of the byte stream + * used by the reader, if known */ public XMLInputSource(String publicId, String systemId, String baseSystemId, Reader charStream, @@ -184,15 +178,15 @@ public String getSystemId() { } // getSystemId():String /** - * Sets the base system identifier. + * Sets the URI against which the system identifier should be resolved. * - * @param baseSystemId The new base system identifier. + * @param baseSystemId the URI against which the system identifier should be resolved */ public void setBaseSystemId(String baseSystemId) { fBaseSystemId = baseSystemId; } // setBaseSystemId(String) - /** Returns the base system identifier. */ + /** Returns the URI against which the system identifier should be resolved. */ public String getBaseSystemId() { return fBaseSystemId; } // getBaseSystemId():String diff --git a/src/org/apache/xerces/xni/parser/XMLParseException.java b/src/org/apache/xerces/xni/parser/XMLParseException.java index 1610fc509d..c5d89bbb79 100644 --- a/src/org/apache/xerces/xni/parser/XMLParseException.java +++ b/src/org/apache/xerces/xni/parser/XMLParseException.java @@ -112,7 +112,7 @@ public String getLiteralSystemId() { return fLiteralSystemId; } // getLiteralSystemId():String - /** Returns the base system identifier. */ + /** Returns the URI against which the system identifier should be resolved. */ public String getBaseSystemId() { return fBaseSystemId; } // getBaseSystemId():String From e34dd1f67eb5d47ed26b0472e8c6850ed0299e3f Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 4 Jul 2025 07:44:42 -0400 Subject: [PATCH 3/4] more edits --- docs/xni-core.xml | 2 +- src/org/apache/xerces/dom/DOMInputImpl.java | 38 ++++++++------------- src/org/apache/xerces/xni/XMLLocator.java | 4 +-- 3 files changed, 17 insertions(+), 27 deletions(-) diff --git a/docs/xni-core.xml b/docs/xni-core.xml index 0cf7294d6b..29f3fcd16f 100644 --- a/docs/xni-core.xml +++ b/docs/xni-core.xml @@ -496,7 +496,7 @@ which this object relates to.
  • expandedSystemId: The value of the systemId (or - schemaLocation) after being subjects to relative + schemaLocation) after relative URI expansion. SAX programmers will be familiar with this concept from the SAX Locator interface, for example; this property maps to the systemId property of that diff --git a/src/org/apache/xerces/dom/DOMInputImpl.java b/src/org/apache/xerces/dom/DOMInputImpl.java index ab5f1970e9..e7258cc345 100644 --- a/src/org/apache/xerces/dom/DOMInputImpl.java +++ b/src/org/apache/xerces/dom/DOMInputImpl.java @@ -117,9 +117,7 @@ public DOMInputImpl(String publicId, String systemId, * relative or absolute. If the system identifier * is relative, then the base system identifier * should be set. - * @param baseSystemId the base system identifier. This value should - * always be set to the fully expanded absolute URI of the - * system identifier, if possible. + * @param baseSystemId the base system identifier against which the system identifier should be resolved * @param byteStream the byte stream * @param encoding the encoding of the byte stream, if known */ @@ -139,18 +137,16 @@ public DOMInputImpl(String publicId, String systemId, /** * Constructs an input source from a character stream. * - * @param publicId The public identifier, if known. - * @param systemId The system identifier. This value should + * @param publicId the public identifier, if knownt + * @param systemId the system identifier. This value should * always be set, if possible, and can be * relative or absolute. If the system identifier * is relative, then the base system identifier * should be set. - * @param baseSystemId The base system identifier. This value should - * always be set to the fully expanded URI of the - * base system identifier, if possible. - * @param charStream The character stream. - * @param encoding The original encoding of the byte stream - * used by the reader, if known. + * @param baseSystemId the base system identifier against which the system identifier should be resolved + * @param charStream the character stream + * @param encoding the original encoding of the byte stream + * used by the reader, if known */ public DOMInputImpl(String publicId, String systemId, @@ -168,20 +164,14 @@ public DOMInputImpl(String publicId, String systemId, /** * Constructs an input source from a String. * - * @param publicId The public identifier, if known. - * @param systemId The system identifier. This value should - * always be set, if possible, and can be - * relative or absolute. If the system identifier - * is relative, then the base system identifier - * should be set. - * @param baseSystemId The base system identifier. This value should - * always be set to the fully expanded URI of the - * base system identifier, if possible. - * @param data The String Data. - * @param encoding The original encoding of the byte stream - * used by the reader, if known. + * @param publicId the public identifier, if known + * @param systemId the system identifier. This value should always be set, if possible, and can be + * relative or absolute. If the system identifier is relative, then the base system identifier + * should be set. + * @param baseSystemId the base system identifier against which the system identifier should be resolved + * @param data the String data + * @param encoding the original encoding of the byte stream used by the reader, if known */ - public DOMInputImpl(String publicId, String systemId, String baseSystemId, String data, String encoding) { diff --git a/src/org/apache/xerces/xni/XMLLocator.java b/src/org/apache/xerces/xni/XMLLocator.java index d665e87a7f..610dc3b044 100644 --- a/src/org/apache/xerces/xni/XMLLocator.java +++ b/src/org/apache/xerces/xni/XMLLocator.java @@ -63,10 +63,10 @@ public interface XMLLocator { /** * Returns the XML version of the current entity. This will normally be the - * value from the XML or text declaration or defaulted by the parser. Note that + * value from the XML or text declaration or defaulted by the parser. Note * that this value may be different than the version of the processing rules * applied to the current entity. For instance, an XML 1.1 document may refer to - * XML 1.0 entities. In such a case the rules of XML 1.1 are applied to the entire + * XML 1.0 entities. In such a case, the rules of XML 1.1 are applied to the entire * document. Also note that, for a given entity, this value can only be considered * final once the XML or text declaration has been read or once it has been * determined that there is no such declaration. From d3fddf7575367fb3512250d64cf26d3b5a8e95ae Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 4 Jul 2025 07:46:19 -0400 Subject: [PATCH 4/4] remove --- src/org/apache/html/dom/HTMLElementImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/apache/html/dom/HTMLElementImpl.java b/src/org/apache/html/dom/HTMLElementImpl.java index dff8aa463b..e4f6a80e0d 100644 --- a/src/org/apache/html/dom/HTMLElementImpl.java +++ b/src/org/apache/html/dom/HTMLElementImpl.java @@ -132,7 +132,7 @@ boolean getBinary( String name ) { /** * Convenience method used to set a boolean attribute. If the value is true, * the attribute is set to an empty string. If the value is false, the attribute - * is removed. HTML 4.0 understands empty strings as set attributes. + * is removed. HTML 4.0 understands empty strings as set attributes. * * @param name The name of the attribute * @param value The value of the attribute