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] Combining para role templates


You might try attribute-sets?

they may do what you want?
Combine them as necessary at the xml to fo stage?

HTH


On Fri, 12 Oct 2018 at 15:16, Peter Fleck <peterfleck@gmail.com> wrote:
>
> I have a number of templates that add some formatting to xsl:fo, they
> are in the format of:
>
>   <xsl:template match="d:para[contains(@role,'bg-danger')]" priority="9">
>      <fo:block background-color="red">
>        <xsl:apply-templates/>
>      </fo:block>
>    </xsl:template>
>
>    <xsl:template match="d:para[contains(@role,'xx-small')]" priority="9">
>      <fo:block font-size="xx-small">
>        <xsl:apply-templates/>
>      </fo:block>
>    </xsl:template>
>
> I want to be able to combine these various templates, something like this:
>
> <para role="bg-danger xx-small">..</para>
>
> But only the last "role" in the list gets applied to the output. Is this
> combining of roles feasible or do I need to write a combo template (for
> each combination)?
>
>    <xsl:template match="d:para[contains(@role,'bg-danger_xx-small')]" priority="9">
>      <fo:block background-color="red" font-size="xx-small">
>        <xsl:apply-templates/>
>      </fo:block>
>    </xsl:template>
>
> <para role="bg-danger_xx-small">..</para>
>
> Thanks,
>
> Peter
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>


-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.


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