(www-display-char-desc): Display parents in the header.
authorMORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
Sun, 28 Mar 2010 20:02:35 +0000 (05:02 +0900)
committerMORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
Sun, 28 Mar 2010 20:02:35 +0000 (05:02 +0900)
(www-display-feature-desc): Use `www-format-value' with default format
instead of `www-xml-format-list' and `www-format-encode-string'.

cwiki-view.el

index 911b190..72aeb42 100644 (file)
@@ -9,7 +9,8 @@
   (unless level
     (setq level 1))
   (let ((char (www-uri-decode-char uri-char))
-       logical-feature displayed-features)
+       logical-feature displayed-features
+       parents)
     (when (characterp char)
       (when (= (length uri-char) 1)
        (setq uri-char (www-uri-encode-char char)))
                  (decode-uri-string uri-char 'utf-8-mcs-er))
          'utf-8-mcs-er))
        (princ "<body>\n"))
+      (dolist (feature (char-feature-property '$object 'additional-features))
+       (mount-char-attribute-table
+        (char-feature-name-at-domain feature '$rev=latest)))
+      (when (setq parents (www-char-feature char '<-denotational))
+       (princ (format "<p>%s %s</p>\n<hr>\n"
+                      (www-format-value-as-char-list parents)
+                      (www-format-feature-name '->denotational lang))))
+      (when (setq parents (www-char-feature char '<-subsumptive))
+       (princ (format "<p>%s %s</p>\n<hr>\n"
+                      (www-format-value-as-char-list parents)
+                      (www-format-feature-name '->subsumptive lang))))
       (princ (format "<h%d>%s</h%d>\n"
                     level
                     (www-format-encode-string (char-to-string char))
                     level))
       (if (> level 1)
          (princ "<ul>"))
-      (dolist (feature (char-feature-property '$object 'additional-features))
-       (mount-char-attribute-table
-        (char-feature-name-at-domain feature '$rev=latest)))
       (dolist (cell (sort (char-attribute-alist char)
                          (lambda (a b)
                            (char-attribute-name< (car a)(car b)))))
                 ;; (char-feature-property feature-name 'type)
                 'generic)))
     (princ (format "<p>value-format : %s "
-                  (www-format-encode-string
-                   (www-xml-format-list
-                    (or (www-feature-value-format feature-name)
-                        'default)))))
+                  (www-format-value
+                   nil 'value-format 
+                   (or (www-feature-value-format feature-name)
+                       'default)
+                   'default
+                   'without-tags)))
     ;; (www-html-display-paragraph
     ;;  (format "value-format : %s"
     ;;          (www-xml-format-list