Subject: Re: [xsl] How to execute an expression XPATH in String From: David Carlisle <davidc@xxxxxxxxx> Date: Mon, 17 Jun 2002 11:24:54 +0100 |
> I'm a beginner in XSLT and If you are beginning it is best not to try to use evaluate extensions until you are sure you need to go outside the language, and certainly it is best not to use disable-output-escaping="yes" ever. disable-output-escaping is almost always teh wrong thing to do and is guaranteed to make tyour stylesheet non portable. > "xalan:evaluate(concat(substring-before($path,$tagindex),$tagindex,substring-after($path,$tagindex)))"/> Your problem is because you are using strings when you should be using XPath expressions. <xsl:with-param name="path" select="'/html/body/table/tr/td[1]/font/a'" /> that is a string, if instead you went <xsl:with-param name="path" select="/html/body/table/tr/td[1]/font/a" /> then that is an XPath expresion and the path parameter would have teh node set of all the seleted nodes. If you really want teh separate tag and indes parameters than all you need is select="$path/*[name()="$tag][position()=$index]" I couldn't follow the logic of what you are trying to do in <xsl:template name="GetAllValue"> but it looks very strange. If you gave a top level description of what transformation you are trying to do someone could no doubt help. 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] How to execute an expression , CAO Tuan Dung | Thread | Re: [xsl] How to execute an express, David Carlisle |
[xsl] www-tag: Potential new issue, David Carlisle | Date | Re: [xsl] converting to an <ol>, Vasu Chakkera |
Month |