Subject: [xsl] change a list of attribute name From: Xiaocun Xu <xiaocunxu@xxxxxxxxx> Date: Thu, 2 Aug 2001 18:21:31 -0700 (PDT) |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] error: At xsl:choose, the, Xiaocun Xu | Thread | Re: [xsl] change a list of attribut, Jeni Tennison |
RE: [xsl] error: At xsl:choose, the, Xiaocun Xu | Date | Re: [xsl] change a list of attribut, Alexander Gutman |
Month |