|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] check if a* not equal to attribute value
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








