Another approach is to do two profiling passes. On the
first
pass, process your document with profiling/profile.xsl and
set
profile.condition="C1". Any elements with
condition="C2" will be
removed. On the second pass, process the result of the
first
pass with the same stylesheet but set
profile.condition="C2".
That will remove any elements with
condition="C1", leaving only
those with condition="C1;C2". Then process the
result of that
with the regular stylesheet.
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs sagehill.net
----- Original Message -----
From: "Jirka Kosek" <jirka kosek.cz>
To: "John Dyer" <jdyer opushealthcare.com>
Cc: <docbook lists.oasis-open.org>
Sent: Wednesday, March 29, 2006 9:51 AM
Subject: Re: [docbook] Adding new element to docbook DTD
John Dyer wrote:
> <para condition="C1;C2">
> this is a test
> </para>
>
> This paragraph would be printed if C1 is true OR C2 is
true. I
> would
> like to have a way to print this paragraph only if C1
is true
> AND C2 is
> true. As far as I can tell, docbook does not support
this, so
> my idea
> is to nest elements with the conditions that need to
all be
> true. Take
> this example:
You can use multiple profiling attributes on a single
element. In
this
case conditions are "ANDed". E.g.
<para condition="C1"
role="C2">
this is a test
</para>
And then use profile.condition=C1 and profile.role=C2
parameters
for
processing. Note that you might find more appropriate
attribute
then
role for the second condition. The following attributes are
supported
directly for profiling:
<xsl:param name="profile.arch"
select="''"/>
<xsl:param name="profile.condition"
select="''"/>
<xsl:param name="profile.conformance"
select="''"/>
<xsl:param name="profile.lang"
select="''"/>
<xsl:param name="profile.os"
select="''"/>
<xsl:param name="profile.revision"
select="''"/>
<xsl:param name="profile.revisionflag"
select="''"/>
<xsl:param name="profile.role"
select="''"/>
<xsl:param name="profile.security"
select="''"/>
<xsl:param name="profile.userlevel"
select="''"/>
<xsl:param name="profile.vendor"
select="''"/>
--
------------------------------------------------------------
------
Jirka Kosek e-mail: jirka kosek.cz http://www.kosek.cz
------------------------------------------------------------
------
Profesionální školení a poradenství v oblasti technologií
XML.
Podívejte se na náš nově spuštěný web http://DocBook.cz
Podrobný přehled školení http://xmlguru.cz/skoleni/
------------------------------------------------------------
------
Nejbližší termíny školení:
** XSLT 13.-16.3.2006 ** XML schémata 24.-26.4.2006 **
** DocBook 15.-17.5.2006 ** XSL-FO 12.-13.6.2006 **
------------------------------------------------------------
------
http://xmlguru.cz Blog
mostly about XML for English readers
------------------------------------------------------------
------
------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-help lists.oasis-open.org
|