From 7dd62cc679cb5c7cd120d1809d6e639720b32f22 Mon Sep 17 00:00:00 2001
From: Hiroki Sato <hrs@FreeBSD.org>
Date: Wed, 24 Dec 2008 17:18:27 +0000
Subject: [PATCH] Add the following idiom for <acronym> with description:

 <acronym>FOO<remark role="acronym">DESC OF FOO</remark></acronym>

Discussed on:	-doc
---
 share/sgml/freebsd-html.dsl | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/share/sgml/freebsd-html.dsl b/share/sgml/freebsd-html.dsl
index 9aadff7666..071d880803 100644
--- a/share/sgml/freebsd-html.dsl
+++ b/share/sgml/freebsd-html.dsl
@@ -64,19 +64,20 @@
 
 ;; Taken from Norm's stylesheets; modified to add support for TITLE so
 ;; that we get a mouse over definition for acronyms in HTML output.
-       (define ($acronym-seq$ #!optional (sosofo (process-children)))
-	 ;; FIXME: html4 only
-	 (let ((title (attribute-string (normalize "role") (current-node))))
-	   (if title
-	 (make element gi: "ACRONYM"
-	       attributes: (list
-			    (list "TITLE" title)
-			    (list "CLASS" (gi)))
-	       sosofo)
-	 (make element gi: "ACRONYM"
-	       attributes: (list
-			    (list "CLASS" (gi)))
-	       sosofo))))
+
+	(define ($acronym-seq$ #!optional (sosofo (process-children)))
+	  (let* ((acronym-remark (select-elements
+				  (children (current-node))
+				  (normalize "remark"))))
+	    (let* ((title (if (and acronym-remark
+				   (equal? (attribute-string (normalize "role") acronym-remark) "acronym"))
+			      (data acronym-remark)
+			      "")))
+	      (make element gi: "ACRONYM"
+		    attributes: (list
+				 (list "CLASS" (gi))
+				 (list "TITLE" title))
+		    sosofo))))
 
         (define (book-titlepage-recto-elements)
           (list (normalize "title")