summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Herman <ivan@ivan-herman.net>2018-10-02 13:40:31 +0200
committerIvan Herman <ivan@ivan-herman.net>2018-10-02 13:40:31 +0200
commit47783cfe1eac42f2f2100dd3df39bb5eab3e0671 (patch)
treee55bb0ddc1fb8b62278f0457fa073508282ba7a8
parent5fa18be1231a5e4dfc86ec28f2f754158c6f6f0b (diff)
downloadrdflib-rdfa-html-datatype-lang-error.tar.gz
Removed the lang attribute generation into an HTML/XMLLiteral datatyperdfa-html-datatype-lang-error
This is as a reaction on https://github.com/RDFLib/pyrdfa3/issues/25
-rw-r--r--rdflib/plugins/parsers/pyRdfa/utils.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/rdflib/plugins/parsers/pyRdfa/utils.py b/rdflib/plugins/parsers/pyRdfa/utils.py
index d8634c8b..ed3669a9 100644
--- a/rdflib/plugins/parsers/pyRdfa/utils.py
+++ b/rdflib/plugins/parsers/pyRdfa/utils.py
@@ -205,7 +205,7 @@ def return_XML(state, inode, base = True, xmlns = True) :
@return: string
"""
node = inode.cloneNode(True)
- # Decorate the element with namespaces.lang values and, optionally, base
+ # Decorate the element with namespaces values and, optionally, base
if base :
node.setAttribute("xml:base",state.base)
if xmlns :
@@ -215,14 +215,6 @@ def return_XML(state, inode, base = True, xmlns = True) :
# Set the default namespace, if not done (and is available)
if not node.getAttribute("xmlns") and state.defaultNS != None :
node.setAttribute("xmlns", state.defaultNS)
- # Get the lang, if necessary
- if state.lang :
- if state.options.host_language in [ HostLanguage.xhtml, HostLanguage.xhtml5, HostLanguage.html5 ] :
- if not node.getAttribute("lang") :
- node.setAttribute("lang", state.lang)
- else :
- if not node.getAttribute("xml:lang") :
- node.setAttribute("xml:lang", state.lang)
if sys.version_info[0] >= 3 :
return node.toxml()