XSLT editor: how to create dynamic url for source xml file
Posted: Thu Oct 08, 2015 11:43 am
Hello!
I'd like to create one dynamic scenario for my xslt files based on directory, where they are stored. For example, I have xslt file located in
/home/helvdan/Desktop/my_project/folder/stylesheet.xsl
I want automatically generate url for source xml file. It should be something like this:
http://example.com/my_project/folder/stylesheet.xml
I tried the following
nothing happens - I assume it takes the current file
when I try something like this:
it concatenates current file url with expression, result is
/home/helvdan/Desktop/my_project/folder/my_project/folder/stylesheet.xsl
What is the proper way to do such things?
I'd like to create one dynamic scenario for my xslt files based on directory, where they are stored. For example, I have xslt file located in
/home/helvdan/Desktop/my_project/folder/stylesheet.xsl
I want automatically generate url for source xml file. It should be something like this:
http://example.com/my_project/folder/stylesheet.xml
I tried the following
Code: Select all
${xpath_eval( concat('http://example.com/', substring(substring('${currentFileURL}', 23), 1, string-length(substring('${currentFileURL}', 23)) - 4 ), '.xml')}
when I try something like this:
Code: Select all
${xpath_eval(substring("${currentFileURL}",28))}
/home/helvdan/Desktop/my_project/folder/my_project/folder/stylesheet.xsl
What is the proper way to do such things?