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

RE: Passing params problem.

Subject: RE: Passing params problem.
From: "Touchtel" <omprakashv@xxxxxxxxxxxxxxxxx>
Date: Sat, 30 Apr 2005 23:17:34 +0530
apply template params
       Hi,
         Adding to Mike's observation, the $templates will not contain a
bbwps:navigationMenu-any
 and so $templates//bbwps:navigationMenu-any may not be the right xpath
expression. This is ofcourse based on the xml that was posted and may not be
valid if there was a typo. But otherwise it did appear that there was a
problem in getting the template for bbwps:navigationMenu-any to receive the
currentPage param.
	BTW, I modified both the source xml and xsl quite a bit to get them to work
and therefore not including them here.

   Cheers,
   Omprakash.V








-----Original Message-----
From: Michael Kay [mailto:mike@xxxxxxxxxxxx]
Sent: Saturday, April 30, 2005 6:58 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Passing params problem.


>This apply template with the $currentpage param to the
>bbwps:navigationMenu-any in the templates.xml (look code above)

The extract you've shown us doesn't have an element called
bbwps:navigationMenu-any. I don't know if that's your error, or if it's just
a slip in trascription; but if the latter, it makes it rather difficult to
give you any help.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: Francesco Barresi [mailto:kywocs@xxxxxxxxx]
> Sent: 29 April 2005 23:37
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  Passing params problem.
>
> Me again, I still can't solve the problem...this time I have the
> problem more identified so I'll make the email much more short,
> because is obvious that nobdy have the time to read all my source
> code.
>
> here is templates.xml:
> [...]
> <bbwps:navigationMenu-open>
>  <html:li>
> 	<bbwps:navigationMenu-pageHere/>
> 	<html:ul class="abierto">
> 		<bbwps:navigationMenu-childrenHere/>
> 	</html:ul>
>  </html:li>
> </bbwps:navigationMenu-open>
> [...]
>
> and here my index.xml
> [..]
> <root open="true" subs="true" subhome="true">
> 	<nome>Ambiti di condivisione</nome>
> 	<id_inter>ambcondiv</id_inter>
> 	<child>
> 		<nome>Servizio Condivisione Anziani</nome>
> 		<id_inter>sanziani</id_inter>
> 	</child>
> </root>
> [..]
>
> Assume that we are parsing the index, and we are at the <child>
> element, then this template gets invoqued:
>
> <xsl:template match="child" mode="navigationMenu">
>  <xsl:param name="templates"/> <!-- this param works just fine -->
>  <xsl:variable name="tmpParam" select="."/> <!-- 'save' the current
> node in a variable -->
>  <xsl:apply-templates select="$templates//bbwps:navigationMenu-any"
> mode="navigationMenu">
> 	<xsl:with-param name="currentpage" select="$tmpParam"/>
>  </xsl:apply-templates>
> </xsl:template>
>
> This apply template with the $currentpage param to the
> bbwps:navigationMenu-any in the templates.xml (look code above)
>
> The html:li is the first tag, and the strange thing is that this
> template doesn't recieve the $currentpage param, how is that possible?
> I'm using msxml 4.
>
> I'm desperate, I don't know what else try :_(
>
> Any tip about that?
>
> Thanks bye.
>
> --
> www.GetFirefox.com !!
> http://kywocs.blogspot.com

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.