Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@rajko-furlan
Copy link

… to yes then key duplication is checked for in keyref processing instead of at the beginning

Description

A parameter was added that allows key duplication to be checked for after filtering (in keyref target [preprocess] and map-keyref [preprocess2] to be exact). The parameter is check.key.duplicates.in.keyref and it defaults to "no" which means that by default the current behavior doesn't change. To change it the parameter must be explicitly set to "yes".

Motivation and Context

The key duplication currently reports keys as duplicated even when the duplicates are filtered out in filtering stage. One of our clients is having problems because of that as for them a key duplication warning is fatal and they quit the processing if that warning is logged.

How Has This Been Tested?

The test suite was executed with gradlew check. One of the test cases failed, but after trying the original forked code it failed in the same test case; therefore, the failure is not due to the new code. The following test case fails in 4.3.1 HEAD (as forked a week ago) on my machine (Windows 11):

IntegrationTestPreprocess2 > testconref() FAILED
org.apache.tools.ant.BuildException at ExtensibleAntInvoker.java:214
Caused by: org.dita.dost.exception.DITAOTException at CopyToModule.java:72
Caused by: org.dita.dost.exception.DITAOTException at AbstractStore.java:113

The change should be backward compatible and it has no impact on the output. It just potentially changes the log.

Type of Changes

  • New feature (non-breaking change which adds functionality)

Documentation and Compatibility

The change requires addition of a new parameter here: https://www.dita-ot.org/dev/parameters/parameters-base. The parameter was already added to org.dita.base/plugin.xml.

The change shouldn't affect backwards compatibility or other users' overrides.

Checklist

@stefan-jung
Copy link
Contributor

@jelovirt and @robander, it would be nice if you'd merge this one.

… to yes then key duplication is checked for in keyref processing instead of at the beginning

Signed-off-by: Rajko Furlan <rfurlan@contiem.com>
@rajko-furlan rajko-furlan force-pushed the feature/check-key-duplicates-in-keyref branch from adb9caa to b616298 Compare May 9, 2025 12:08
@stefan-jung
Copy link
Contributor

This pull request fixes

@jomjohn
Copy link
Contributor

jomjohn commented Oct 23, 2025

Thank you @rajko-furlan and @stefan-jung , I have tested this PR for #4658 and can confirm that it fixes the erroneous reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.