The profiling stylesheets let you designate any attribute name as a profiling attribute by setting a couple of parameters. This is most useful when you want to profile on an attribute that is not normally used for such.
For example, you may be preparing a new draft of a document at the same time you are producing the current released version. You could mark those elements still under development with the attribute status="draft"
, and then use the status
attribute as the profiling attribute.
First set the profile.attribute
stylesheet parameter to the value status
.
When you want to produce a draft version, then set the profile.value
parameter to the value draft
. This will include all content marked with status="draft"
as well as any content without a status
attribute. Note that if you also use the
status
attribute with another
value, then those elements will be deselected and not included in the
output.
You might also set the draft.mode
parameter to maybe
, which will mark as draft only those sections with the
draft attribute.
xsltproc --output myfile.html \
--stringparam profile.attribute "status" \
--stringparam profile.value "draft" \
--stringparam draft.mode "maybe" \
html/profile-docbook.xsl \
myfile.xml
When you want to produce the non-draft version, then set the profile.value
parameter to any other value (except blank). That will
deselect all the content marked with status="draft"
. You would not need to turn off the draft.mode
parameter, because it only marks content that has that
attribute.
DocBook XSL: The Complete Guide - 3rd Edition | PDF version available | Copyright © 2002-2005 Sagehill Enterprises |