I am an XSLT 1.0 newbie. In a string element in my XML, I want to change the directory parts of the path of a jar file (C:\abc\my.jar) to a static string and retain the jar file name ($PATH_VAR$\my.jar).
The original XML snippet looks like:
<object class="someclass">
<property name="path">
<string><![CDATA[C:\abc\my.jar]]></string>
</property>
</object>
and I want the transformed XML to be:
<object class="someclass">
<property name="path">
<string><![CDATA[$PATH_VAR$\my.jar]]></string>
</property>
</object>
Note that the original path can be any length (\\xyz\abc or Z:\abc\def\ghi), and the jar file can be named anything.
I'm not sure how to parse the original path string and change only the directories part of it. Please help!
-Jeff