[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: <xsl:define-constant> and many-to-many element relations

Subject: Re: <xsl:define-constant> and many-to-many element relationships
From: Guy_Murphy@xxxxxxxxxx
Date: Thu, 10 Dec 1998 11:53:56 +0000
xsl define
Hi.

I didn't think much on your post when originaly placed, but having now run
into the exact same problem
I think yours to be one of the most erudite posts for quite a while :)

The need for <xsl:define-constant>... is pretty huge, especialy in the
production of renderable output for things
like colours etc., as it's the only way to approximate the casscading
aspect of CSS without resort as you suggest
to evaluated constants.

Cheers
     Guy.





xsl-list@xxxxxxxxxxxxxxxx on 12/06/98 12:58:29 AM

To:   xsl-list@xxxxxxxxxxxxxxxx
cc:    (bcc: Guy Murphy/UK/MAID)
Subject:  <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






 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.