[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Marking paras in colored text
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ok, glad it's working. Btw., you shouldn't need the template that explicitly matches legalnotice[@role='draft']/para if you're also matching text nodes with an ancestor that has role="draft": <xsl:template match="text()[ contains(concat(';',ancestor::*/@role,';'),';draft;') ] | xref[ contains(concat(';',ancestor::*/@role,';'),';draft;') ]" priority="10"> ... That will apply the span or fo:inline if _any_ ancestor is flagged with role="draft", not just the immediate parent. David On 10/10/2011 04:55 AM, mike 675 wrote: > > Thanks for your files, David. They worked fine with my XML source and gave > colored text. > > The problem lies in our build system. We use some scripts to pre-process the > XML before sending to xsltproc. They are doing something to legalnotice > elementswhich means that legalnotice/para attributes are not matched. > However, attributes on legalnotice are matched. > > Until I get to the bottom of this, I can use the following workaround. > Multiple legalnocices are allowed in bookinfo, so I can work at block level > on the legalnotice that I want to mark in colored text: > > XML: > <legalnotice role="draft"> > <para/> > </legalnotice> > > XSL: > <xsl:template match="legalnotice[@role='draft']/para"> > <fo:block color="red"> > <xsl:apply-templates/> > </fo:block> > </xsl:template> > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJOkw3HAAoJEMHeSXG7afUhwsIH/RegIPvgYQUzqUhv+Vx9efaS /fCxJ+YT0BflZXsiMuomMkd6x/mUACAuBlyeiSN0BU8n3yR/Ii737qptMGguLCkx /T6BeUbAJXzPsYCitgNtrESABDwG1EW3ECk2pqV8h41Rmu52Q9yXMsRUSna9KmC7 ObBrxPsvidEqquAEKrQ5J118oiHqK/SvtvyV6yMzWp2Memr31XhaFFycA59aAirC 1i5WHmmTqhgyBhnp7r3iW49dsFE9zCm2Jr+WnjWnOtSlVLzQRWfP3UdeSUSgrN1Q rcazA7k+WgPvgQSWsIThgk56/t2SHJION0lbo85XyECQJhGWf72UdF54uY0ZHzs= =bJZK -----END PGP SIGNATURE-----
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]