Subject: Re: [xsl] Multiple tranformations of a given element using XSL From: Ram UGroups <ram_ugroups@xxxxxxxxx> Date: Tue, 10 Dec 2002 15:09:40 -0800 (PST) |
Hi Mike, I might not have described the problem in the proper way and I do not have an example handy. But in short, I have around 50 elements that need to be renamed and then I have a few nodes whose child elements need to be renamed but only by adding a definite prefix. A third requirement asks for string manipulation of the content of few other elements. The three sets of elements overlap with each other. The second requirement can be done with just one template using XPATH (I hope). And the first and third requirements might need a template for a specific element. If the work needs to be assigned to different resources for integration towards the end, depending on which template runs last, the other two effects are nullified in the output tree. Basically I guess I am taking an object oriented approach rather than a procedural approach. Is that a right way to go with XSLs is what I wonder. Thanks for the response. --- Mike Brown <mike@xxxxxxxx> wrote: > Ram UGroups wrote: > > Can anybody please let me know if there is a way > to > > write different templates for different > requirements > > so that a template can work on already modified > DOM. > > > > To make it more clear, after I change an element > name > > during the first pass, if I would like to change > the > > content of the element during the second pass, the > > second template is working on the source tree > (which > > is never modified) and hence the first change is > being > > compromised on the output tree. If there is a way > I > > can make the second template work on the DOM > modified > > by the first template, then I can probably use the > new > > element name in the 'match' variable of the second > > template. > > Why do you need two passes? > > The way you described your problem, it sounds like > an ordinary XSLT task. When > you create the new element, create its content at > the same time. > > Please post an example of the original XML (the > source tree), and an example > of what output you want. > > Mike > > -- > Mike J. Brown | http://skew.org/~mike/resume/ > Denver, CO, USA | http://skew.org/xml/ > > XSL-List info and archive: > http://www.mulberrytech.com/xsl/xsl-list > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Multiple tranformations o, Mike Brown | Thread | Re: [xsl] Multiple tranformations o, Mike Brown |
Re: [xsl] Copying nodes, Joerg Heinicke | Date | RE: [xsl] Copying nodes, Michael Kay |
Month |