Subject: [xsl] check if a* not equal to attribute value From: "Bryan Rasmussen" <bry@xxxxxxxxxx> Date: Thu, 31 Jan 2002 10:37:43 +0100 |
I posted on this before, it got bounced cause I used Help in the subject, supposedly administrator is forwarding the post but I decided I could better describe what my problem is in this one: 1. I have a node with a bunch of attributes, a* if any of these attributes names are not the same as the value of the attribute name in some xpath then I want to copy them over to my result tree. currently what I have, which is working, is the following: <xsl:template match="fo:*[@it:class]" priority="2"> <xsl:variable name="itclass"><xsl:value-of select="@it:class"/></xsl:variable> <xsl:element name="{name()}"> <xsl:for-each select="@*"><xsl:copy/></xsl:for-each> <xsl:for-each select="$cssdocSelect//selector[@it:class=$itclass]/s"> <xsl:attribute name="{@name}"><xsl:value-of select="."/> </xsl:attribute> </xsl:for-each> <xsl:apply-templates/> </xsl:element> </xsl:template> I think this will break on some processors, right, or give me at least the opposite of what I want, dependant on processing order. interesting question: does anyone know of a processor in which this would give the opposite of what I want? anyway the question is how to find out if any @* name is not equal to $cssdocSelect//selector[@it:class=$itclass]/s[@name] I'm thinking maybe it can't be done, and instead I should compare values, but then I lose generic value I think. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] building a tabular format, Joerg Heinicke | Thread | RE: [xsl] check if a* not equal to , Michael Kay |
RE: [xsl] asp and xsl, Michael Kay | Date | RE: [xsl] Javascript inside XSL(Jus, Michael Kay |
Month |