[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Modify some text elements copying the structure
Hi people. I have the following need: given a complicated source XML, I have to change in output the text element for same nodes mainteinig the source structure. An example can be this in which I want to change the <elem2> text values. ===================== SOURCE ===================== <?xml version="1.0" encoding="utf-8"?> <root> <level1 name=""> <elem1>element</elem1> <level2a> <elem2>sub element1</elem2> </level2a> <level2b> <elem2>sub element2</elem2> </level2b> </level1> </root> ===================== TARGET ===================== <?xml version="1.0" encoding="utf-8"?> <root> <level1 name=""> <elem1>element</elem1> <level2a> <elem2>modified element1</elem2> </level2a> <level2b> <elem2>modified element2</elem2> </level2b> </level1> </root> Every since the SOURCE structure is complex, the XSLT cannot build "manually" the TARGET structure. Should be useful copy+copy-of the source structure in target structure and the modify the values but, after same test, seems not possible because, when I want to operate on copy+copy-of result-tree, this is not yet available - because in memory too. For me should be acceptable operate in several steps, for example, step1 -> copy the source struct in target struct, step2 -> modify the values. Could you help me? Thanks a lot and ciao. Nicola
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|