I've applied your suggestion for fo, adding some changes:
<xsl:template match="text()[
contains(concat(';',ancestor::*/@condition,';'),';tech;') ] | xref[
contains(concat(';',ancestor::*/@condition,';'),';tech;') ]"
priority="10">
<fo:inline xmlns:fo="http://www.w3.org/1999/XSL/Format"
color="#FF0000"><xsl:apply-imports/></fo:inline>
</xsl:template>
and it works perfectly!
Thank you a lot!
Demis
Il 26/08/2011 16.01, David Cramer ha scritto:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> So one approach is to put something like the following in your
> customization layer. This matches text nodes and xref with an ancestor
> containing security="reviewer" (and allows for things like
> security="reviewer;internal"). We have to match xref since it's an empty
> element that's filled in with text later by the xslts. Then we do
> apply-imports so that the nodes will be processed by the templates in
> the base xslts.
>
> For fo:
>
> <xsl:template match="text()[
> contains(concat(';',ancestor::*/@security,';'),';reviewer;') ] | xref[
> contains(concat(';',ancestor::*/@security,';'),';reviewer;') ]"
> priority="10">
> <fo:inline xmlns:fo="http://www.w3.org/1999/XSL/Format"
> background-color="yellow"><xsl:apply-imports/></fo:inline>
> </xsl:template>
>
> For html:
>
> <xsl:template match="text()[
> contains(concat(';',ancestor::*/@security,';'),';reviewer;') ] | xref[
> contains(concat(';',ancestor::*/@security,';'),';reviewer;') ]">
> class="remark"><xsl:apply-imports/></xsl:template>
>
> And then in your css:
>
> .remark {
> background: yellow;
> }
>
> David
>
> On 08/26/2011 08:38 AM, Demis Biscaro wrote:
>> Hello,
>> I'm writing a user manual and I want to insert some additional
>> considerations for our technicians. However I need to hyde these
>> additional considerations in the version for customers. So I've used
>> successfully the profiling method in a single step, as explained by Bob
>> Stayton in his book (I use Saxon processor).
>> Now I would like setting a different colour for these additional
>> considerations.
>>
>> For example:
>>
>>
>>
>> <para>Thi is a paragraph for customers and technicians.</para>
>> >>
>>
>>
>> <para>This is a paragraph ONLY for technicians.</para>
>> >>
>>
>>
>> <para condition="tech">This is a paragraph ONLY for technicians.</para>
>> <para>This is a paragraph for customers and technicians.</para>
>> <para condition="tech">This is another paragraph ONLY for
>> technicians.</para>
>> >>
>>
>> I'd like that text of paragraphs, sections, ecc. marked with
>> condition="tech" are displayed in a colour different from the rest of
>> the document (for instance RED instead than BLACK).
>>
>> I've tried to customize my stylesheet but I've obtained only partial
>> results for tag like para and phrase. I suppose there is a (simple)
>> general solution to this problem but I haven't found it yet.
>>
>> Is there anyone that can help me?
>>
>> Thank you,
>>
>> Demis Biscaro
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
docbook-apps-unsubscribe@lists.oasis-open.org>> For additional commands, e-mail:
docbook-apps-help@lists.oasis-open.org>>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org/>
> iQEcBAEBAgAGBQJOV6cnAAoJEMHeSXG7afUhlykH/jrgbx90mCM0hsoh2LUopK0o
> Np2FE+Su2jmf2D2/44UKA90KZIJa99EmVxJ22dRjN5E2Wrdd16mHgycTMVzltqRY
> u3jM4jdyp4TEB1QvzwbJMlwL75gZYoGJKD2uo6JvPQG5VjrhEv8AiZNzFFtOVFGo
> feWUdScaAaYeGABXWDBCMrvfqN3KBZFMdcWao6XOGGlkGVil5qfMRPikyPfWV6Hl
> 3RzQIjZg4nKIKJD0IkhUdVYzRf7GZdjsTPvb/3NSXAaSJLwNrVEUyZgGxu6PYq44
> KT8ZAhdTgQmDa4cR8RQ+HEWKtJzQaTEGS8GTpuK+t5Ys3E9ZWz+xRIQWZG2nXzc=
> =qT9w
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
docbook-apps-unsubscribe@lists.oasis-open.org> For additional commands, e-mail:
docbook-apps-help@lists.oasis-open.org>
>
--
______________________________________________________
Demis Biscaro
R&D Software
CMZ SISTEMI ELETTRONICI
Via dell'Artigianato, 21 I-31050 VASCON (TV)
Tel. +39.0422.447411 Fax +39.0422.447444
mail to:
demis.biscaro@cmz.ithttp://www.cmz.it______________________________________________________