[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Param with namespace problem!
<xsl:param name="target" select="t:Home"/> That selects the t:Home child of the current node (which is the root node) You need to put the full path from teh root there (or something like //) If however you are planning to pass in a string as the value of this parameter then see any of teh three or four thread yesterday and teh day before that have explained why you can't use string valued parameters like that. XSLT (in common with almost every other programming language, other than macro processors) does not allow arbitrary parts of the language syntax to be replaced by string valued variables. > 1, With this stylesheet, I can't get the page "Home". of course, > It's no problem if I change the select in the template to be: > select="t:Home" > 2, If I change the value of 'target' to be: "'t:Home'", > it failed to transform for "Reference to parameter 'target' must evaluate to > a node list". your default setting of teh target parameter _is_ a node set (possibly empty) so you'd only get this message if you had specified a different value, and changed the type to a string. > 3, If I change the value of 'target' to be: "'Home'", and write the select > as: > select="t:$target" , it came a expression error( expected token 'eof' found > ':') . the syntax t:Home is a single token in the language you can not just arbitrarily split up tokens and replace parts of the token name by a variable reference. David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. 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
|