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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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


Subject: Re: [docbook] Attribute Set for


Hi,
Yes, there is a reason: you cannot apply an attribute-set with xsl:if. Many things in XSL would be simpler if you could. If you need a conditional attribute set, you must either conditionalize the value of every attribute in the attribute-set (and you still get all the attributes), or you must create an awkward xsl:choose that generates the output element either with or without the attribute-set applied, and repeat the rest of the content in both. The template with match="section" in fo/sections.xsl has such a construction for applying the different section level properties.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net

--------------------------------------------------
From: "Stefan Knorr" <sknorr@suse.de>
Sent: Thursday, April 18, 2013 6:47 AM
To: "DocBook List" <docbook@lists.oasis-open.org>
Subject: [docbook] Attribute Set for

Hi all,

I created some custom fo:simple-page-masters for the DocBook/4, v.1.78.1
and while adding support for draft mode to them, I wondered why the
original authors bothered with putting

 <xsl:if test="$draft.watermark.image != ''">
   <xsl:attribute name="background-image">
     <xsl:call-template name="fo-external-image">
       <xsl:with-param name="filename" select="$draft.watermark.image"/>
     </xsl:call-template>
   </xsl:attribute>
   <xsl:attribute name="background-attachment">fixed</xsl:attribute>
   <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
<xsl:attribute name="background-position-horizontal">center</xsl:attribute> <xsl:attribute name="background-position-vertical">center</xsl:attribute>
 </xsl:if>

everywhere, instead of just adding an attribute set to param.xsl. Any
reasons?

Stefan
--
SUSE LINUX GmbH, Maxfeldstraße 5, D-90409 Nürnberg
Geschäftsführer: Jeff Hawn, Jennifer Guild, Felix Imendörffer
HRB 21284 (AG Nürnberg)


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-help@lists.oasis-open.org





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