Skip to content
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

When rewrite rules are applied, append suffixes to avoid file name collisions #3958

Open
chrispy-snps opened this issue Jul 3, 2022 · 0 comments

Comments

@chrispy-snps
Copy link
Contributor

chrispy-snps commented Jul 3, 2022

Description

The DITA-OT is very good about appending suffixes to avoid file name collisions during keyscope/profiling/content-reuse uniquification.

However, rewrite rules do not provide this behavior. If rewrite rules result in identical file names:

name_collision

then the output uses one of them for all references:

$ ls -1 out
commonltr.css
commonrtl.css
features.html
index.html

Possible Solution

The DITA-OT rewrite rules module could detect and resolve collisions similarly to the keyscope/profiling/content-reuse features.

Potential Alternatives

As a workaround, the user could implement a multi-pass stylesheet that applies name rules in a first pass, then resolves collisions in a second pass. However, this requires some XSLT ability that perhaps not all DITA-OT users would have.

Additional Context

A testcase is included: 3958.zip

To run, type dita --project project.xml.

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

No branches or pull requests

1 participant