goba            Sun Apr 10 12:04:51 2005 EDT

  Modified files:              
    /phpdoc/dsssl       html-common.dsl 
  Log:
  an exclusive dsssl fix, on request: do not print version information on dsssl 
pages.
  how it works: it tries to check the ID of the
  refentry for which the version information is written out,
  and it if seems to be a PCRE description page, it does not
  generate the version info
  
  The substring match can be easily abstracted, so more checks
  can be made (and it can be done not only in HTML, but also in
  other outputs). Let me know what you think.
  
http://cvs.php.net/diff.php/phpdoc/dsssl/html-common.dsl?r1=1.16&r2=1.17&ty=u
Index: phpdoc/dsssl/html-common.dsl
diff -u phpdoc/dsssl/html-common.dsl:1.16 phpdoc/dsssl/html-common.dsl:1.17
--- phpdoc/dsssl/html-common.dsl:1.16   Thu Apr  7 08:21:49 2005
+++ phpdoc/dsssl/html-common.dsl        Sun Apr 10 12:04:50 2005
@@ -1,6 +1,6 @@
 ;; -*- Scheme -*-
 ;;
-;; $Id: html-common.dsl,v 1.16 2005/04/07 12:21:49 vrana Exp $
+;; $Id: html-common.dsl,v 1.17 2005/04/10 16:04:50 goba Exp $
 ;;
 
 ;; Returns the depth of the auto-generated TOC (table of
@@ -300,18 +300,24 @@
 )
 
 
-;; Put version info where the refname part in the refnamediv is
+;; Put version info where the refname part in the refnamediv is, except
+;; on pcre reference pages (these are masked as function pages, but are
+;; not function pages themselfs)
 (element (refnamediv refname)
-  (make sequence
-    (make element gi: "P"
-      (literal "    (")
-      (version-info (current-node))
-      (literal ")")
+  (let ((refid (attribute-string (normalize "id") (parent (parent 
(current-node))))))
+    (if (not (string=? (substring refid 0 14) "reference.pcre")) 
+      (make sequence
+        (make element gi: "P"
+          (literal "    (")
+          (version-info (current-node))
+          (literal ")")
+        )
+        (process-children)
       )
-    (process-children)
+         (process-children)
     )
   )
-
+)
 
 ;; Display of question tags, link targets
 (element question

Reply via email to