|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl: parsing through specific child nodes
I need to change only certain child nodes to certain values. Could somebody tell me how to do that. I have 2 xml docs and I need to parse through both and change only certain nodes. I'll explain with an eg: XML 1: <ZZ> <ABC>XXXXX<ABC> <DEF>YYYYYY<DEF> <ZZ> XML 2: : <ZZ> <ABC>AAAAA<ABC> <DEF>FFFFFFF<DEF> <ZZ> So when I am merging I need to check if <DEF> has YYYYY then change it to DDDDD, or if <DEF> has GGGGGG then change it to EEEEEE. Values are known upfront so that means mapping could be hard coded within "if" statement. So after the 2 docs get merged it should look like. <Body> <ZZ> <ABC>XXXXX<ABC> <DEF>DDDDD<DEF> <ZZ> <ZZ> <ABC>AAAAA<ABC> <DEF>FFFFFFF<DEF> <ZZ> </Body> -- one more question, for above scenario should I be using xsl:key for mapping purposes. for eg: If I want to change value from A to B for certain node types?
|
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
|






