Page 1 of 1

xpath_eval problem in transformation output filename

Posted: Sat Dec 05, 2015 2:06 am
by martindholmes
Hi there,

I'm trying to use ${xpath_eval} in a transformation scenario stored as part of a document type. The input file path is:

Code: Select all

/media/Data/WorkData/ise/svnrepo/trunk/tei/input/noTitlePage/Pref/Pref_F1.txt
and the output save I'm using is this:

Code: Select all

${xpath_eval(replace('${cfne}', 'crude', 'tei')}
When I run the transformation, I get this error:

Code: Select all


Description
Cannot delete the file: /media/Data/WorkData/ise/svnrepo/trunk/tei/input/noTitlePage/Pref prior to result generation.
Severity
Error
System ID
/media/Data/WorkData/ise/svnrepo/trunk/tei/input/noTitlePage/Pref/Pref_F1_crude.xml
Scenario
ISE Crude XML to TEI
Document type
ISE_crude.xml
XML file
/media/Data/WorkData/ise/svnrepo/trunk/tei/input/noTitlePage/Pref/Pref_F1_crude.xml
XSL file
/home/mholmes/WorkData/ise/svnrepo/trunk/ise-tei/sgml-to-tei/xsl/crudeXmlToTei.xsl
Engine name
Saxon-HE 9.6.0.7
There seems to be some sort of problem caused by the underscore in the filename, but as far as I know there's nothing special about underscores in XPath regexes. Am I missing something obvious here?

Cheers,
Martin

Re: xpath_eval problem in transformation output filename

Posted: Mon Dec 07, 2015 12:00 pm
by Costin
Hello,

The error should not be in any way related to the ${xpath_eval} function. Also, the underscore in the file name shouldn't have any negative influence over it.

Code: Select all

/media/Data/WorkData/ise/svnrepo/trunk/tei/input/noTitlePage/Pref/Pref_F1.txt
What I noticed from your snippet is that you have a text file called "Pref_F1.txt". Are you using a text file as the input on purpose, or is it a spelling error?
Should it perchance be something like "Pref_F1_crude.xml" instead?

We do not have any preset flag to trigger the cleaning of the output for this kind of scenario, so, as the occurring error seems related to a failed output folder cleanup operation, the issue seems most probably related to the XSL stylesheet you are using in your transformation scenario.

I googled for something related to this and also found a reference to the same error on this page. I considered it might be worth mentioning it as this strengthens my suspicion that the issue is related to your stylesheet, instead of the XPath evaluation.

Regards,
Costin