[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
and many-to-many element relationships
Subject: <xsl:define-constant> and many-to-many element relationships From: Gabriel Paiz III <gpaiz@xxxxxxxxx> Date: Sat, 5 Dec 1998 16:58:29 -0800 |
I am wondering if the as-of-now IE5b2 MIA <xsl:define-constant> will resurface at some point. I don't know if the syntax from the draft and other current implementations would work with the (assumed) state of the next draft reflected in the IE5b2 implementation, but does something like this seem possible? <TABLE> <xsl:for-each select="//INFOUNIT"> <xsl:define-constant name="IUID"><xsl:value-of select="@ID"/></xsl:define-constant> <xsl:for-each select="//PRODUCT"> <TR> <TD><xsl:value-of select="constant(IUID)"/></TD> <TD><xsl:value-of select="@MODELID"/></TD> <TD><xsl:value-of select="@MODELYR"/></TD> <TD><xsl:value-of select="MODELDESC"/></TD> </TR> </xsl:for-each> </xsl:for-each> </TABLE> As it stands now, I use <xsl:eval>, but I believe there's a special place in Hell for people who create XSL stylesheets like this, and I'd prefer not to go there. Also, there may be another, better way to do this that I just haven't figured out: <TABLE> <xsl:for-each select="//INFOUNIT"> <xsl:eval>/*define-constant*/ var IUID=getAttribute("ID");</xsl:eval> <xsl:for-each select="//PRODUCT"> <TR> <TD><xsl:eval>/*constant*/IUID</xsl:eval></TD> <TD><xsl:value-of select="@MODELID"/></TD> <TD><xsl:value-of select="@MODELYR"/></TD> <TD><xsl:value-of select="MODELDESC"/></TD> </TR> </xsl:for-each> </xsl:for-each> </TABLE> __________________________________ SPX - Valley Forge T.I.S. 25691 Atlantic Ocean Drive Suite B-7 Lake Forest, CA 92630 USA www.vftis.com __________________________________ Tel: (949) 460 0094 Fax: (949) 460 0095 e-Mail: gpaiz@xxxxxxxxx __________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: How to use for-each to get comm, Farrukh S. Najmi | Thread | Re: <xsl:define-constant> and many-, Guy_Murphy |
Re: Input Fields in XML, Aneel Nazareth | Date | Re: The XSL-List Digest V1 #232, keshlam |
Month |
Keywords