(defun www-feature-value-format (feature-name)
(or (char-feature-property feature-name 'value-format)
- (if (memq (www-feature-type feature-name)
- '(relation structure))
- 'space-separated-char-list)
+ (let ((type (www-feature-type feature-name)))
+ (cond ((eq type 'relation)
+ 'space-separated-char-list)
+ ((eq type 'structure)
+ 'space-separated-ids)))
(if (find-charset feature-name)
(if (and (= (charset-dimension feature-name) 2)
(= (charset-chars feature-name) 94))
value " ")
(www-format-encode-string (format "%s" value) without-tags)))
+(defun www-format-value-as-ids (value &optional without-tags)
+ (if (listp value)
+ (mapconcat
+ (if without-tags
+ (lambda (unit)
+ (www-format-encode-string
+ (format (if (characterp unit)
+ "%c"
+ "%s")
+ unit)
+ 'without-tags))
+ (lambda (unit)
+ (if (characterp unit)
+ (format "<a href=\"%s?char=%s\">%s</a>"
+ chise-wiki-view-url
+ (www-uri-encode-char unit)
+ (www-format-encode-string (char-to-string unit)))
+ (www-format-encode-string (format "%s" unit)))))
+ (ideographic-structure-to-ids value) " ")
+ (www-format-encode-string (format "%s" value) without-tags)))
+
(defun www-format-value-as-S-exp (value &optional without-tags)
(www-format-encode-string (format "%S" value) without-tags))
(www-format-value-as-kuten value))
((eq format 'space-separated-char-list)
(www-format-value-as-char-list value without-tags))
+ ((eq format 'space-separated-ids)
+ (www-format-value-as-ids value without-tags))
(t
(setq format 'default)
(www-format-encode-string