This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to execute an expression XPATH in String


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]