Document XML datatype APIs - #511
Conversation
Refs #272 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR improves the generated XML documentation for javax.xml.datatype APIs by replacing placeholder docs with source/reference-backed descriptions for key DatatypeFactory, Duration, and XMLGregorianCalendar members.
Changes:
- Filled in previously placeholder
<value>documentation for severalXMLGregorianCalendarfields (day/month/second/timezone/year components). - Updated
Durationmember docs to describe return/value semantics (e.g., hash code and sign). - Updated
DatatypeFactorydocs for the default implementation constant and thenewInstance(String, ClassLoader)parameters.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/xml/Javax.Xml.Datatype/XMLGregorianCalendar.xml | Replaces placeholder value docs for multiple calendar fields and schema type info. |
| docs/xml/Javax.Xml.Datatype/Duration.xml | Replaces placeholder return/value docs for selected members. |
| docs/xml/Javax.Xml.Datatype/DatatypeFactory.xml | Improves constant/value docs and factory method parameter docs. |
Suppressed comments (6)
docs/xml/Javax.Xml.Datatype/XMLGregorianCalendar.xml:611
- This value references FieldUndefined using ..., which renders as plain code and loses the cross-reference. Elsewhere in this file the constant is referenced with ; please keep that pattern for consistency and navigability.
<value>The hour of day, from 0 to 23, or <c>DatatypeConstants.FieldUndefined</c> if undefined.</value>
docs/xml/Javax.Xml.Datatype/XMLGregorianCalendar.xml:766
- This value references FieldUndefined using ..., which renders as plain code and loses the cross-reference. Elsewhere in this file the constant is referenced with ; please keep that pattern for consistency and navigability.
<value>The month, from 1 to 12, or <c>DatatypeConstants.FieldUndefined</c> if undefined.</value>
docs/xml/Javax.Xml.Datatype/XMLGregorianCalendar.xml:803
- This value references FieldUndefined using ..., which renders as plain code and loses the cross-reference. Elsewhere in this file the constant is referenced with ; please keep that pattern for consistency and navigability.
<value>The second of minute, from 0 to 59, or <c>DatatypeConstants.FieldUndefined</c> if undefined.</value>
docs/xml/Javax.Xml.Datatype/XMLGregorianCalendar.xml:969
- This value references FieldUndefined using ..., which renders as plain code and loses the cross-reference. Elsewhere in this file the constant is referenced with ; please keep that pattern for consistency and navigability.
<value>The timezone offset in minutes, or <c>DatatypeConstants.FieldUndefined</c> if undefined.</value>
docs/xml/Javax.Xml.Datatype/XMLGregorianCalendar.xml:1327
- This value references FieldUndefined using ..., which renders as plain code and loses the cross-reference. Elsewhere in this file the constant is referenced with ; please keep that pattern for consistency and navigability.
<value>The timezone offset in minutes, or <c>DatatypeConstants.FieldUndefined</c> if undefined.</value>
docs/xml/Javax.Xml.Datatype/XMLGregorianCalendar.xml:1640
- This value references FieldUndefined using ..., which renders as plain code and loses the cross-reference. Elsewhere in this file the constant is referenced with ; please keep that pattern for consistency and navigability.
<value>The low-order component of the year, or <c>DatatypeConstants.FieldUndefined</c> if undefined.</value>
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| <param name="factoryClassName">The fully qualified name of the factory class that provides the <c>javax.xml.datatype.DatatypeFactory</c> implementation.</param> | ||
| <param name="classLoader">The <c>ClassLoader</c> used to load the factory class. If <see langword="null" />, the current thread's context class loader is used.</param> | ||
| <summary>Returns an instance of the named implementation of <c>DatatypeFactory</c>.</summary> | ||
| <returns>New instance of a <code>DocumentBuilderFactory</code></returns> |
Refs #272 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
@dalexsoto review |
dalexsoto
left a comment
There was a problem hiding this comment.
Several newly added values describe the wrong public contract:
docs/xml/Javax.Xml.Datatype/XMLGregorianCalendar.xml:Minuteis documented as a month,Monthas seconds, andSecondas a timezone offset. Please assign the correct ranges to each property. TheHourrange must also include 24, with the constraint that minutes and seconds are zero.docs/xml/Javax.Xml.Datatype/DatatypeFactory.xml:NewInstance(string, ClassLoader)says it returnsDocumentBuilderFactory, but the declared return type isDatatypeFactory. Please correct the return text.
Summary
DatatypeFactory,Duration, andXMLGregorianCalendarproperty values, factory parameters, and conversion results.DatatypeConstants.xmluntouched because an active concurrent worktree owns that file.JniPeerMembersinfrastructure placeholders, which have no Java API source counterpart.Sources
DatatypeFactoryreferenceDurationreferenceXMLGregorianCalendarreferenceValidation
git diff --check.