From dc98ffdc842271d05903846b460fab90d4d83739 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Mon, 9 Mar 2015 20:15:05 +0100 Subject: 2015-03-09 19:29:00 --- tex/context/base/lxml-ini.mkiv | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'tex/context/base/lxml-ini.mkiv') 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 -- cgit v1.2.3