← Prev in month
← Prev in thread
Next in thread →
Next in month →
DOCBOOK: Customizing the role attribute
I惴 trying to workout how to customize de role attribute for the
emphasis element. First thing I would like to have
<emphasis role="bastardilla"> to render italics, and
<emphasis role="negrilla"> to render bold.
Then, perhaps having <emphasis> (with no role att.) to render
both bold and italics. Other customization I want to achieve is
for having <emphasis role="color"> to render the especified
colour.
So far I扉e written this test.dsl file:
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
;; crear 愉ole愀 "bastardilla" y "negrilla"
;; tb crear uno para ambas
(element emphasis
(if (equal? (attribute-string "role") "negrilla")
(make sequence
font-weight: 'bold
(process-children))
(if (equal? (attribute-string "role") "bastardilla")
(make sequence
font-posture: 'italic
(process-children))
(make sequence
font-posture: 'italic
(process-children)))))
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="docbook.dsl">
</style-sheet>
and run the following command line:
$ openjade -c /usr/local/share/sgml/docbook/dsssl/modular/catalog /
-c /usr/local/share/sgml/docbook/catalog /
-c /usr/local/share/sgml/openjade/catalog /
-d test.dsl -t sgml article.sgml
but I get no format at all. Could you help me to understand how
to write stylesheets?
Thank You,
--
Horacio
← Prev in month
← Prev in thread
Next in thread →
Next in month →