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

Re: Strange Parameter Behavior

Subject: Re: Strange Parameter Behavior
From: Greg Faron <gfaron@xxxxxxxxxxxxxxxxxx>
Date: Thu, 09 May 2002 15:58:14 -0600
Re:  Strange Parameter Behavior
At 03:01 PM 5/9/2002, you wrote:
Given the XML:

<a id="1">
 <b id="2">
   <c id="3"/>
   <c id="4"/>
   <c id="5"/>
   <c id="6"/>
 </b>
 <b id="7">
   <c id="8"/>
   <c id="9"/>
   <c id="10"/>
 </b>
 <b id="11">
   <c id="12"/>
   <c id="13"/>
   <c id="14"/>
 </b>
</a>


And XSLT of:


<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

 <xsl:output encoding="ascii" omit-xml-declaration="yes" indent="yes"/>
 <xsl:strip-space elements="*"/>

<xsl:param name="param-id" select="/a/b/c[1]/@id"/>

I get the results below when I change your stylesheet to only select one "c" element (i.e. select="/a[1]/b[1]/c[1]/@id"). Your original selection chooses the first "c" element of ALL "b" elements of ALL "a" elements (even though a well formed document will only have one "a" element, it may have unlimited "b" elements). I don't know what it's doing from there, but I got the expected result when I added the "indices".


   param-id: 3<br />
   prev: <br />
   next: 4<br />



Greg Faron
Integre Technical Publishing Co.



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.