Date: Sun, 25 Aug 2002 15:41:20 +0200 From: Marc Fonvieille <blackend@FreeBSD.org> To: freebsd-doc@FreeBSD.org Subject: [PATCH] Support for links to Ports manual pages Message-ID: <20020825154120.A21468@abigail.blackend.org>
next in thread | raw e-mail | index | archive | help
Hello,
For the moment only manual pages from the base system can be reached
with our current stylesheet.
I did a little patch which fix the manpath problem for ports manual
pages. I wanted something simple: no change to the current docs, the
entities remain the same.
My idea is to use a role attribute in the entity declaration. For
example:
<!ENTITY man.xdm.1 "<citerefentry role='ports'/<refentrytitle/xdm/<manvolnum/1//">
We have to add that attribute only for ports manual pages, and in the
docs the entity remains &man.xdm.1;
Here's my patch against doc/share/sgml/freebsd.dsl
Index: freebsd.dsl
===================================================================
RCS file: /home/ncvs/doc/share/sgml/freebsd.dsl,v
retrieving revision 1.64
diff -u -r1.64 freebsd.dsl
--- freebsd.dsl 27 Feb 2002 04:56:44 -0000 1.64
+++ freebsd.dsl 25 Aug 2002 13:25:14 -0000
@@ -129,9 +129,11 @@
(normalize "refentrytitle")))
(manvolnum (select-elements (children (current-node))
(normalize "manvolnum")))
- (href ($create-refentry-xref-link$
- (data refentrytitle)
- (data manvolnum))))
+ (href (string-append
+ "http://www.FreeBSD.org/cgi/man.cgi?query="
+ (data refentrytitle) "&" "sektion=" (data manvolnum) "&"
+ "manpath=" (if (attribute-string (normalize "role"))
+ (attribute-string (normalize "role")) ""))))
(if %refentry-xref-link%
(create-link (list (list "HREF" href))
(if %refentry-xref-italic%
As you can see, now we can remove some of the code from
doc/en_US.ISO8859-1/share/sgml/freebsd.dsl, here's the patch:
Index: freebsd.dsl
===================================================================
RCS file: /home/ncvs/doc/en_US.ISO8859-1/share/sgml/freebsd.dsl,v
retrieving revision 1.14
diff -u -r1.14 freebsd.dsl
--- freebsd.dsl 2 Sep 2001 02:37:50 -0000 1.14
+++ freebsd.dsl 25 Aug 2002 13:12:40 -0000
@@ -52,10 +52,6 @@
<!-- Generate links to HTML man pages -->
(define %refentry-xref-link% #t)
- <!-- Specify how to generate the man page link HREF -->
- (define ($create-refentry-xref-link$ refentrytitle manvolnum)
- (string-append "http://www.FreeBSD.org/cgi/man.cgi?query="
- refentrytitle "&" "sektion=" manvolnum))
]]>
<!-- More aesthetically pleasing chapter headers for print output -->
Maybe, my dssl code is not perfect (I'm not an expert) :)
I tried it on the Handbook and all is Ok.
Any opinions?
Marc
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020825154120.A21468>
