[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

copying attributes

Subject: copying attributes
From: Mulberry Technologies List Owner<xsl-list-owner@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 30 Jan 2002 11:54:34 -0500
copying attributes xslt
>From: "Bryan Rasmussen" <bry@xxxxxxxxxx>
>To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
>Subject: copying attributes
>Date: Wed, 30 Jan 2002 17:31:45 +0100
>okay when I make xsl:fo I like to use the document() function to write in
>different styles on elements using a css-like xml syntax. Today I decided to
>make something that took a completed xsl, ran an xslt against it, copied the
>xsl out, but used the external css to overwrite the attribute values that I
>needed overwritten.
>am in the early dev stages, have a working copier, but with a problem in the
>following template:
><xsl:template match="fo:*[@it:class]" priority="2">
><xsl:variable name="itclass"><xsl:value-of
><xsl:element name="{name()}">
><xsl:for-each select="@*"><xsl:copy/></xsl:for-each>
><xsl:for-each select="$cssdocSelect/root/selector[@it:class=$itclass]/s">
><xsl:attribute name="{@name}"><xsl:value-of select="."/>
>(I use it:class so I'll have something similar to a class attribute, also
>have the same situation for it:id, and $cssdoc is the parameter that refers
>anyway I have the really lame <xsl:for-each
>select="@*"><xsl:copy/></xsl:for-each> to copy out my attributes and then I
>follow this with the <xsl:for-each
><xsl:attribute name="{@name}"><xsl:value-of select="."/>
>the problem is of course that with the for-each @* I'm copying some of the
>same attributes I'm getting from the next for-each, obviously what I need to
>do is to figure if any attribute does not match any of the attribute::name
>in $cssdocSelect//selector[@it:class=$itclass]/s
>I have to admit with all humility I've always had problems checking if @*
>was NOT equal to another attribute in an external document.
>Does anyone have a good solution for this?

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread
  • copying attributes
    • Mulberry Technologies List Owner - Wed, 30 Jan 2002 11:55:14 -0500 (EST) <=


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.