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] Marking paras in colored text


No success using the "titlepage.mode" mode.

--- On Fri, 7/10/11, David Cramer <david@thingbag.net> wrote:

> From: David Cramer <david@thingbag.net>
> Subject: Re: [docbook-apps] Marking paras in colored text
> To: docbook-apps@lists.oasis-open.org
> Date: Friday, 7 October, 2011, 13:14
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Try making a a second copy of those templates with
> mode="titlepage.mode" (i.e. add that attribute to the
> xsl:template
> element). I haven't tested that, but it should catch most
> of  your
> titlepage content. You may also have to add templates in
> other modes
> (e.g. mode="book.titlepage.recto.mode"), but I'll have to
> do some
> experiments to confirm my understanding of what's going on
> in the
> titlepage system.
> 
> Let me know what happens with that. I'll play around with
> it later when
> I have some time too.
> 
> David
> 
> On 10/07/2011 06:29 AM, mike 675 wrote:
> > 
> > I tried your text() match code.
> > It works fine for the most part.
> > But I was unable to get it to work on elements in the
> titlepage section of a
> > book or article.
> > For example, I want to display some 
> legalnotice/para elements in red if
> > they have a role="draft" attribute.
> > 
> > Mike
> > 
> > David Cramer wrote:
> >>
> > This [1] message provides an alternative approach that
> will change the
> > color of text based on an attributes on any element.
> An advantage to
> > this approach is that it only requires the addition of
> a few templates
> > rather than the modifications of many existing
> templates (which is much
> > harder to maintain when you adopt a new release of the
> base xsls).
> > 
> > David
> > 
> > [1] http://lists.oasis-open.org/archives/docbook-apps/201108/msg00100.html
> > 
> > On 10/06/2011 10:34 AM, Bob Stayton wrote:
> >>>> Good try, but not quite.  8^)
> >>>> You will  lose some features if you
> do it that way.  To customize, a
> >>>> better practice is to find the base
> template for that element that
> >>>> already exists in the DocBook stylesheets,
> copy it to your customization
> >>>> layer, and modify the match attribute and
> anything you want in the body
> >>>> of the template.  You'll see that the
> base template for match="para"
> >>>> uses fo:block instead of fo:inline. 
> You can add your color to the
> >>>> fo:block.
> >>>>
> >>>> Bob Stayton
> >>>> Sagehill Enterprises
> >>>> bobs@sagehill.net
> >>>>
> >>>>
> >>>> ----- Original Message ----- From: "mike
> 675" <m_mclaug@yahoo.co.uk>
> >>>> To: <docbook-apps@lists.oasis-open.org>
> >>>> Sent: Thursday, October 06, 2011 8:16 AM
> >>>> Subject: [docbook-apps] Marking paras in
> colored text
> >>>>
> >>>>
> >>>>>
> >>>>> I want to find all paras marked as
> role="high" and render them as red
> >>>>> text in
> >>>>> FO output.
> >>>>>
> >>>>> http://www.sagehill.net/docbookxsl/CustomInlines.html
> shows how to do
> >>>>> this
> >>>>> sort of thing when matching on inline
> text. Is it possible at block
> >>>>> level?
> >>>>>
> >>>>> Here is my first attempt:
> >>>>>
> >>>>> <xsl:template
> match="para[@role='high']"
> >>>>> <fo:inline color="red">
> >>>>>   <xsl:apply-templates
> />
> >>>>>  </fo:inline>
> >>>>> </xsl:template>
> >>>>> -- 
> >>>>> View this message in context:
> >>>>> http://old.nabble.com/Marking-paras-in-colored-text-tp32600589p32600589.html
> >>>>>
> >>>>> Sent from the docbook apps mailing
> list archive at Nabble.com.
> >>>>>
> >>>>>
> >>>>>
> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> >>>>> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>>
> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> >>>> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
> >>>>
> > 
> >>
> -
> ---------------------------------------------------------------------
> 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/
> 
> iQEcBAEBAgAGBQJOju0GAAoJEMHeSXG7afUh1TsH/RLgipISGRo9n3qIQksSYghP
> gdpbIkOHq+ZG1S9GxGdmFEhoz+uWZwYrkYLG/KfQJfc/96gzNhj42g4fgsED1yXZ
> mOV0evjb6TypkpwYKVTWYUQjT5gwboFxt56AIP27xPycvay1lMxXFC1t4rlgBo5J
> 5SYs37pQuD42Im/KZDfxblDAs/qzMlSnzSPdURCKMZzZRFqpe/AjFTf1wz337ldQ
> EkmWMa4RxiuxMkmtO5JvpsvTCSkZGOFfKdsNNzFegDJJXmC4JE3ZGxC4MlBmLW3a
> vxWYljFvr1o+m6XdMEJqlYWoOmTIYKX6RPEmdbi4ioaj3IsgHbWa41HyrS9pW94=
> =M09W
> -----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
> 
>


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