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

Fix relative path in the navigation #34

Open
blefort opened this issue Feb 18, 2015 · 10 comments
Open

Fix relative path in the navigation #34

blefort opened this issue Feb 18, 2015 · 10 comments
Assignees

Comments

@blefort
Copy link
Contributor

blefort commented Feb 18, 2015

href in the navigation use relative path in all situations, like '../concept/topicA.html'.

My understanding is that it's not a big problem, it is not super clean implementation but it is a problem when clients have big documentation (over 100 Mo), because all topics in the same directory will have a longer href value which increase documentation size.

@blefort
Copy link
Contributor Author

blefort commented Mar 13, 2015

Done in severals steps, completed in 89404ac

@drmacro
Copy link
Member

drmacro commented Mar 19, 2015

The code is not working correctly. Reopenning this issue.

@blefort
Copy link
Contributor Author

blefort commented Mar 19, 2015

Could you give me an example ?

@drmacro
Copy link
Member

drmacro commented Mar 19, 2015

The code was not calculating the correct relative path for some files.

The problem was trying to do everything with relative paths. It also wasn't adding the correct fragment ID for links to topics within to-content chunks.

There was also a bug in the base code that gets the unique topicrefs in that it wasn't handling the case where you have a to-content chunking topicref as a descendant of another to-content chunk--those topics weren't getting processed.

I reworked the code so the base navigation structure uses absolute paths, which makes calculating the relative paths easier and more reliable. And I fixed the chunk-handling bug.

@blefort
Copy link
Contributor Author

blefort commented Mar 21, 2015

Still have issue:

[xslt] /Users/juliesenecal/DITA-OT/plugins/org.dita4publishers.html5/xsl/map2html5Nav.xsl:161:13: Fatal Error! XPath syntax error at char 27 on line 161 in {...)) then}:
     [xslt]     Cannot find a matching 1-argument function named {http://dita2indesign.org/dita/functions}topicrefIsInChunk()
     [xslt] Failed to process null

I am working on it.

@blefort blefort reopened this Mar 21, 2015
@blefort blefort added the bug label Mar 21, 2015
@blefort
Copy link
Contributor Author

blefort commented Mar 21, 2015

@blefort
Copy link
Contributor Author

blefort commented Mar 21, 2015

#37 is related

@blefort
Copy link
Contributor Author

blefort commented Mar 22, 2015

Proposed fix in 94da8d3.
Need more test to confirm

@drmacro
Copy link
Member

drmacro commented Mar 22, 2015

I updated the common.xslt module with this new function, so you need to have the latest version of that.

@blefort
Copy link
Contributor Author

blefort commented Mar 22, 2015

yes, I figured it but could not get the right path. I am doing tests at this moment. I like the way you use the resultUri variable to resolve the whole thing. There is a file strategy in your code that I have not tested yet. What is it for?

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

No branches or pull requests

2 participants