[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] change a list of attribute name
Hi, I have a header which consisted of normal names such as "Last Name". For each of these, I would like to replace it with a valid XML attribute name such as LastName. What would be the best way to do it? Use <xsl:when> as follow would be the most straight-forward: <xsl:when test="$header/cell[1] = 'Last Name'"> <xsl:attribute name="LastName"> <!-- etc. --> </xsl:attribute> </xsl:when> Another possibility is to create a node-set of proper XML attribute names in $XMLHeader that matchs up with the header, and do something like following: <xsl:for-each select="$header/cell"> <xsl:attribute name="$XMLHeader/cell[@column=current()/@column]"> <!-- etc. --> </xsl:attribute> </xsl:when> Would this be a feasible plan? My biggest concern is that the support for xsl:node-set is not standardize across the XSLT processors, so the code is not portable across XSLT processors. Any other side effects? Much thanks for any advice on this topic, Xiaocun __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ 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
|