comp.text.xml
[Top] [All Lists]

simplifying transform

Subject: simplifying transform
From: David Schwartz
Date: Thu, 17 Jul 2008 13:15:20 -0700 PDT
Newsgroups: comp.text.xml

So, I've got some elements that refer to other elements based on one
id. Each of the referent elements actually have a second id (don't
ask) which I'd like to use instead (so I can drop the extra id). So,
based on the following data, I'd like to keep everything the same
except for having all tagC's referring to tagB's based on id1 instead
of id2. Again, everything else would be the same. I can figure out how
to make the switch in tagC's just fine but do I have to write a
template for every type of tag as well? Sure hope not!

<root>
        <tagA>foo</tagA>
        <tagB id1="XXX" id2=YYY">boo</tagB>
        <tagC ref="YYY">pie</tagC>
        <tagD>bar</tagD>
</root>

TIA,
David

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy