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

Re: problem defining param value

Subject: Re: problem defining param value
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 08 Jan 2013 15:53:38 -0500
Re:  problem defining param value
At 2013-01-08 15:32 -0500, Jonina Dames wrote:
used the following syntax in the NEW_STYLESHEET.xsl:

<xsl:variable name="fork1">
<xsl:value-of select="string that returns either 'FORK' or 'SPOON'"/>
</xsl:variable>

<xsl:param name="OUTSIDE_PARAM">
<xsl:if test="$fork1 = 'FORK'">
<xsl:value-of select="string that returns 'VALUE1'"/>
</xsl:if>
<xsl:if test="$fork1 = 'SPOON'">
<xsl:value-of select="string that returns 'VALUE2'"/>
</xsl:if>
</xsl:param>

Unfortunately, the stylesheet is no longer recognizing that a param has been defined at all, and is always defaulting to VALUE3, as determined by the "otherwise" section. It seems to think that $OUTSIDE_PARAM is always empty, even though it's not. Am I missing something completely obvious?

Have you confirmed that $fork1 is being set correctly?


Sounds like an opportunity to throw some diagnostics to the error port:

  <xsl:message>Fork: <xsl:value-of select="$fork1"/></xsl:message>
  <xsl:message>Param: <xsl:value-of select="$OUTSIDE_PARAM"/></xsl:message>

If in your environment you don't have an error port, then you might be able to put diagnostic information into the output using a comment:

  <xsl:comment>Fork: <xsl:value-of select="$fork1"/>
  Param: <xsl:value-of select="$OUTSIDE_PARAM"/></xsl:comment>

(but be careful if this is in the middle of adding attributes to an element as it will choke off the ability to add attributes after adding the comment)

I hope this helps.

. . . . . . . Ken


-- Contact us for world-wide XML consulting and instructor-led training Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: https://plus.google.com/116832879756988317389/about Legal business disclaimers: http://www.CraneSoftwrights.com/legal

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.