R
Ravi
My XML looks like:
<abc>
<def type="apple"> 1 </def>
<def type="peach"> 2 </def>
<def type="orange"> 3 </def>
<def type="banana"> 4 </def>
<def type="plum"> 5 </def>
</abc>
I can write the transform to have this display as
apple 1
peach 2
orange 3
banana 4
plum 5
However I want to create more flexibility in displaying the names. So
say I have an external text file something like:
apple Xapple
peach Xpeach
orange Xorange
banana Xbanana
plum Xplum
the first column is the internal names i.e. actual names as found in the
XML and the second column is user-defined (external names and hence
variant). So I want the XML to be displayed as
Xapple 1
Xpeach 2
Xorange 3
Xbanana 4
Xplum 5
i.e. I want to get the external name corresponding to the internal name
from the file and use that external name to display the value of the
element. This way a user can control the names used in the display by
merely editing the external text file and not having to work with
XML/XSLT. Any suggestions/pointers will be highly appreciated.
TIA.
<abc>
<def type="apple"> 1 </def>
<def type="peach"> 2 </def>
<def type="orange"> 3 </def>
<def type="banana"> 4 </def>
<def type="plum"> 5 </def>
</abc>
I can write the transform to have this display as
apple 1
peach 2
orange 3
banana 4
plum 5
However I want to create more flexibility in displaying the names. So
say I have an external text file something like:
apple Xapple
peach Xpeach
orange Xorange
banana Xbanana
plum Xplum
the first column is the internal names i.e. actual names as found in the
XML and the second column is user-defined (external names and hence
variant). So I want the XML to be displayed as
Xapple 1
Xpeach 2
Xorange 3
Xbanana 4
Xplum 5
i.e. I want to get the external name corresponding to the internal name
from the file and use that external name to display the value of the
element. This way a user can control the names used in the display by
merely editing the external text file and not having to work with
XML/XSLT. Any suggestions/pointers will be highly appreciated.
TIA.