diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-03-09 20:15:05 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-03-09 20:15:05 +0100 |
commit | dc98ffdc842271d05903846b460fab90d4d83739 (patch) | |
tree | 49603cd805408ebdde3a7eafc59c40279dc7e9ad /tex/context/base/lxml-ini.mkiv | |
parent | 08128a9710f7a34e16f7487b3bccfe7feadb36f1 (diff) | |
download | context-dc98ffdc842271d05903846b460fab90d4d83739.tar.gz |
2015-03-09 19:29:00
Diffstat (limited to 'tex/context/base/lxml-ini.mkiv')
-rw-r--r-- | tex/context/base/lxml-ini.mkiv | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tex/context/base/lxml-ini.mkiv b/tex/context/base/lxml-ini.mkiv index 0092ea4f4..a7cdff862 100644 --- a/tex/context/base/lxml-ini.mkiv +++ b/tex/context/base/lxml-ini.mkiv @@ -56,7 +56,7 @@ %def\xmlcontent #1{\ctxlxml{content("#1")}} %def\xmlflushstripped #1{\ctxlxml{strip("#1",true)}} \def\xmldirect #1{\ctxlxml{direct("#1")}} % in loops, not dt but root -\def\xmlidx #1#2#3{\ctxlxml{idx("#1","#2",\number#3)}} +\def\xmlidx #1#2#3{\ctxlxml{idx("#1","#2",\number#3)}} % not ok \def\xmlinclude #1#2#3{\ctxlxml{include("#1","#2","#3",true)}} \def\xmlincludeoptions#1#2#3#4{\ctxlxml{include("#1","#2","#3","#4")}} \def\xmlinclusion #1{\ctxlxml{inclusion("#1")}} @@ -100,7 +100,19 @@ \def\xmltoparameters #1{\ctxlxml{toparameters("#1")}} -\def\xmltofile #1#2#3{\ctxlxml{tofile("#1","#2","#3")}} % id pattern filename +\def\xmltofile #1#2#3{\ctxlxml{tofile("#1","#2","#3")}} % id pattern filename +\def\xmltobuffer #1#2#3{\ctxlxml{tobuffer("#1","#2","#3")}} % id pattern name +\def\xmltobufferverbose #1#2#3{\ctxlxml{tobuffer("#1","#2","#3",true)}} % id pattern name + +% goodie: + +\unexpanded\def\xmlprettyprint#1#2% + {\xmltobufferverbose{#1}{.}{xml-temp}% + \ifdefined\scitebuffer + \scitebuffer[#2][xml-temp]% + \else + \typebuffer[xml-temp][\c!option=#2]% + \fi} % kind of special: @@ -135,8 +147,8 @@ %\ef\xmlsetup#1#2{\setupwithargument{#2}{#1}} \let\xmlsetup\setupwithargumentswapped -\let\xmls\setupwithargumentswapped -\let\xmlw\setupwithargument +\let\xmls\setupwithargumentswapped % hardly any faster +\let\xmlw\setupwithargument % hardly any faster \newtoks \registeredxmlsetups |