[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: {RFC] XSLT for draft watermarking?



Uttered Karsten Wade <kwade redhat com>, spake thus:

> On Wed, 2005-11-30 at 08:19 -0500, Paul W. Frields wrote:
> 
> > If I remember correctly, there's an order to how XSL stuff is inherited,
> > right?  Like, "whoever's first wins," although it could be the opposite,
> > I'm not sure.  
> I think it's the last instruction wins, but I also am not sure. :)

"Most important" wins.  You can only set a <xsl:param/> or
<xsl:variable/> once, no matter how many appearances are made.
Importance is determined by the "nesting level" of the instance.  For
example, assume an XSL include() arrangement like this:

#1	xsl/main-html.xsl
#2		/usr/shar/sgml/docbook/xsl-stylesheets/html/docbook.xsl
#3			/what/ever/goes/on/in/there.xsl
#3			/its/a/mystery/to/me.xsl
#3			/tommy/can/you/hear/me.xsl
#2		redhat.xsl
#2		html-common.xsl

The left column represents the priority of the definitions in a file.
The right colum shows the XSL include hierarchy.

So definitions in #1, xsl/main-html.xsl take precedence over any
definitions further down the include tree.  This is how we can
override any foolish settings deep within the DocBook distribution
without resorting to rocket surgery on the files...

At a given precedence, first definition wins.

HTH

Attachment: pgphNdmka0LLi.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]