New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conref in a submap in a subdirectory is broken #2806

Merged
merged 2 commits into from Oct 5, 2017

Conversation

Projects
None yet
2 participants
@robander
Member

robander commented Oct 3, 2017

Signed-off-by: Robert D Anderson robander@us.ibm.com

Description

I have a submap that uses conref to pull in a phrase. The submap is not in the same directory as the root map. When the mapref step runs and the maps are resolved, paths in @conref are not adjusted, so the relative path is no longer valid. When the conref step runs, each relative-path conref in the submap will throw an error.

Much less of a priority, but I also noticed that relative paths on non-topicref @href that appear in submaps are also not adjusted.

A similar fix works to fix each case, by ensuring that the $relative-path parameter is passed to non-topicref contexts.

How Has This Been Tested?

Test case uses submap in a sub-dir. In the submap there is a relative @conref as well as xref/@href. Test case is now added to the integration tests with correct resolved markup from mapref + conref. Failed before the fix, works with the fix, no other tests affected.

Type of Changes

Bug fix

Checklist

X I have signed-off my commits per http://www.dita-ot.org/DCO.
X Builds & tests completed successfully (./gradlew test integrationTest).
X My code follows the code style of this project.
- https://github.com/dita-ot/dita-ot/wiki/Java-Coding-Conventions
- https://github.com/dita-ot/dita-ot/wiki/XSLT-Coding-Conventions
X I have updated the unit tests to reflect the changes in my code.

Fix conref in submap in subdir
Signed-off-by: Robert D Anderson <robander@us.ibm.com>

@robander robander added this to the 2.5.4 milestone Oct 3, 2017

@robander robander self-assigned this Oct 3, 2017

Show outdated Hide outdated src/main/xsl/preprocess/maprefImpl.xsl Outdated
Switch to tunnel params based on code review, extend test case
Signed-off-by: Robert D Anderson <robander@us.ibm.com>

@jelovirt jelovirt merged commit 56ba8e6 into dita-ot:hotfix/2.5.4 Oct 5, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@robander robander deleted the robander:hotfix/conrefmap branch Oct 5, 2017

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