OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Fonto color and profiling


-----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;') ]"><span
class="remark"><xsl:apply-imports/></span></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:
> 
> <section>
> <title>This is a section for customers and technicians</title>
> <para>Thi is a paragraph for customers and technicians.</para>
> </section>
> 
> <section condition="tech">
> <title>This is a section ONLY for technicians</title>
> <para>This is a paragraph ONLY for technicians.</para>
> </section>
> 
> <section>
> <title>This is a mixed section</title>
> <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>
> </section>
> 
> 
> 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-----


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]