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 <sgmltag class="attribute">os</sgmltag>, <sgmltag
+can use attributes like <sgmltag class="attribute">os</sgmltag>, <sgmltag
class="attribute">userlevel</sgmltag> and <sgmltag
class="attribute">arch</sgmltag>. 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 <sgmltag
class="attribute">role</sgmltag>. <xref
-linkend="ex:doc"/> shows how document with profile information might
-look.</para>
+linkend="ex:doc"/> shows how document with profiling information might
+look like.</para>
-<example id="ex:doc">
+<example id="ex.doc">
<title>Sample DocBook document with profiling information</title>
<programlisting><![CDATA[<?xml version='1.0' encoding='iso-8859-1'?>
<!DOCTYPE chapter PUBLIC '-//OASIS//DTD DocBook XML V4.1.2//EN'
second step you could apply normal stylesheets on result of filtering.
This may be little bit inconvenient for many users, but whole task can
be very easily automated by set of shell scripts or batch files or
-whatever else.</para>
+whatever else. Starting from version 1.50 of XSL stylesheets you can
+do profiling in one step together with normal stylesheet
+processing.</para>
<figure>
<title>Profiling stream</title>
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
-<filename>tools/profile.xsl</filename>.</para>
+<filename>profiling/profile.xsl</filename>.</para>
</section>
<section>
<title>Usage</title>
<para>If you want to generate Unix specific guide from our sample
-document (<xref linkend="ex:doc"/>) you can do it in the following
+document (<xref linkend="ex.doc"/>) you can do it in the following
way. (We assume, that command <command>saxon</command> is able to run
XSLT processor on your machine. You can use your preffered XSLT
processor instead.)</para>
<variablelist>
<varlistentry>
-<term><parameter>os</parameter></term>
+<term><parameter>profile.os</parameter></term>
<listitem>
<para>This parameter is used for specifying operating system (<sgmltag
class="attribute">os</sgmltag> attribute) for which you want get
</listitem>
</varlistentry>
<varlistentry>
-<term><parameter>ul</parameter></term>
+<term><parameter>profile.userlevel</parameter></term>
<listitem>
<para>This parameter is used for specifying user level (<sgmltag
class="attribute">userlevel</sgmltag> attribute) for which you want get
</listitem>
</varlistentry>
<varlistentry>
-<term><parameter>arch</parameter></term>
+<term><parameter>profile.arch</parameter></term>
<listitem>
<para>This parameter is used for specifying hardware architecture (<sgmltag
class="attribute">arch</sgmltag> attribute) for which you want get
</listitem>
</varlistentry>
<varlistentry>
-<term><parameter>attr</parameter></term>
+<term><parameter>profile.condition</parameter></term>
+<term><parameter>profile.conformance</parameter></term>
+<term><parameter>profile.revision</parameter></term>
+<term><parameter>profile.revisionflag</parameter></term>
+<term><parameter>profile.security</parameter></term>
+<term><parameter>profile.vendor</parameter></term>
+<term><parameter>profile.role</parameter></term>
+<term><parameter>profile.lang</parameter></term>
+<listitem>
+<para>These parameters can be used to specify target profile for
+corresponding attributes.</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><parameter>profile.attribute</parameter></term>
<listitem>
<para>Name of attribute on which profiling should be based. It can be
used if profiling information is stored in other attributes then
</listitem>
</varlistentry>
<varlistentry>
-<term><parameter>val</parameter></term>
+<term><parameter>profile.value</parameter></term>
<listitem>
<para>This parameter is used for specifying value for attribute
selected by <parameter>attr</parameter> parameter.</para>
-<para>E.g. setting <literal>attr=os</literal> and
-<literal>val=unix</literal> is same as setting
+<para>E.g. setting <literal>profile.attribute=os</literal> and
+<literal>profile.value=unix</literal> is same as setting
<literal>os=unix</literal>.</para>
</listitem>
</varlistentry>
<varlistentry>
-<term><parameter>sep</parameter></term>
+<term><parameter>profile.separator</parameter></term>
<listitem>
<para>Separator for multiple target audience identifiers. Default is
<literal>;</literal>.</para>
simultaneously. For example to get hypothetical guide for Windows
beginners, you can run profiling like this:</para>
-<screen><command>saxon</command> <option>-o</option> xsample.xml sample.xml profile.xsl "os=win" "ul=beginner"</screen>
+<screen><command>saxon</command> <option>-o</option> xsample.xml sample.xml profile.xsl "profile.os=win" "profile.userlevel=beginner"</screen>
<para>As you can see above described profiling process can be used to
substitute SGML marked sections mechanism which is missing in XML.</para>
</section>
+<section>
+<title>Single pass profiling</title>
+
+<para>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 <filename>profile-</filename> instead of
+normal one (e.g. <filename>profile-docbook.xsl</filename>,
+<filename>profile-chunk.xsl</filename> or
+<filename>profile-htmlhelp.xsl</filename>). For example to get HTML
+version of profiled document use:</para>
+
+<screen><command>saxon</command> <option>-o</option> sample.html sample.xml .../html/profile-docbook.xsl "profile.os=win" "profile.userlevel=beginner"</screen>
+
+<para>No additional processing is necessary. If you want to use
+profiling with your customized stylesheets import profiling-able
+stylesheet instead of normal one.</para>
+
+</section>
+
<section>
<title>Conclusion</title>