[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

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
xsl define
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.