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

WD-xsl: Variables, XSL(T) conversion, etc

Subject: WD-xsl: Variables, XSL(T) conversion, etc
From: Nileblitz <nileblitz@xxxxxxxxx>
Date: Wed, 29 Dec 2004 06:44:47 -0800 (PST)
xsl variables
I have read many posts on this list related to similar
I have taken over support activities for an
application. One page of 
this application is XML-XSL based.
I was asked to provide certain default values for a
few dropdown lists 
generated by the xsl. I realized based on past
experience that this is 
not going to be an easy task because the system was
coded in WD-xsl. I 
cannot use variables and parameters.
I tried converting to XSLT using the converter
provided by MS, but it 
leaves much to be desired. Considering the huge size
of the XSL and the 
lack of impact analysis, I dont wish to proceed with
the conversion 
without proper approval. Meanwhile I am trying to find
a solution if I 
can. I am posting the relevant XML and XSL and I will
try to explain the 
problem in detail.
<ReportDefinition ID=1>
   <Edit Caption="Global/Market"
Type="Combo" Source="GlobalorMarket"
ListId="GlobalorMarket" DefValue="Global"/>
<ReportDefinition ID=2>
   <Edit Caption="Global/Market"
Type="Combo" Source="GlobalorMarket"
ListId="GlobalorMarket" DefValue="Market"/>
      <Type IDVALUE="Global">Global</Type>
      <Type IDVALUE="Market">Market</Type>

<xsl:if test="../@ListId[. = 'GlobalorMarket']">
 <xsl:for-each select="//GlobalorMarket/Type">
   <xsl:attribute name="VALUE"><xsl:value-of 
   <xsl:if test="@IDVALUE[.='Global']"><xsl:attribute 
   <xsl:value-of select="." />
Problem: As you can see from the XSL, currently the
default value for 
all the "GlobalorMarket" select boxes is set to
"Global". But for 
different report definitions the default value should
be different (DefValue 
attribute in XML section). The problem is, how to
access this DefValue 
attribute inside the for-each loop because the context
is different and 
we cannot use variables.
Let me know if you have any thoughts on this.

Do you Yahoo!? 
Dress up your holiday email, Hollywood style. Learn more. 

Current Thread


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