diff options
author | David A. Madore <david+git@madore.org> | 2011-08-31 23:27:26 +0200 |
---|---|---|
committer | David A. Madore <david+git@madore.org> | 2011-08-31 23:27:26 +0200 |
commit | ced5a5f3fad721da1dab1ab90fa8599078eb4c1e (patch) | |
tree | 1cf886bee9691ba5dac6072c0d37cdad6d51a3c9 | |
parent | b5ab214e0280732a8fbe1e83c8603b3e581ce3b8 (diff) | |
download | damlengine-ced5a5f3fad721da1dab1ab90fa8599078eb4c1e.tar.gz damlengine-ced5a5f3fad721da1dab1ab90fa8599078eb4c1e.tar.bz2 damlengine-ced5a5f3fad721da1dab1ab90fa8599078eb4c1e.zip |
Add a lang attribute besides xml:lang for HTML4 compatibility.
-rw-r--r-- | org/madore/damlengine/Unparser.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/org/madore/damlengine/Unparser.java b/org/madore/damlengine/Unparser.java index 0eeec00..87945c6 100644 --- a/org/madore/damlengine/Unparser.java +++ b/org/madore/damlengine/Unparser.java @@ -76,8 +76,11 @@ public final class Unparser { Node n2; for ( int i=0 ; (n2=attrs.item(i)) != null ; i++ ) { Attr attr = (Attr)n2; - out.write(" "+attr.getName()+"=\""+quote(attr.getValue())+"\""); - + String aname = attr.getName(); + out.write(" "+aname+"=\""+quote(attr.getValue())+"\""); + if ( aname.equals("xml:lang") + && elt.getNamespaceURI().equals(DamlEngine.XHTML_NS) ) + out.write(" lang=\""+quote(attr.getValue())+"\""); } } if ( ! elt.hasChildNodes() && ( qname.equals("br") || qname.equals("hr") |