Subject: [xsl] Iterating recursivly on a node changing the element names From: ML mail <mlnospam@xxxxxxxxx> Date: Tue, 20 Nov 2007 22:40:18 -0800 (PST) |
Dear list, I would like to modify the name of my elements of a certain node to make it use a new namespace so for that I somehow need an iteration process which goes through a specific node and adds a prefix to all of my elements. Let's say I have the following: <start attr="myattr"> <two> <three>3</three> <four>4</four> </two> </start> I need to make it look like this after processing: <nsprefix:start attr="myattr"> <nsprefix:two> <nsprefix:three>3</nsprefix:three> <nsprefix:four>4</nsprefix:four> </nsprefix:two> </nsprefix:start> I started creating a template for that and defining all the nodes under the start node but this sounds quite stupid because if there are many different possibilites it makes a whole lot of checks to build. So I was thinking it's much easier to just detect the start element and then iterate through all of it's child elements (in my case: two, three four) and add the prefix to these elements. Unfortunately I didn't manage to do that. Can someone provide me help on how to acheive that ? Many thanks Regards ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] question about a past pro, Andreas Peter | Thread | Re: [xsl] Iterating recursivly on a, Andrew Welch |
Re: [xsl] Template matching precedi, Ilya Konanykhin | Date | Re: [xsl] Iterating recursivly on a, Andrew Welch |
Month |