OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: DOCBOOK-APPS: Using HTML phrase elements


We recognize that HTML lacks the richness necessary to provide the full
meaning of all the tags in docbook, but that doesn't mean we need to
ignore the elements that HTML does have.  

For example, the stylesheets currently transform the "emphasis" element to
"italic-seq", when there is the HTML element "em", which is the perfectly
suited translation.  And I know I don't need to preach to an audience of
docbook users about using the right tags.  ;)

Here is my attempt to provide better docbook to html element translations.
This can be used it appears here in the user's customization layer, but
probably really belongs in html/dbinline.dsl.

<!-- Transforms from docbook to html elements -->

<!-- inline elements, and their former nwalsh styles -->
(element abbrev    ($abbr-seq$))      ; char
(element acronym   ($acronym-seq$))   ; char
(element citetitle ($cite-seq$))      ; italic
(element classname ($code-seq$))      ; mono
(element command   ($kbd-seq$))       ; bold
(element computeroutput ($samp-seq$)) ; mono
(element emphasis  ($emphasis-seq$))  ; italic
(element envar     ($var-seq$))       ; mono
(element function  ($code-seq$))      ; mono
(element parameter ($var-seq$))       ; italic-mono
(element prompt    ($samp-seq$))      ; mono 
(element structfield ($var-seq$))     ; italic-mono
(element structname ($code-seq$))     ; char
(element type      ($code-seq$))      ; char
(element userinput ($kbd-seq$))       ; bold-mono
(element varname   ($var-seq$))       ; mono

<!-- html rendering -->
(define ($abbr-seq$ #!optional (sosofo (process-children)))
  (make element gi: "abbr"
        sosofo))

(define ($acronym-seq$ #!optional (sosofo (process-children)))
  (make element gi: "acronym"
        sosofo))

(define ($cite-seq$ #!optional (sosofo (process-children)))
  (make element gi: "cite"
        sosofo))

(define ($code-seq$ #!optional (sosofo (process-children)))
  (make element gi: "code"
        attributes: (list
                     (list "CLASS" (gi)))
        sosofo))

(define ($emphasis-seq$ #!optional (sosofo (process-children)))
  (make element gi: "em"
        sosofo))

(define ($kbd-seq$ #!optional (sosofo (process-children)))
  (make element gi: "kbd"
        attributes: (list
                     (list "CLASS" (gi)))
        sosofo))

(define ($samp-seq$ #!optional (sosofo (process-children)))
  (make element gi: "samp"
        attributes: (list
                     (list "CLASS" (gi)))
        sosofo))

(define ($var-seq$ #!optional (sosofo (process-children)))
  (make element gi: "var"
        attributes: (list
                     (list "CLASS" (gi)))
        sosofo))

-- 
Kevin Turner <acapnotic@users.sourceforge.net> | OpenPGP encryption welcome here
This list is archived at http://xml.org/archives/docbook-apps/
To unsubscribe send "unsubscribe docbook-apps" to Majordomo@lists.oasis-open.org


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC