We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
i find a bug when the input has no extension (the ix gives -1) :
private String getFileName(File sourceFile, HashMap<QName,ParameterValue> parameters) { String filename = (prefix!=null?prefix:"") + name + (suffix!=null?suffix:""); String sourceName = sourceFile.getName(); int ix = sourceName.lastIndexOf("."); // FIXME: this shouldn't be supported, it has been replaced by input-* pseudo-variables String extension = sourceName.substring(ix); String basename = sourceName.substring(0, ix); String ret = filename.replaceAll("\$\{name\}", sourceName).replaceAll("\$\{basename\}", basename).replaceAll("\$\{extension\}", extension); for(ParameterValue pv:parameters.values()) { if(pv.getValue() instanceof String || pv.getValue() instanceof XdmAtomicValue) { ret = ret.replaceAll("\$\["+pv.getKey()+"\]", pv.getValue().toString()); } } return ret; }
The text was updated successfully, but these errors were encountered:
What a bad idea not to have an extension ! ;-)
But you are right, this is a bug. Which release do you use ?
Christophe
Sorry, something went wrong.
Yes it is :) In my case i have created a temp file with expath extension and by default, this has no extension.
1.03.04 for the release version
No branches or pull requests
Hi,
i find a bug when the input has no extension (the ix gives -1) :
private String getFileName(File sourceFile, HashMap<QName,ParameterValue> parameters) {
String filename = (prefix!=null?prefix:"") + name + (suffix!=null?suffix:"");
String sourceName = sourceFile.getName();
int ix = sourceName.lastIndexOf(".");
// FIXME: this shouldn't be supported, it has been replaced by input-* pseudo-variables
String extension = sourceName.substring(ix);
String basename = sourceName.substring(0, ix);
String ret = filename.replaceAll("\$\{name\}", sourceName).replaceAll("\$\{basename\}", basename).replaceAll("\$\{extension\}", extension);
for(ParameterValue pv:parameters.values()) {
if(pv.getValue() instanceof String || pv.getValue() instanceof XdmAtomicValue) {
ret = ret.replaceAll("\$\["+pv.getKey()+"\]", pv.getValue().toString());
}
}
return ret;
}
The text was updated successfully, but these errors were encountered: