Subject: [xsl] Re: Re: dynamic XPath? From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> Date: Wed, 12 Mar 2003 23:09:39 +0100 |
"Passin, Tom" <tpassin@xxxxxxxxxxxx> wrote in message news:5D3C2276FD64424297729EB733ED1F7601D1BD10@xxxxxxxxxxxxxxxxxxxxxx > [Dimitre Novatchev] > > > > It will also "work" for more than one node (in case $tagPath > > evaluates to a > > nodeset of two or more nodes) and most probably is not what > > the author of > > the original message wanted. > > > > I think I may have misunderstood here, and perhaps you misunderstood me > as well... I understood the original question to ask for matching a > __string__ containing a path expression, like "/a/b/c" (that is the kind > of example O thought that Yue Ma showed). For my own post, I put the > path string into a variable, thinking that it would probably eventually > be sent in via a parameter. > > Re-reading your comment, I notice that you might have thought that I > was selecting a node set into the variable, instead of a string, but > that is not the case. No, I also understand that the variable contains a string. The problem of the expression (1): /a/b/c being generated for the node uniquly matched by (2): /a/b[2]/c[3] is that the former matches more than one node. Whoever wants to identify a single node will not use (1) , but an expression equivalent to (2). This is why the chances of "/a/b/c" to be equal to the (string) expression identifying uniquely a node -- these chances are close to zero. I think that the "standard" answer is to use a xx:evaluate() extension function. It is also good to ask why such dynamic evaluation is necessary in the first place. ===== Cheers, Dimitre Novatchev. http://fxsl.sourceforge.net/ -- the home of FXSL XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Re: dynamic XPath?, Passin, Tom | Thread | RE: [xsl] Re: dynamic XPath?, Yue Ma |
Re: [xsl] Re: Comparing two xml doc, Ragulf Pickaxe | Date | RE: [xsl] Re: Re: dynamic XPath?, Passin, Tom |
Month |