From owner-freebsd-doc Sun Aug 25 6:45:13 2002 Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C738937B401 for ; Sun, 25 Aug 2002 06:45:10 -0700 (PDT) Received: from abigail.blackend.org (blackend.org [212.11.50.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 066E343E77 for ; Sun, 25 Aug 2002 06:45:09 -0700 (PDT) (envelope-from marc@blackend.org) Received: from abigail.blackend.org (localhost [127.0.0.1]) by abigail.blackend.org (8.12.3/8.12.3/ - 15/04/02) with ESMTP id g7PDfKAt021895 for ; Sun, 25 Aug 2002 15:41:20 +0200 (CEST) (envelope-from marc@abigail.blackend.org) Received: (from marc@localhost) by abigail.blackend.org (8.12.3/8.12.3/Submit) id g7PDfKiX021894 for freebsd-doc@FreeBSD.org; Sun, 25 Aug 2002 15:41:20 +0200 (CEST) (envelope-from marc) Date: Sun, 25 Aug 2002 15:41:20 +0200 From: Marc Fonvieille To: freebsd-doc@FreeBSD.org Subject: [PATCH] Support for links to Ports manual pages Message-ID: <20020825154120.A21468@abigail.blackend.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-Useless-Header: blackend.org X-Operating-System: FreeBSD 4.6-PRERELEASE Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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: 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 @@ (define %refentry-xref-link% #t) - - (define ($create-refentry-xref-link$ refentrytitle manvolnum) - (string-append "http://www.FreeBSD.org/cgi/man.cgi?query=" - refentrytitle "&" "sektion=" manvolnum)) ]]> 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