Subject: RE: Exclude Attributes from select? From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Mon, 16 Oct 2000 16:12:07 +0800 |
> If i use <xsl:copy-of select="@*">, is there a possibility, > to exclude some attributes?
<xsl:copy-of select="@*[not(self::meta or self::title)]"/>
Mike Kay
> > Is there nothing like select="!META&!TITLE" > (or select="!(META|TITLE)")?
T:\ftemp>type test.xsl <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dummy="dummy" exclude-result-prefixes="dummy" version="1.0">
<dummy:data> <hello att1="att1-val" att2="att2-val" att3="att3-val"/> </dummy:data>
<xsl:template match="/"> <!--root rule--> <xsl:for-each select="document('')//hello"> <xsl:text>Using self::</xsl:text> <xsl:for-each select="@*[not(self::att2)]" xml:space="preserve"> <xsl:value-of select="name(.)"/>-<xsl:value-of select="."/> </xsl:for-each> <xsl:text>
Using self::</xsl:text> <xsl:for-each select="@*[name(.)!='att2']" xml:space="preserve"> <xsl:value-of select="name(.)"/>-<xsl:value-of select="."/> </xsl:for-each> </xsl:for-each> </xsl:template>
T:\ftemp>xt test.xsl test.xsl Using self:: att1-att1-val
Using self:: att1-att1-val
-- G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995) Web site: XSL/XML/DSSSL/SGML services, training, libraries, products. Book: Practical Transformation Using XSLT and XPath ISBN1-894049-05-5 Article: What is XSLT? http://www.xml.com/pub/2000/08/holman Next public instructor-led training: 2000-10-03/05,2000-10-09/10, - 2000-10-19,2000-11-06/07,2000-11-12,2000-12-03/04,2001-01-27
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Exclude Attributes from select?, G. Ken Holman | Thread | RE: Exclude Attributes from select?, Kay Michael |
RE: Exclude Attributes from select?, G. Ken Holman | Date | Announcement (repeat): Ottawa-area , G. Ken Holman |
Month |