Merge pull request #411 from ahdis/oe_fhir-28413

[FHIR-28413]: noNamespace instead of default for Logical Models not having a namespace
This commit is contained in:
Grahame Grieve 2021-02-08 06:46:30 +11:00 committed by GitHub
commit da563a6637
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -188,7 +188,7 @@ public class XmlParser extends ParserBase {
String name = element.getLocalName();
String path = "/"+pathPrefix(ns)+name;
StructureDefinition sd = getDefinition(line(element), col(element), (ns == null ? "default" : ns), name);
StructureDefinition sd = getDefinition(line(element), col(element), (ns == null ? "noNamespace" : ns), name);
if (sd == null)
return null;
@ -242,7 +242,7 @@ public class XmlParser extends ParserBase {
String ns = prop.getXmlNamespace();
String elementNs = element.getNamespaceURI();
if (elementNs == null) {
elementNs = "default";
elementNs = "noNamespace";
}
if (!elementNs.equals(ns))
logError(line(element), col(element), path, IssueType.INVALID, context.formatMessage(I18nConstants.WRONG_NAMESPACE__EXPECTED_, ns), IssueSeverity.ERROR);
@ -544,7 +544,7 @@ public class XmlParser extends ParserBase {
xml.setPretty(style == OutputStyle.PRETTY);
xml.start();
String ns = e.getProperty().getXmlNamespace();
if (ns!=null && !"default".equals(ns)) {
if (ns!=null && !"noNamespace".equals(ns)) {
xml.setDefaultNamespace(ns);
}
if (hasTypeAttr(e))

View File

@ -450,7 +450,7 @@ public class XMLWriter extends OutputStreamWriter implements IXMLWriter {
if ("http://www.w3.org/XML/1998/namespace".equals(namespace))
return "xml:";
if (namespace == null || "".equals(namespace) || "default".equals(namespace))
if (namespace == null || "".equals(namespace) || "noNamespace".equals(namespace))
return "";
XMLNamespace ns = findByNamespace(namespace);