[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Replacing matching values with values from another do
Hi all, Can't seem to wrap my head around a starting point. I apologize for asking, because it feels like a solution should be obvious to this one, but I'm drawing a blank. More or less an identity transform on docA, execpt where I find and element name match in doc B. In that case, element &/or att values from docB overwrite their counterparts in docA. I haven't seem sample xml yet, but I'm told the docs will be both mostly flat and extremely similar, so I'm working on the following "guess sample": [docA.xml] <docA> <a><a/> <b>fred</b> <c att="value1"/> <e> <-- no "override" in docB, so it comes forward into the result </docA> [docB.xml] <docB> <a/> <-- no need to change docA <b>ethel</b> <-- "fred" in docA would have to be changed to "ethel" <c att="value2"/> <-- "value1" in docA has to become "value2" <d att="foo"> doesn't match </d> <-- dropped on floor, no element name match </docB> I checked Dave Pawson's great FAQ, but couldn't seem to adapt any example. XSLT 1 or 2 is just fine; using saxon 8.9. Thanks, Edmund
|
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
|