Hi Guys (Joerg, Conal, Alex & Tony)
Thanks very much for the help, I should be able to get the particular fragments
of xsl refactored now.
Cheers,
Ad.
=
Adam Flegman - Senior Software Engineer
Mobile: (0414) 375 735
Phone: (07) 5547 8530
Facsimile: (07) 5547 8532
Email #1: [EMAIL
Maybe I'm petty, but ...
Conal Tuohy wrote:
if $parent="foo" and $child="bar" then:
/*[local-name()=$parent][*[local-name()=$child]]
should return all nodes matching the XPath "/foo" and having a child
node named "bar".
/*[local-name()=$parent]/*[local-name()=$child]
should return all nodes wh
Cheers
Con
> -Original Message-
> From: Adam Flegman [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 24 July 2003 1:28 p.m.
> To: [EMAIL PROTECTED]
> Subject: Re: dynamic node selection
>
>
> > Have you tried using name() function like:
> >
> > >
Hi Adam,
I don't think select="$parentNode/ will work. You
cannot use variables in place of element names.
Alex
--- Adam Flegman <[EMAIL PROTECTED]> wrote:
> > Have you tried using name() function like:
> >
> > >
>
select="/*[name()=$parentNode]/*[name()=$childNode]"/>
> >
> > However, as fa
> Have you tried using name() function like:
>
> select="/*[name()=$parentNode]/*[name()=$childNode]"/>
>
> However, as far as I know name() function is there for
> "emergency" cases, rather than normal usage.
>
> If you know what the nodes might be, you might want to
> use several stylesheets
Hello Adam,
My apologies for the lack of clarity. I was trying to use the value I have
calcualted for the $targetNode variable to select a node in my XML document.
If I had an xml source like the following, I would like to be able to
'dynamically' select nodes for processing.
...
The xslt templat
Hi Adam,
Have you tried using name() function like:
However, as far as I know name() function is there for
"emergency" cases, rather than normal usage.
If you know what the nodes might be, you might want to
use several stylesheets and pick the right stylesheet
dynamically.
Cheers,
-Alex
---
--- Conal Tuohy <[EMAIL PROTECTED]> wrote:
> Adam there's no "dynamic" xpath expression evaluation in XSLT - you'll
> probably want to find some other way to identify the nodes you want to deal
> with since writing a generic xpath evaluator in XSLT is not going to be easy.
> It would be feasible th
--- Conal Tuohy <[EMAIL PROTECTED]> wrote:
> Adam there's no "dynamic" xpath expression evaluation in XSLT - you'll
> probably want to find some other way to identify the nodes you want to deal
> with since writing a generic xpath evaluator in XSLT is not going to be easy.
> It would be feasible th
Original Message-
> From: Adam Flegman [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 24 July 2003 12:18 p.m.
> To: [EMAIL PROTECTED]
> Subject: Re: dynamic node selection
>
>
> > Well, if you have your xpath in $targetnode, wouldn't it simply be:
> >
>
> Well, if you have your xpath in $targetnode, wouldn't it simply be:
>
> ?
>
> or
>
>
>
>
>
> To go along with your code. I haven't done XSLT in a while, so I'm a
> little rusty.
>
Hi Tony,
The value of $targetNode is some arbitrary string value that (hopefully) looks
like an x
Adam Flegman wrote:
For example if parameters parentNode = "foo" and childNode = "bar", then
$targetNode would evaluate to the string "foo/bar". I would want the 'for-each'
statement to select all the "bar" nodes under the "foo" parent node.
I think the only step I am missing is how to write a xpa
Hi Tony,
> >
> >
> >
> >
> >>name="targetNode"
> >select="concat(name($listNode),'/',$listItem)" />
> >
> >
> >
> > ... do the processing
> >
> >
> >
> >Any advice, greatly appreciated.
> >
> >
>
>
>
> Adam,
>
> I'm not too sure what you're
Adam Flegman wrote:
Hi Guys,
I have been trying to re-factor some existing xslt code and wonder if it is
possible to select nodes based on a string.
The string is built up by parameters so the value of the target node is
determined each time the xsl template is called. I am having trouble using t
14 matches
Mail list logo