Env: TS 6.7.1 SP1 - Win2K3
Has anyone other ever "successfully" done string substitution using XSLT 1.0? I know that it's available in version 2.0, but unfortunately we don't have that option.
In our Perl PTs, they have a Perl block that does a substitution on a VF'd text blurb:
my $html = iwpt_dcr_value('dcr.block');
#IMAGE SRC tags
$html =~ s#(\Wimg\s[^>]*src=['"]?)/app?/SMC/GetFile#${1}#gi;
$html =~ s#(\Wimg\s[^>]*src=['"]?)/SMC/GetFile#${1}#gi;
$html =~ s#(\Wimg\s[^>]*src=['"]?/)(?!home)#${1}SMC/GetFile/#gi;
$html =~ s#(\Wimg\s[^>]*src=['"]?)\.\./\.\./\.\./#${1}/SMC/GetFile/#gi;
It essentially prepends "/SMC/GetFile" onto every image src attribute that it finds in that text. It's actually also done for each link (href) and table background as well.
It's pretty straightforward when it's a single node(i.e.):
[html]
[/html]
but these will all exist in a text() node.
I have "Googled" high and low and have been unable to find any 1.0 examples. I suspect there will be some sort of recursion maybe? Any pointers or snippets would be most appreciated. **** I MISS PERL!!!
TIA