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

Add support for olink DocBook element #5

Open
fbolton opened this issue Mar 7, 2017 · 1 comment
Open

Add support for olink DocBook element #5

fbolton opened this issue Mar 7, 2017 · 1 comment

Comments

@fbolton
Copy link

fbolton commented Mar 7, 2017

One of the eccentricities of the JBoss Fuse library is that we use olink elements a lot, not only for linking within a book, but also for linking between different books in the same library. Now, these are different cases, so I will go through them separately.

First, using olink to define a link to an element in the same book. Here is an example of this olink syntax:

<olink targetptr="TargetID"/>

Which can easily be rendered in AsciiDoc as:

<<TargetID>>

Second, using olink to define a link to an element in a different book in the same library. Well, we don't really have a proper solution for this case at the moment (thought it will probably be solved soon in the context of Docs 2.0). My strategy to deal with this kind of olink is to preserve the metadata through the conversion to AsciiDoc and then deal with it later. Here is an example of this olinksyntax:

<olink targetdoc="TargetBookID" targetptr="TargetID"/>

I suggest converting it to AsciiDoc as follows:

link:olink:TargetBookID/TargetID[]

This is legal AsciiDoc syntax, but will not be processed, since olink: is an unknown scheme. This would give me a handy placeholder which I can search and replace some time in the future, when we have worked out a more permanent solution.

@fbolton
Copy link
Author

fbolton commented Mar 12, 2017

I have a fix for this enhancement. It is pretty straightforward. Maybe does not cover all the corner cases, but it's good enough for me.

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