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

Non-normalized URI leads to invalid persistent TOC #579

Open
fsteimke opened this issue Jan 8, 2025 · 0 comments
Open

Non-normalized URI leads to invalid persistent TOC #579

fsteimke opened this issue Jan 8, 2025 · 0 comments

Comments

@fsteimke
Copy link
Contributor

fsteimke commented Jan 8, 2025

This is my use-case: i have DocBook sources in a directory file:/mnt/shared/xnachweis/src. I want chunked output not below, but next to the sources in directory file:/mnt/shared/xnachweis/chunk.

From the command line, i would set

$chunk-output-base-uri =  file:/mnt/shared/xnachweis/chunk/

When i use xslTNG within Oxygen, it is convenient to use a so called Editor variable which references the directory of the current source file and navigate from there. Resolving this variable leads to

$chunk-output-base-uri =  file:/mnt/shared/xnachweis/src/../chunk/

which references the same directory as before. Chunk files will be in the correct Directory, but the persistent ToC will not work. The reason is, that in mode mp:copy-patch-toc in chunk-output.xsl the prefix of $vp:chunk-output-base-uri is compared with the prefix of another URI, and the unnecessary down-up fragment /src/.. causes comparison to fail.

$vp:chunk-output-base-uri is a normalized value of $chunk-output-base-uri, but it is not normalized enough. It should also be shortened, so that file:/mnt/shared/xnachweis/src/..chunk/ becomes file:/mnt/shared/xnachweis/chunk/. I will try to provide a PR.

Greetings, Frank Steimke

fsteimke added a commit to fsteimke/xslTNG that referenced this issue Jan 8, 2025
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