summaryrefslogtreecommitdiff
path: root/tex/context/base/strc-xml.mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2009-07-23 20:11:00 +0200
committerHans Hagen <pragma@wxs.nl>2009-07-23 20:11:00 +0200
commit3edfc2fc3e569201a16c63871aae121e57673539 (patch)
tree77c2fab43ff04bc1dd3d89a577e855a66c38d7e8 /tex/context/base/strc-xml.mkiv
parentb32da8747292384893ea07a0a5659b24eb216c10 (diff)
downloadcontext-3edfc2fc3e569201a16c63871aae121e57673539.tar.gz
stable 2009.07.23 20:11
Diffstat (limited to 'tex/context/base/strc-xml.mkiv')
-rw-r--r--tex/context/base/strc-xml.mkiv47
1 files changed, 47 insertions, 0 deletions
diff --git a/tex/context/base/strc-xml.mkiv b/tex/context/base/strc-xml.mkiv
index 04c5e71b8..3f11c0ac9 100644
--- a/tex/context/base/strc-xml.mkiv
+++ b/tex/context/base/strc-xml.mkiv
@@ -85,3 +85,50 @@
\starttext
\xmlprocessfile{demo}{oeps.xml}{}
\stoptext
+
+% example by thomas:
+
+\startbuffer[test]
+<auth>
+ <section>
+ <title><emph>MyTitle</emph></title>
+ <content>
+ Hello world
+ </content>
+ </section>
+</auth>
+\stopbuffer
+
+\startxmlsetups xml:mysetups
+ \xmlsetsetup{\xmldocument}{auth|section|title|content|emph}{xml:*}
+\stopxmlsetups
+
+\xmlregistersetup{xml:mysetups}
+
+\startxmlsetups xml:auth
+ \xmlflush{#1}
+\stopxmlsetups
+
+\startxmlsetups xml:section
+ \xmlflush{#1}\par \midaligned{\hl[5]}
+\stopxmlsetups
+
+\startxmlsetups xml:title
+ \section{\xmlflush{#1}}
+\stopxmlsetups
+
+\startxmlsetups xml:content
+ \xmlflush{#1}\par
+\stopxmlsetups
+
+\startxmlsetups xml:emph
+ {\bgroup\em \xmlflush{#1}\egroup}
+\stopxmlsetups
+
+\setuphead
+ [section]
+ [style=normal,number=no,expansion=yes,page=yes]
+
+\starttext
+ \xmlprocessbuffer{main}{test}{}
+\stoptext