Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#1166 closed Feature Requests (fixed)

[boostbook] paths relative to boost.root

Reported by: Steven Watanabe Owned by: Daniel James
Milestone: Boost 1.39.0 Component: Documentation
Version: Boost 1.35.0 Severity: Problem
Keywords: Cc:

Description

One of the thing that I find most annoying about the documentation tool chain is that I cannot write links that work both for builds of all of boost and builds of just one library. If boost://libs/mpl/index.html or something similar worked then I would be a lot happier. I am attaching a patch that allows this syntax.

Attachments (5)

relative-href.xsl.patch (1.1 KB ) - added by Steven Watanabe 15 years ago.
xref.xsl.patch (621 bytes ) - added by Steven Watanabe 15 years ago.
links.patch (2.1 KB ) - added by Daniel James 15 years ago.
Updated implementation, that uses 'boost:/libs..' instead of 'boost://libs..', and works for links from sub-directories.
boost-links-1.patch (1.2 KB ) - added by Daniel James 14 years ago.
New implementation, which transforms the links in the boostbook to docbook stage. Currently only translates ulinks, not other links such as images.
boost-links-2.patch (6.9 KB ) - added by Daniel James 14 years ago.
Some examples of using the 'boost:/' style links.

Download all attachments as: .zip

Change History (12)

by Steven Watanabe, 15 years ago

Attachment: relative-href.xsl.patch added

by Steven Watanabe, 15 years ago

Attachment: xref.xsl.patch added

comment:1 by Marshall Clow, 15 years ago

Component: NoneBuilding Boost

comment:2 by Daniel James, 15 years ago

Component: Building BoostDocumentation
Owner: set to Daniel James
Severity: Not ApplicableProblem
Status: newassigned
Version: Boost 1.34.1Boost 1.35.0

Yes, this is definitely needed.

boost://libs/mpl/index.html is probably wrong, as the :// usually indicates that the first past part of the path is a server name. boost:/libs/mpl/index.html or perhaps boost:libs/mpl/index.html is better.

Another possibility is to just do this for paths starting with '/', as that does suggest the root of the distribution. I like this, as I'm not keen on inventing our own protocol name. But 'boost:' will work very well if $boost.root == 'http://www.boost.org' - so it'll be ideal for candidate libraries.

I'll attach an updated patch which implements what I described, and also fixes a small bug when the link is from a sub-directory.

I'll bring this up on the Boost Docs list soon, as someone might have a better idea.

by Daniel James, 15 years ago

Attachment: links.patch added

Updated implementation, that uses 'boost:/libs..' instead of 'boost://libs..', and works for links from sub-directories.

comment:3 by Daniel James, 14 years ago

Milestone: To Be DeterminedBoost 1.37.0

I've been trying something like this in the doc branch, but it still doesn't completely work. Beacuse it's done as part of the chunking mechanism it only works for chunked output (ie. html/xhtml) but not for other types such as fo (for generating pdfs) and html-single. The links should be dealt with in the initial boostbook to docbook conversion. I'll get back to this.

comment:4 by Steven Watanabe, 14 years ago

Another thing, Would it be better to have a generic mechanism for specifying the root of a path as using an xsl parameter. so that this would become $(boost.root)/... Is this evan possible in xsl?

I'd also like to be able to specify the root of relative paths so that I can just specify paths relative to my quickbook sources rather than specifying the paths relative to the destination directory, since this is different for the standalone docs vs. the global boost doc build.

by Daniel James, 14 years ago

Attachment: boost-links-1.patch added

New implementation, which transforms the links in the boostbook to docbook stage. Currently only translates ulinks, not other links such as images.

by Daniel James, 14 years ago

Attachment: boost-links-2.patch added

Some examples of using the 'boost:/' style links.

comment:5 by Daniel James, 14 years ago

Resolution: fixed
Status: assignedclosed

(In [51261]) Implement the 'boost:' for links relative to boost root. Also, optionally replace links within the boost distribution with links to the the boost site, which is useful for generating pdfs and standalone documentation.

Implemented with John Maddock. Fixes #1166.

comment:6 by Daniel James, 14 years ago

(In [51739]) Record another previous change:

Recorded merge of revisions 51261 via svnmerge from https://svn.boost.org/svn/boost/trunk

........

r51261 | danieljames | 2009-02-15 19:31:37 +0000 (Sun, 15 Feb 2009) | 5 lines

Implement the 'boost:' for links relative to boost root. Also, optionally replace links within the boost distribution with links to the the boost site, which is useful for generating pdfs and standalone documentation.

Implemented with John Maddock. Fixes #1166.

........

comment:7 by Daniel James, 14 years ago

Milestone: Boost 1.37.0Boost 1.39.0
Note: See TracTickets for help on using tickets.