Skip to content

Commit

Permalink
add explanatory code comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Alpers committed Aug 10, 2023
1 parent 5a9de0d commit aafe94e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugin/src/de/intranda/goobi/plugins/SruOpacImport.java
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,9 @@ protected String getMappedDocStructType(Map<String, String> mappings, Document d
for (String xpath : mappings.keySet()) {

XPathExpression<Element> expr;
if(ns != null && StringUtils.isBlank(ns.getPrefix())) {
if(ns != null && StringUtils.isBlank(ns.getPrefix())) {
//always provide a namespace with prefix. A namespace with no prefix is not allowed by jdom2 xpath
//and no namespace declaration does not match any nodes which have a namespace, even in that namespace does not have a prefix
Namespace ns2 = Namespace.getNamespace("marc", ns.getURI());
expr = XPathFactory.instance().compile(xpath, Filters.element(), null, ns2);
} else {
Expand Down

0 comments on commit aafe94e

Please sign in to comment.