Skip to content

Commit

Permalink
Merge pull request #68 from edmcouncil/67-xml-prefix-is-​​not-omitted…
Browse files Browse the repository at this point in the history
…-when-generating-a-dtd-subset-in-a-file-formatted-as-sorted-rdfxml

Skip adding '<!ENTITY xml "http://www.w3.org/XML/1998/namespace">' entry in sorted RDF/XML format
  • Loading branch information
mereolog authored Mar 22, 2024
2 parents 35bfb5d + f0ca319 commit 4d61582
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ protected void writeHeader(Writer out, SortedTurtleObjectList importList, String
output.startDTD("rdf:RDF");
if (namespaceTable.size() > 0) {
for (String prefix : prefixes) {
if (USE_GENERATED_PREFIXES || !generatedNamespaceTable.containsKey(prefix)) {
if ((USE_GENERATED_PREFIXES || !generatedNamespaceTable.containsKey(prefix)) && !"xml".equals(prefix)) {
if (prefix.length() >= 1) {
output.writeDtdEntity(prefix, namespaceTable.get(prefix));
}
Expand Down

0 comments on commit 4d61582

Please sign in to comment.