Skip to content

Commit 7a94395

Browse files
committed
8343609: Broken links in java.xml
1 parent b720517 commit 7a94395

File tree

7 files changed

+40
-76
lines changed

7 files changed

+40
-76
lines changed

src/java.xml/share/classes/javax/xml/catalog/Catalog.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -29,8 +29,7 @@
2929

3030
/**
3131
* The Catalog class represents an entity Catalog as defined by
32-
* <a
33-
* href="https://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html">
32+
* <a href="https://groups.oasis-open.org/higherlogic/ws/public/download/14810/xml-catalogs.pdf">
3433
* XML Catalogs, OASIS Standard V1.1, 7 October 2005</a>.
3534
* <p>
3635
* A catalog is an XML file that contains a root {@code catalog} entry with a list

src/java.xml/share/classes/javax/xml/catalog/CatalogFeatures.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -137,10 +137,9 @@
137137
* <b>[2]</b> The value shall be exactly as listed in this table, case-sensitive.
138138
* Any unspecified value will result in {@link IllegalArgumentException}.
139139
* <p>
140-
* <b>[3]</b> The Catalog specification defined complex rules on
141-
* <a href="https://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html#attrib.prefer">
142-
* the prefer attribute</a>. Although the prefer can be public or system, the
143-
* specification actually made system the preferred option, that is, no matter
140+
* <b>[3]</b> The <a href="https://groups.oasis-open.org/higherlogic/ws/public/download/14810/xml-catalogs.pdf">Catalog specification</a>
141+
* defined complex rules on the prefer attribute. Although it can be public or system,
142+
* the specification made {@code system} the preferred option, that is, no matter
144143
* the option, a system entry is always used if found. Public entries are only
145144
* considered if the prefer is public and system entries are not found. It is
146145
* therefore recommended that the prefer attribute be set as public

src/java.xml/share/classes/javax/xml/catalog/CatalogManager.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -52,7 +52,7 @@ private CatalogManager() {
5252
* those referenced by the {@code nextCatalog} elements in the main catalog.
5353
* <p>
5454
* As specified in
55-
* <a href="https://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html#s.res.fail">
55+
* <a href="https://groups.oasis-open.org/higherlogic/ws/public/download/14810/xml-catalogs.pdf">
5656
* XML Catalogs, OASIS Standard V1.1</a>, if a catalog entry is invalid, it
5757
* is ignored. In case all entries are invalid, the resulting Catalog object
5858
* will contain no Catalog elements. Any matching operation using the Catalog
@@ -126,7 +126,7 @@ public static CatalogResolver catalogResolver(Catalog catalog, CatalogResolver.N
126126
* those referenced by the {@code nextCatalog} elements in the main catalog.
127127
* <p>
128128
* As specified in
129-
* <a href="https://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html#s.res.fail">
129+
* <a href="https://groups.oasis-open.org/higherlogic/ws/public/download/14810/xml-catalogs.pdf">
130130
* XML Catalogs, OASIS Standard V1.1</a>, if a catalog entry is invalid, it
131131
* is ignored. In case all entries are invalid, the resulting CatalogResolver
132132
* object will contain no valid catalog. Any resolution operation using the

src/java.xml/share/classes/javax/xml/catalog/CatalogResolver.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
* Transform {@link javax.xml.transform.URIResolver}, and resolves
4141
* external references using catalogs.
4242
* <p>
43-
* The <a href="https://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html">
43+
* The <a href="https://groups.oasis-open.org/higherlogic/ws/public/download/14810/xml-catalogs.pdf">
4444
* Catalog Standard</a> distinguished {@code external identifiers} from {@code uri entries}
4545
* as being used to solely identify DTDs, while {@code uri entries} for
4646
* other resources such as stylesheets and schema. The Java APIs, such as

src/java.xml/share/classes/javax/xml/catalog/Normalizer.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -32,8 +32,7 @@
3232
/**
3333
* The Normalizer is responsible for normalizing Public and System Identifiers
3434
* as specified in section 6.2, 6.3 and 6.4 of the specification
35-
* * <a
36-
* href="https://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html">
35+
* <a href="https://groups.oasis-open.org/higherlogic/ws/public/download/14810/xml-catalogs.pdf">
3736
* XML Catalogs, OASIS Standard V1.1, 7 October 2005</a>.
3837
*
3938
* @since 9

src/java.xml/share/classes/javax/xml/catalog/package-info.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -26,8 +26,8 @@
2626
/**
2727
*
2828
* Provides the classes for implementing
29-
* <a href="https://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html">
30-
* XML Catalogs OASIS Standard V1.1, 7 October 2005</a>.
29+
* <a href="https://groups.oasis-open.org/higherlogic/ws/public/download/14810/xml-catalogs.pdf">
30+
* XML Catalogs OASIS Standard V1.1, 7 October 2005</a>.
3131
*
3232
* <p>
3333
* The Catalog API defines a standard solution for resolving external resources

src/java.xml/share/classes/javax/xml/namespace/QName.java

+25-58
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -329,28 +329,16 @@ public final int hashCode() {
329329
}
330330

331331
/**
332-
* <p><code>String</code> representation of this
333-
* <code>QName</code>.</p>
334-
*
335-
* <p>The commonly accepted way of representing a <code>QName</code>
336-
* as a <code>String</code> was
337-
* <a href="http://jclark.com/xml/xmlns.htm">defined</a>
338-
* by James Clark. Although this is not a <em>standard</em>
339-
* specification, it is in common use, e.g. {@link
340-
* javax.xml.transform.Transformer#setParameter(String name, Object value)}.
341-
* This implementation represents a <code>QName</code> as:
342-
* "{" + Namespace URI + "}" + local part. If the Namespace URI
343-
* <code>.equals(XMLConstants.NULL_NS_URI)</code>, only the
344-
* local part is returned. An appropriate use of this method is
345-
* for debugging or logging for human consumption.</p>
346-
*
347-
* <p>Note the prefix value is <strong><em>NOT</em></strong>
348-
* returned as part of the <code>String</code> representation.</p>
332+
* Returns the string representation of this {@code QName}.
333+
* The format is:
334+
* <pre> {@code
335+
* {NamespaceURI}LocalPart
336+
* }</pre>
337+
* If {@code NamespaceURI} is {@code null}, only {@code LocalPart} is returned.
349338
*
350-
* <p>This method satisfies the general contract of {@link
351-
* java.lang.Object#toString() Object.toString()}.</p>
339+
* @apiNote The {@code Prefix} is not returned in the string representation.
352340
*
353-
* @return <code>String</code> representation of this <code>QName</code>
341+
* @return the string representation of this {@code QName}
354342
*/
355343
public String toString() {
356344
if (namespaceURI.equals(XMLConstants.NULL_NS_URI)) {
@@ -361,48 +349,27 @@ public String toString() {
361349
}
362350

363351
/**
364-
* <p><code>QName</code> derived from parsing the formatted
365-
* <code>String</code>.</p>
366-
*
367-
* <p>If the <code>String</code> is <code>null</code> or does not conform to
368-
* {@link #toString() QName.toString()} formatting, an
369-
* <code>IllegalArgumentException</code> is thrown.</p>
370-
*
371-
* <p><em>The <code>String</code> <strong>MUST</strong> be in the
372-
* form returned by {@link #toString() QName.toString()}.</em></p>
373-
*
374-
* <p>The commonly accepted way of representing a <code>QName</code>
375-
* as a <code>String</code> was
376-
* <a href="http://jclark.com/xml/xmlns.htm">defined</a>
377-
* by James Clark. Although this is not a <em>standard</em>
378-
* specification, it is in common use, e.g. {@link
379-
* javax.xml.transform.Transformer#setParameter(String name, Object value)}.
380-
* This implementation parses a <code>String</code> formatted
381-
* as: "{" + Namespace URI + "}" + local part. If the Namespace
382-
* URI <code>.equals(XMLConstants.NULL_NS_URI)</code>, only the
383-
* local part should be provided.</p>
384-
*
385-
* <p>The prefix value <strong><em>CANNOT</em></strong> be
386-
* represented in the <code>String</code> and will be set to
387-
* {@link javax.xml.XMLConstants#DEFAULT_NS_PREFIX
388-
* XMLConstants.DEFAULT_NS_PREFIX}.</p>
389-
*
390-
* <p>This method does not do full validation of the resulting
391-
* <code>QName</code>.
392-
* <p>The Namespace URI is not validated as a
352+
* Returns a {@code QName} from its string representation.
353+
* The string representation must be in the format returned by {@link #toString()}:
354+
* <pre> {@code
355+
* {NamespaceURI}LocalPart
356+
* }</pre>
357+
* Since the {@code Prefix} is not represented in the string form, it will be
358+
* set to {@link javax.xml.XMLConstants#DEFAULT_NS_PREFIX XMLConstants.DEFAULT_NS_PREFIX}.
359+
*
360+
* @apiNote This method does not perform full validation of the resulting
361+
* {@code QName}. The {@code NamespaceURI} is not validated as a
393362
* <a href="http://www.ietf.org/rfc/rfc2396.txt">URI reference</a>.
394-
* The local part is not validated as a
363+
* The {@code LocalPart} is not validated as a
395364
* <a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCName</a>
396365
* as specified in
397-
* <a href="http://www.w3.org/TR/REC-xml-names/">Namespaces in XML</a>.</p>
398-
*
399-
* @param qNameAsString <code>String</code> representation
400-
* of the <code>QName</code>
366+
* <a href="http://www.w3.org/TR/REC-xml-names/">Namespaces in XML</a>.
401367
*
402-
* @throws IllegalArgumentException When <code>qNameAsString</code> is
403-
* <code>null</code> or malformed
368+
* @param qNameAsString the string representation of the {@code QName}
404369
*
405-
* @return <code>QName</code> corresponding to the given <code>String</code>
370+
* @return a {@code QName} from its string representation
371+
* @throws IllegalArgumentException if {@code qNameAsString} is {@code null}
372+
* or malformed
406373
* @see #toString() QName.toString()
407374
*/
408375
public static QName valueOf(String qNameAsString) {

0 commit comments

Comments
 (0)