Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jan 2001 16:52:06 +0000
From:      Nik Clayton <nik@freebsd.org>
To:        Nik Clayton <nik@freebsd.org>
Cc:        Alexander Langer <alex@freebsd.org>, cvs-committers@freebsd.org, cvs-all@freebsd.org, doc@freebsd.org, nwalsh@nwalsh.com
Subject:   Flexible label customisation (was Re: cvs commit: ports/textproc/dsssl-docbook-modular Makefile ports/textproc/dsssl-docbook-modular/files patch-common_dbl1de.dsl)
Message-ID:  <20010121165205.A844@canyon.nothing-going-on.org>
In-Reply-To: <20010119155319.A48911@canyon.nothing-going-on.org>; from nik@freebsd.org on Fri, Jan 19, 2001 at 03:53:20PM %2B0000
References:  <200101190840.f0J8e7e87294@freefall.freebsd.org> <20010119105051.A47479@canyon.nothing-going-on.org> <20010119125752.A56295@cichlids.cichlids.com> <20010119155319.A48911@canyon.nothing-going-on.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--x+6KMIRAuhnl3hBn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Fri, Jan 19, 2001 at 03:53:20PM +0000, Nik Clayton wrote:
> I've cc'd Norm Walsh on this -- Norm, perhaps you could suggest a more
> elegant approach to the problem? ]

Still cc'd.  I think I've got a more elegant approach to the problem.

> The alternative is to do what you've done, which is patch the
> stylesheets as they're installed.  That's not really the perfect
> approach either, as anyone that tries to formation documentation on
> FreeBSD that doesn't use our customisation layer will now find that they
> get a spurious ': ' inserted when they use <warning> or <caution>.
> 
> Anyway, that's the problem, and we have at least three solutions, none
> of which are (IMHO) optimal.  Any suggestions for a fourth way?

Fourth way:

  Alter all the gentext-* functions so that as well as checking the
  appropriate <lang>-<type>-<name>-sep list, they check an additional
  list, local-<lang>-<type>-<name>-sep list.  Check the local-* list
  first, and use it's contents in preference.

  Attached is the patch to dbl1en.dsl that does this for title
  labelling.  There are another 11 functions in that file that would
  need modifying in the same way.

  I've also attached a patch to our freebsd.dsl, showing how
  declarations in the customisation layer would need to change.

Norm, comments?  Could we get something like this in for 1.61?

N
-- 
Internet connection, $19.95 a month.  Computer, $799.95.  Modem, $149.95.
Telephone line, $24.95 a month.  Software, free.  USENET transmission,
hundreds if not thousands of dollars.  Thinking before posting, priceless.
Somethings in life you can't buy.  For everything else, there's MasterCard.
  -- Graham Reed, in the Scary Devil Monastery

--x+6KMIRAuhnl3hBn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=p1

--- dbl1en.dsl.org	Sun Jan 21 16:32:05 2001
+++ dbl1en.dsl	Sun Jan 21 16:41:43 2001
@@ -273,6 +273,9 @@
 ;; abuse.
 ;;
 
+(define (local-en-label-title-sep)
+  (list))
+
 (define (en-label-title-sep)
   (list
    (list (normalize "abstract")		": ")
@@ -316,10 +319,13 @@
 (define (gentext-en-label-title-sep gind)
   (let* ((giname (if (string? gind) gind (gi gind)))
 	 (name   (normalize giname))
+	 (lsep	 (assoc name (local-en-label-title-sep)))
 	 (sep    (assoc name (en-label-title-sep))))
-    (if sep
-	(car (cdr sep))
-	"")))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+	    (car (cdr sep))
+	    ""))))
 
 (define (en-label-number-format-list)
   (list

--x+6KMIRAuhnl3hBn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=p

Index: freebsd.dsl
===================================================================
RCS file: /home/ncvs/doc/share/sgml/freebsd.dsl,v
retrieving revision 1.20
diff -u -r1.20 freebsd.dsl
--- freebsd.dsl	2001/01/08 12:40:52	1.20
+++ freebsd.dsl	2001/01/21 16:43:09
@@ -283,8 +267,11 @@
       (element (caution para) ($admonpara$))
       (element (caution simpara) ($admonpara$))
 
-      (define en-warning-label-title-sep ": ")
-      (define en-caution-label-title-sep ": ")
+      (define (local-en-label-title-sep)
+        (list
+          (list (normalize "warning")		": ")
+	  (list (normalize "caution")		": ")
+          ))
 
       <!-- Tell the stylesheet about our local customisations -->

--x+6KMIRAuhnl3hBn--


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?20010121165205.A844>