This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Customizing the role attribute
- To: docbook at lists dot oasis-open dot org
- Subject: DOCBOOK: Customizing the role attribute
- From: Horacio <homega at ciberia dot es>
- Date: Wed, 18 Apr 2001 18:18:08 +0200
- Reply-to: hacho at crosswinds dot net
I´m 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´ve 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 ´role´s "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
------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-request@lists.oasis-open.org