diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkxl/lxml-ini.mkxl')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkxl/lxml-ini.mkxl | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lxml-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/lxml-ini.mkxl index 01d0f883f96..be249c1f3bd 100644 --- a/Master/texmf-dist/tex/context/base/mkxl/lxml-ini.mkxl +++ b/Master/texmf-dist/tex/context/base/mkxl/lxml-ini.mkxl @@ -195,6 +195,23 @@ %xmlpopdocument \endgroup} +% This still doesn't solve a problem with weird grouping (start inside xml and +% end outside, so one has to do proper grouping inside xml mode). +% +% \def\lxml_process#1#2#3#4#5% flag \loader id name what initializersetup +% {%\begingroup +% \pushmacro\xmldocument +% \edef\xmldocument{#3}% #2 can be \xmldocument and set as such +% #2{#3}{#4}% +% \pushcatcodetable +% \setcatcodetable\notcatcodes +% \doifelsenothing{#5}% +% {\xmlsetup{#3}{xml:process}}% +% {\xmlsetup{#3}{#5}}% +% \popcatcodetable +% \popmacro\xmldocument +% }%\endgroup} + \permanent\protected\def\xmlprocessfile {\lxml_process\plusone \xmlload} \permanent\protected\def\xmlprocessdata {\lxml_process\zerocount\xmlloaddata} \permanent\protected\def\xmlprocessbuffer{\lxml_process\zerocount\xmlloadbuffer} @@ -256,7 +273,7 @@ \doinitializeverbatim \beginofverbatimlines} -\aliased\let\stopxmldisplayverbatim\relax +\permanent\protected\lettonothing\stopxmldisplayverbatim \permanent\tolerant\protected\def\startxmlinlineverbatim[#1]% {\begingroup @@ -269,7 +286,7 @@ \enforced\let\stopxmlinlineverbatim\endgroup \doinitializeverbatim} -\aliased\let\stopxmlinlineverbatim\relax +\permanent\protected\lettonothing\stopxmlinlineverbatim % processing instructions @@ -305,10 +322,10 @@ \installdirectcommandhandler \??xml {xml} -\letvalue{\??xmldefaults\v!normal}\zerocount -\letvalue{\??xmldefaults\v!none }\zerocount -\letvalue{\??xmldefaults\v!text }\plusone -\letvalue{\??xmldefaults\v!hidden}\plustwo +\letcsname\??xmldefaults\v!normal\endcsname\zerocount +\letcsname\??xmldefaults\v!none \endcsname\zerocount +\letcsname\??xmldefaults\v!text \endcsname\plusone +\letcsname\??xmldefaults\v!hidden\endcsname\plustwo \permanent\protected\def\xmldefaulttotext {\ifcase\xmlprocessingmode @@ -334,7 +351,7 @@ \doif{\directxmlparameter\c!entities}\v!yes\clf_xmlloadentities \to \everysetupxml -\permanent\def\xmlmapvalue #1#2#3{\setvalue{\??xmlmapvalue#1:#2}{#3}} % keep #3 to grab spaces +\permanent\def\xmlmapvalue #1#2#3{\defcsname\??xmlmapvalue#1:#2\endcsname{#3}} % keep #3 to grab spaces \permanent\def\xmldoifelsevalue #1#2{\ifcsname\??xmlmapvalue#1:#2\endcsname\expandafter\firstoftwoarguments\else\expandafter\secondoftwoarguments\fi} \permanent\def\xmlvalue#1#2% #3 |