From: Jirka Kosek Date: Sun, 3 Mar 2002 20:48:43 +0000 (+0000) Subject: Put documentation in sync with new profiling stylesheets. X-Git-Tag: release/1.79.1~6^2~5890 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=556976ee3c0e6ed3d024f7239c4558310886962f;p=docbook-dsssl Put documentation in sync with new profiling stylesheets. --- diff --git a/xsl/docsrc/tools/profiling.xml b/xsl/docsrc/tools/profiling.xml index c9fd3cb38..cbb8638cc 100644 --- a/xsl/docsrc/tools/profiling.xml +++ b/xsl/docsrc/tools/profiling.xml @@ -57,16 +57,16 @@ or user group. When generating final output version of document we must do profiling i.e. personalization for particular target audience. Only some parts of document are processed. DocBook has built in support for marking document parts – on almost every element you -can use attributes os, os, userlevel and arch. We can store identifier of operating system, user group or hardware architecture here. You can also store profiling information into some general use attribute like role. shows how document with profile information might -look. +linkend="ex:doc"/> shows how document with profiling information might +look like. - + Sample DocBook document with profiling information +whatever else. Starting from version 1.50 of XSL stylesheets you can +do profiling in one step together with normal stylesheet +processing.
Profiling stream @@ -145,14 +147,14 @@ and tools. I decided to use XSLT stylesheet. Writing necessary filter is very easy in XSLT and many users have XSLT processor already installed. Profiling stylesheet is part of standard XSL stylesheets distribution and can be found in file -tools/profile.xsl. +profiling/profile.xsl.
Usage If you want to generate Unix specific guide from our sample -document () you can do it in the following +document () you can do it in the following way. (We assume, that command saxon is able to run XSLT processor on your machine. You can use your preffered XSLT processor instead.) @@ -201,7 +203,7 @@ values. They are summarized in the following list. -os +profile.os This parameter is used for specifying operating system (os attribute) for which you want get @@ -209,7 +211,7 @@ profiled version of document. -ul +profile.userlevel This parameter is used for specifying user level (userlevel attribute) for which you want get @@ -217,7 +219,7 @@ profiled version of document. -arch +profile.arch This parameter is used for specifying hardware architecture (arch attribute) for which you want get @@ -225,7 +227,21 @@ profiled version of document. -attr +profile.condition +profile.conformance +profile.revision +profile.revisionflag +profile.security +profile.vendor +profile.role +profile.lang + +These parameters can be used to specify target profile for +corresponding attributes. + + + +profile.attribute Name of attribute on which profiling should be based. It can be used if profiling information is stored in other attributes then @@ -234,17 +250,17 @@ class="attribute">userlevel and arch -val +profile.value This parameter is used for specifying value for attribute selected by attr parameter. -E.g. setting attr=os and -val=unix is same as setting +E.g. setting profile.attribute=os and +profile.value=unix is same as setting os=unix. -sep +profile.separator Separator for multiple target audience identifiers. Default is ;. @@ -268,13 +284,33 @@ attributes in a single step as stylesheet can handle all parameters simultaneously. For example to get hypothetical guide for Windows beginners, you can run profiling like this: -saxon xsample.xml sample.xml profile.xsl "os=win" "ul=beginner" +saxon xsample.xml sample.xml profile.xsl "profile.os=win" "profile.userlevel=beginner" As you can see above described profiling process can be used to substitute SGML marked sections mechanism which is missing in XML.
+
+Single pass profiling + +If you are using XSL stylesheets version 1.50 and later with +EXSLT enabled XSLT processor (Saxon, xsltproc, Xalan) you can do +profiling and transformation to HTML or FO in a single step. To do this +use stylesheet with prefix profile- instead of +normal one (e.g. profile-docbook.xsl, +profile-chunk.xsl or +profile-htmlhelp.xsl). For example to get HTML +version of profiled document use: + +saxon sample.html sample.xml .../html/profile-docbook.xsl "profile.os=win" "profile.userlevel=beginner" + +No additional processing is necessary. If you want to use +profiling with your customized stylesheets import profiling-able +stylesheet instead of normal one. + +
+
Conclusion