Re: [xsl] Using attributes with XPath

Subject: Re: [xsl] Using attributes with XPath
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 23 Aug 2006 23:35:29 +0100
<xsl:template match="list[parent::description]">
you could write that as match="description/list" it means the same, but
looks nicer (you can just use match="list" unless you have some other
template for other list elements.
that is the same as   <xsl:apply-templates select="node()"/> so only
applies nodesto child attributes, you want to apply nodes to attributes
as well, which would be  <xsl:apply-templates select="@*|node()"/>

<xsl:template match="@type[parent::list]">
again you could write that as list/@type
<fo:inline  font-size="10pt" font-weight="normal"> 
This applies templates to the child nodes of ths node, but attributes
don't have children so it will always produce nothing. Perhaps you meant
<xsl:value-of select="."/>

but this would then make an fo:inline as a child of fo:list-block, which
I don't think is allowed in FO (XSLT won't mind, it'll just do what you


Current Thread