summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/luatex/luaxml/README2
-rw-r--r--Master/texmf-dist/doc/luatex/luaxml/luaxml.pdfbin98710 -> 99665 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luaxml/luaxml.tex18
-rw-r--r--Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua7
-rw-r--r--Master/texmf-dist/tex/luatex/luaxml/luaxml-namedentities.lua3
5 files changed, 26 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/luatex/luaxml/README b/Master/texmf-dist/doc/luatex/luaxml/README
index 897968a391a..ab8a407dd00 100644
--- a/Master/texmf-dist/doc/luatex/luaxml/README
+++ b/Master/texmf-dist/doc/luatex/luaxml/README
@@ -28,7 +28,7 @@ Author
------
Michal Hoftich
Email: michal.h21@gmail.com
-Version: 0.1l, 2019-09-16
+Version: v0.1m, 2020-07-19
Original authors: Paul Chakravarti and Manoel Campos (http://manoelcampos.com)
diff --git a/Master/texmf-dist/doc/luatex/luaxml/luaxml.pdf b/Master/texmf-dist/doc/luatex/luaxml/luaxml.pdf
index 6b53c44891c..86aa928593d 100644
--- a/Master/texmf-dist/doc/luatex/luaxml/luaxml.pdf
+++ b/Master/texmf-dist/doc/luatex/luaxml/luaxml.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luaxml/luaxml.tex b/Master/texmf-dist/doc/luatex/luaxml/luaxml.tex
index 3b451fdb630..d641b91aad9 100644
--- a/Master/texmf-dist/doc/luatex/luaxml/luaxml.tex
+++ b/Master/texmf-dist/doc/luatex/luaxml/luaxml.tex
@@ -7,7 +7,7 @@
\usepackage{framed}
% Version is defined in the makefile, use default values when compiled directly
\ifdefined\version\else
-\def\version{0.1l}
+\def\version{v0.1m}
\let\gitdate\date
\fi
\newcommand\modulename[1]{\subsection{#1}\label{sec:#1}}
@@ -99,6 +99,22 @@ end
\end{luacode*}
\end{framed}
+\subsection{Void elements}
+
+The \verb|DOM_Object.parse| function tries to support the HTML void elements,
+such as \verb|<img>| or \verb|<hr>|. They cannot have closing tags, a parse
+error occurs when the closing tags are used.
+
+It is possible to define a different set of void elements using the second parameter
+for \verb|DOM_Object.parse|:
+
+\begin{verbatim}
+obj = dom.parse(document, {custom_void = true})
+\end{verbatim}
+
+An empty table will disable all void elements. This setting is recommended for common |xml| documents.
+
+
\subsection{Node selection methods}
There are some other methods for element retrieving.
diff --git a/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua b/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua
index 413947b5d4c..6d299d41575 100644
--- a/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua
+++ b/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua
@@ -115,7 +115,12 @@ local function serialize_dom(parser, current,level, output)
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)
+ local encoding = attributes.encoding or "utf-8"
+ insert("<?xml version='%s' encoding='%s' ?>", attributes.version, encoding)
+ return output
+ elseif xtype == "CDATA" then
+ -- return content unescaped
+ insert(string.format("<![CDATA[%s]]>", text_content))
return output
end
diff --git a/Master/texmf-dist/tex/luatex/luaxml/luaxml-namedentities.lua b/Master/texmf-dist/tex/luatex/luaxml/luaxml-namedentities.lua
index dbbed79ce0b..9a26f448f67 100644
--- a/Master/texmf-dist/tex/luatex/luaxml/luaxml-namedentities.lua
+++ b/Master/texmf-dist/tex/luatex/luaxml/luaxml-namedentities.lua
@@ -1,3 +1,4 @@
+local utf8 = require "utf8"
return {
["Subset"]="⋐",
["Chi"]="Χ",
@@ -39,7 +40,7 @@ return {
["nsqsube"]="⋢",
["Nacute"]="Ń",
["mcomma"]="⨩",
-["ApplyFunction"]="⁡",
+["ApplyFunction"]=utf8.char(8289),
["rfisht"]="⥽",
["phmmat"]="ℳ",
["rarrw"]="↝",