git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d0f876c)
Put per-letter quicklinks at the top of the HTML bookindex page
2010年10月13日 16:46:05 +0000 (19:46 +0300)
2010年10月13日 16:46:05 +0000 (19:46 +0300)

diff --git a/doc/src/sgml/stylesheet.dsl b/doc/src/sgml/stylesheet.dsl
index b7cf735d60e64cb1a12d106a5f3327c0d155bc96..3a1c632c903450866b51ee9d78015d9363b8956e 100644 (file)
--- a/doc/src/sgml/stylesheet.dsl
+++ b/doc/src/sgml/stylesheet.dsl
@@ -371,6 +371,49 @@
(empty-sosofo))))
+;; Put index "quicklinks" (A | B | C | ...) at the top of the bookindex page.
+
+(element index
+ (let ((preamble (node-list-filter-by-not-gi
+ (children (current-node))
+ (list (normalize "indexentry"))))
+ (indexdivs (node-list-filter-by-gi
+ (children (current-node))
+ (list (normalize "indexdiv"))))
+ (entries (node-list-filter-by-gi
+ (children (current-node))
+ (list (normalize "indexentry")))))
+ (html-document
+ (with-mode head-title-mode
+ (literal (element-title-string (current-node))))
+ (make element gi: "DIV"
+ attributes: (list (list "CLASS" (gi)))
+ ($component-separator$)
+ ($component-title$)
+ (if (node-list-empty? indexdivs)
+ (empty-sosofo)
+ (make element gi: "P"
+ attributes: (list (list "CLASS" "INDEXDIV-QUICKLINKS"))
+ (with-mode indexdiv-quicklinks-mode
+ (process-node-list indexdivs))))
+ (process-node-list preamble)
+ (if (node-list-empty? entries)
+ (empty-sosofo)
+ (make element gi: "DL"
+ (process-node-list entries)))))))
+
+
+(mode indexdiv-quicklinks-mode
+ (element indexdiv
+ (make sequence
+ (make element gi: "A"
+ attributes: (list (list "HREF" (href-to (current-node))))
+ (element-title-sosofo))
+ (if (not (last-sibling?))
+ (literal " | ")
+ (literal "")))))
+
+
]]> <!-- %output-html -->
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /