[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
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. <fo:list-block> <xsl:apply-templates/> 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()"/> </fo:list-block> </xsl:template> <xsl:template match="@type[parent::list]"> again you could write that as list/@type <fo:inline font-size="10pt" font-weight="normal"> <xsl:apply-templates/> 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="."/> </fo:inline> </xsl:template> 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 ask) David
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Using attributes with XPa, Jacqueline Radebaugh | Thread | RE: [xsl] Using attributes with XPa, Mike Ferrando |
Re: [xsl] Merging data based on att, David Carlisle | Date | [xsl] XSLDataGrid article on XML.co, Lindsey Simon |
Month |