|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Accessing Global Parameters from an included Style
Hi Todd, Correct me If I'm wrong. I'm just trying to help u out. ><xsl:param name="id"></xsl:param> ><xsl:param name="query_news"></xsl:param> <xsl:param >name="stateFolder">new_south_wales</xsl:param> ><xsl:param name="statePagesFolder">nsw_pages</xsl:param> ><xsl:param name="stateLibraryFolder">nsw_library</xsl:param> > ><xsl:template match="/"> > <!-- Lots of stuff in here deleted --> > > <xsl:call-template name="LatestNews" /> In the above code, the xsl:param has to be provided inside call-template element. like following. <xsl:call-template name="LatestNews"> <xsl:param name="id"></xsl:param> <xsl:param name="query_news"></xsl:param> <xsl:param name="stateFolder">new_south_wales</xsl:param> <xsl:param name="statePagesFolder">nsw_pages</xsl:param> <xsl:param name="stateLibraryFolder">nsw_library</xsl:param> </xsl:call-template> And the 'LatestNews' template has to be modifed as following. ><< nswTemplates.xsl >> <xsl:template name="LatestNews"> <xsl:param-variable name="stateFolder">Default Value</xsl:param-variable> <xsl:param-variable name="stateLibraryFolder">Default Value</xsl:param-variable> <h1>Latest News</h1> <xsl:for-each select="/content/assets/group[@name='states']/group[@name=$stateFolder]/grou p[@name=$stateLibraryFolder]//asset[@assetdefname='state news']/version"> <xsl:sort select="element_priority_news" order="descending"/> <xsl:sort select="element_date/@datesort" order="descending" /> <xsl:sort select="element_time/@timesort" order="descending" /> <!-- BLAH BLAH BLAH, Do this and that, maybee some more... --> </xsl:for-each> </xsl:template> -- Regards S. Murali Krishnan 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








