[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: attribute sets
On Thu, Oct 10, 2002 at 06:04:03PM -0400, Daniel Veillard wrote:
> On Wed, Oct 09, 2002 at 04:48:06PM -0500, Dennis Grace wrote:
> >
> > Okay, I guess I don't get it. How do I make use of the attribute-sets in a
> > customization layer? I tried this:
> >
> > <xsl:attribute-set name="admonition.title.properties">
> > <xsl:attribute name="font-size">10pt</xsl:attribute>
> > <xsl:attribute name="font-weight">bold</xsl:attribute>
> > <xsl:attribute name="hyphenate">false</xsl:attribute>
> > <xsl:attribute name
> > ="keep-with-next.within-column">always</xsl:attribute>
> > </xsl:attribute-set>
> >
> > And it did nothing. If I make the font-size change directly to the
> > param.xsl file, that works. All my param settings work, but the
> > attribute-sets don't. Am I missing an important step?
> >
> > DocBook XSL 1.55.0
> > xsltproc (libxml2 2-4-24/libxslt 1.0.20)
>
> hum okay, that's the latests.
Some more data:
I had two older systems that I tested this on, and
the merge of the attribute sets worked for:
libxml2 20404
libxslt 10004
libxml2 20412
libxslt 10009
But it failed to merge when I used:
libxml2 20424
libxslt 10020
Sorry I don't have more versions, but somewhere along the
development path it stopped working.
> I though xsl:attribute-set was okay in xsltproc (there is a good test case
> in the libxslt regression tests tests/general/bug-80.xsl ). I don't
> understand why this would not work, maybe because it extends a set present
> in an imported stylesheet or something like that. What happen if you move
> this block from your customization layer to param.xsl ?
That's not a good test.
Then you will have two attribute-sets with the same name
and same import precedence, and who knows what you will get. 8^)
I can confirm this behavior on these versions with this
docbook-free test (I include it because the docbook mailing lists
supposedly strip out attachements).
############# the main stylesheet
xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:attribute-set name="admonition.title.properties">
<xsl:attribute name="font-size">14pt</xsl:attribute>
<xsl:attribute name="font-family">Garamond</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="elem">
<foo xsl:use-attribute-sets="admonition.title.properties">
<xsl:text>Some literal text for fun</xsl:text>
</foo>
</xsl:template>
</xsl:stylesheet>
############# the importing stylesheet
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:import href="attset.xsl"/>
<xsl:attribute-set name="admonition.title.properties">
<xsl:attribute name="font-size">10pt</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
############# the test file
<?xml version="1.0"?>
<elem/>
##########################
When you process the file with the importing stylesheet,
for the older versions of xsltproc my output is:
<?xml version="1.0"?>
<foo font-size="10pt" font-family="Garamond">Some literal text for fun</foo>
The the latest version I tested, I got:
<?xml version="1.0"?>
<foo font-size="14pt" font-family="Garamond">Some literal text for fun</foo>
--
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
Caldera International, Inc. fax: (831) 429-1887
email: bobs@caldera.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC