switch from getDatasourceId to getNsPrefix #107

Closed
andreas.czerniak wants to merge 8 commits from stable_ids into stable_ids
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 29da540b4e - Show all commits

View File

@ -59,7 +59,7 @@ public class XSLTTransformationFunction implements MapFunction<MetadataRecord, M
final XsltCompiler comp = processor.newXsltCompiler();
QName datasourceIDParam = new QName(DATASOURCE_ID_PARAM);
comp.setParameter(datasourceIDParam, new XdmAtomicValue(value.getProvenance().getDatasourceId()));
comp.setParameter(datasourceIDParam, new XdmAtomicValue(value.getProvenance().getNsPrefix()));
Review

DatasourceID and namespacePrefix are different concepts and are not interchangeable. Switching from one to the other should be done in accordance to the parameter name. With this PR it would still be bound to the param name varDataSourceId, creating confusion.

DatasourceID and namespacePrefix are different concepts and are not interchangeable. Switching from one to the other should be done in accordance to the parameter name. With this PR it would still be bound to the param name varDataSourceId, creating confusion.
QName datasourceNameParam = new QName(DATASOURCE_NAME_PARAM);
comp.setParameter(datasourceNameParam, new XdmAtomicValue(value.getProvenance().getDatasourceName()));
XsltExecutable xslt = comp