[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Providing a value for the 'select' attribute


Subject: Re: [xsl] Providing a value for the 'select' attribute
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 03 Oct 2011 17:49:23 -0400

At 2011-10-03 14:38 -0700, Mark wrote:
Because all the variables I had constructed using the select="some text" idiom seemed to have no value when accessed, I adopted the text node approach. I'll go back and look at my old code now to see if there was another reason for the value-setting failure.

<xsl:param name="abc" select="def"/> assigns the value of the child <def>, which will be empty if there is no child, and does not return an error since you are asking for something correctly.


<xsl:param name="abc" select="'def'"/> assigns the string "def".

A common mistake and I make it myself.

. . . . . . Ken


-- Contact us for world-wide XML consulting and instructor-led training 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
Keywords
xml