Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
code verbeterd zodat vervanging van de prefix ook plaatsvindt als xsd…
Browse files Browse the repository at this point in the history
…-schema de default namespace is
  • Loading branch information
cvanlith committed Nov 9, 2016
1 parent fbd647c commit 33e15e0
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,12 @@ public String getResponseBody(List<SpLayerSummary> layers, OGCRequest ogcrequest

private void rebuildNodeWithNameReplace(Node currentNode, String spAbbr) throws Exception {
String prefix = getNameSpacePrefix("http://www.w3.org/2001/XMLSchema", true);
String elementLabel = "";
String parentPath = "/";
if (prefix != null && prefix.length() > 0) {
parentPath += prefix;
elementLabel += prefix;
parentPath += ":";
elementLabel += ":";
}
parentPath += "schema";
elementLabel += "element";

Node parentNode = null;
NodeList parentNodes = getNodeListFromXPath(currentNode, parentPath);
Expand All @@ -91,8 +87,8 @@ private void rebuildNodeWithNameReplace(Node currentNode, String spAbbr) throws
NodeList nodes = parentNode.getChildNodes();
for (int i = 0; i < nodes.getLength(); i++) {
Node n = nodes.item(i);
String nodeName = n.getNodeName();
if (nodeName==null || !nodeName.equals(elementLabel)) {
if (!"element".equals(n.getLocalName())
|| !"http://www.w3.org/2001/XMLSchema".equals(n.getNamespaceURI())) {
continue;
}
NamedNodeMap nnm = n.getAttributes();
Expand Down

0 comments on commit 33e15e0

Please sign in to comment.