summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua b/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua
index c764c91fb7e..767ba32c669 100644
--- a/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua
+++ b/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua
@@ -113,6 +113,10 @@ local function serialize_dom(parser, current,level, output)
elseif xtype == "PI" then
-- it contains spurious _text attribute
attributes["_text"] = nil
+ elseif xtype == "DECL" and name =="xml" then
+ -- the xml declaration attributes must be in a correct order
+ insert("<?xml version='%s' encoding='%s' ?>", attributes.version, attributes.encoding)
+ return output
end
start(xtype, name, attributes)