diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-22 22:14:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-22 22:14:39 +0000 |
commit | fc4466b32ed330a956ac603b00fd145524cff49a (patch) | |
tree | 2c50e2b8de13aa9233b2c76dffe201558f169e86 /Master/texmf-dist/tex/context/base/lxml-sor.mkiv | |
parent | 50e2368597d5f6fe2057195d0ae6a9f2044923e4 (diff) |
context (22apr16)
git-svn-id: svn://tug.org/texlive/trunk@40691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/lxml-sor.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/lxml-sor.mkiv | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/Master/texmf-dist/tex/context/base/lxml-sor.mkiv b/Master/texmf-dist/tex/context/base/lxml-sor.mkiv deleted file mode 100644 index 0d8eb6ba174..00000000000 --- a/Master/texmf-dist/tex/context/base/lxml-sor.mkiv +++ /dev/null @@ -1,97 +0,0 @@ -%D \module -%D [ file=lxml-sor, -%D version=2009.08.24, -%D title=\CONTEXT\ \XML\ Support, -%D subtitle=Sorting, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - -%D THIS IS VERY EXPERIMENTAL! - -\writestatus{loading}{ConTeXt XML Support / Sorting} - -\registerctxluafile{lxml-sor}{1.001} - -\unprotect - -% the flusher is unexpandable so that it can be used in tables (noalign -% interferences) - -\unexpanded\def\xmlresetsorter #1{\ctxlxml{sorters.reset("#1")}} -\unexpanded\def\xmladdsortentry#1#2#3{\ctxlxml{sorters.add("#1","#2",\!!bs#3\!!es)}} -\unexpanded\def\xmlshowsorter #1{\ctxlxml{sorters.show("#1")}} - \def\xmlflushsorter #1#2{\ctxlxml{sorters.flush("#1","#2")}} -\unexpanded\def\xmlsortentries #1{\ctxlxml{sorters.sort("#1")}} - -\protect \endinput - -\startbuffer[test] -<demo> - <entry> - <category>one</category> - <key>alpha</key> - <content>alpha indeed</content> - </entry> - <entry> - <category>one</category> - <key>gamma</key> - <content>gamma indeed</content> - </entry> - <entry> - <category>one</category> - <key>beta</key> - <content>beta indeed</content> - </entry> - <entry> - <category>two</category> - <key>alpha</key> - <content>alpha again</content> - </entry> - <entry> - <category>two</category> - <key>gamma</key> - <content>gamma again</content> - </entry> - <entry> - <category>two</category> - <key>beta</key> - <content>beta again</content> - </entry> -</demo> -\stopbuffer - -\startxmlsetups xml:mysetups - \xmlsetsetup{\xmldocument}{demo|entry|content}{xml:*} -\stopxmlsetups - -\xmlregistersetup{xml:mysetups} - -\startxmlsetups xml:demo - \xmlresetsorter{demo} - \xmlfilter{#1}{entry/command(xml:entry:getkeys)} - \blank sortkeys: \blank\xmlshowsorter{demo}\blank - \xmlsortentries{demo} - \xmlflushsorter{demo}{xml:entry:flush} -\stopxmlsetups - -\startxmlsetups xml:entry:getkeys - \xmladdsortentry{demo}{#1}{\xmltext{#1}{category}} - \xmladdsortentry{demo}{#1}{\xmltext{#1}{key|entry}} -\stopxmlsetups - -\startxmlsetups xml:entry:flush - \xmltext{#1}{content}\par -\stopxmlsetups - -\startxmlsetups xml:entry - \xmltext{#1}{content}\par -\stopxmlsetups - -\starttext - \xmlprocessbuffer{main}{test}{} -\stoptext |