hholzgra Thu Mar 21 19:08:11 2002 EDT
Modified files:
/phpdoc/dsssl html-common.dsl
Log:
faq-anchor problem solved
Index: phpdoc/dsssl/html-common.dsl
diff -u phpdoc/dsssl/html-common.dsl:1.4 phpdoc/dsssl/html-common.dsl:1.5
--- phpdoc/dsssl/html-common.dsl:1.4 Thu Mar 14 07:07:39 2002
+++ phpdoc/dsssl/html-common.dsl Thu Mar 21 19:08:11 2002
@@ -1,6 +1,6 @@
;; -*- Scheme -*-
;;
-;; $Id: html-common.dsl,v 1.4 2002/03/14 12:07:39 hholzgra Exp $
+;; $Id: html-common.dsl,v 1.5 2002/03/22 00:08:11 hholzgra Exp $
;;
;; Returns the depth of the auto-generated TOC (table of
@@ -10,6 +10,16 @@
2 ; the depth of the top-level TOC
1 ; the depth of all other TOCs
))
+
+;; re-defining element-id as we need to get the id of the parent
+;; element not only for <title> but also for <question> in the faq
+(define (element-id #!optional (nd (current-node)))
+ (let ((elem (if (equal? (gi nd) (normalize "title")) (parent nd)
+ (if (equal? (gi nd) (normalize "question")) (parent nd)
+ nd))))
+ (if (attribute-string (normalize "id") elem)
+ (attribute-string (normalize "id") elem)
+ (generate-anchor elem))))
;; Make function definitions bold
(element (funcdef function)