xsl-list
[Top] [All Lists]

Re: how to replace a node with a variable

2004-09-27 07:22:44
  I need to change the following xslt so instead of the hard-coded
  'customer' I can use in the pass in variable. Is there an easy way to do
  this?

You don't have a hard coded "customer" in the code that you posted, you
have "customers" and "CUSTOMER" and it isn't clear which of these you
want to change, given the way you phrased yor question.

The FAQ answer to selecting a node   whose name is given by a
parameter *say $foo) is to use

*[name()=$foo]

Note however that your previuous postings have suggested that no
parameter is really necessary in your case as while you don't know the
name of the element in your input document you know that you want to
match all teh children of the document element, and for that you can
just use * as discussed previously.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


<Prev in Thread] Current Thread [Next in Thread>