|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] <xsl:define-constant> and many-to-many element relationships
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
|
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
|

Cart








