|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Node-sets using <xsl:with-param>
BINGO! Found it!
At 2004-01-22 14:58 -0500, Mir Farooq Ali wrote: This is the xml source file on which I'm using the stylesheet ... Nothing untoward in there, but using that data and adding a single debug statement pointed me to the problem. Being a second-generation computer programmer (my father started in the trade in 1961, I started programming in 1971), I have long relied on the "printf method of debugging", so I added at the top of the modify template: <xsl:message><xsl:value-of select="name(.)"/></xsl:message> At 2004-01-22 12:10 -0500, Mir Farooq Ali wrote: <xsl:template mode="modify" match="*"> The problem is happening the *second* time around because of the above statement. I saw *two* element names exposed before the problem was triggered. Add <xsl:with-param name="curnode" select="$curnode"/> (or with whatever you need for the argument) to your nested <xsl:apply-templates/> and it will work because you are passing a node for the second invocation. The first time around, $curnode was just fine ... it was the second time around that you weren't passing a value and the defaulted empty string was being used. I hope this helps. ........................ Ken
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








