Skip to content

fix: improve references section validation (#227, #218)#265

Open
1456055067 wants to merge 1 commit into
ietf-tools:v3from
1456055067:fix/references-validation
Open

fix: improve references section validation (#227, #218)#265
1456055067 wants to merge 1 commit into
ietf-tools:v3from
1456055067:fix/references-validation

Conversation

@1456055067
Copy link
Copy Markdown
Contributor

Summary

The standard nested <references> wrapper pattern (<references><name>References</name> containing inner Normative/Informative <references> subsections) was incorrectly triggering INVALID_REFERENCES_NAME on the outer wrapper.

Fix

  • The validator now detects the wrapper and validates the inner sections instead.
  • Renamed MISSING_REFERENCES_SUBSECTIONS to MISSING_REFERENCES_CLASSIFICATION. The previous message implied subsections were always required, which is not the case (e.g., a standalone 8. Normative References is valid).

Checklist

  • Added unit tests for nested XML wrapper (valid wrapper, invalid inner names, single inner section)
  • Updated existing text test to expect new MISSING_REFERENCES_CLASSIFICATION error code
  • All 443 tests pass (npm test)
  • Ran node cli.js against an XML file that uses the standard nested references wrapper pattern and previously triggered the INVALID_REFERENCES_NAME error — confirmed the false positive is resolved and the references section validates cleanly

Issues Resolved

…s#218)

Fixed false INVALID_REFERENCES_NAME error on standard nested XML
references wrapper pattern. Rename MISSING_REFERENCES_SUBSECTIONS to
MISSING_REFERENCES_CLASSIFICATION with a clearer error message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant