summaryrefslogtreecommitdiff
path: root/doc/context/sources/general/manuals/xml
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-01-17 13:51:05 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2018-01-17 13:51:05 +0100
commit84591a31c39887dbf582df5d535f1de1a115fd62 (patch)
tree1c4613a1c79db3cdfb41b977c64e993492fbdd88 /doc/context/sources/general/manuals/xml
parenta16cd078a5cc00d7c789093b5209b6f8d2dfdb1a (diff)
downloadcontext-84591a31c39887dbf582df5d535f1de1a115fd62.tar.gz
2018-01-17 13:16:00
Diffstat (limited to 'doc/context/sources/general/manuals/xml')
-rw-r--r--doc/context/sources/general/manuals/xml/xml-mkiv.tex83
1 files changed, 83 insertions, 0 deletions
diff --git a/doc/context/sources/general/manuals/xml/xml-mkiv.tex b/doc/context/sources/general/manuals/xml/xml-mkiv.tex
index ec9be1c6e..0f9c74662 100644
--- a/doc/context/sources/general/manuals/xml/xml-mkiv.tex
+++ b/doc/context/sources/general/manuals/xml/xml-mkiv.tex
@@ -1274,6 +1274,15 @@ The following commands return strings. Normally these are used in tests.
returns the last attribute found (this avoids a lookup)
\stopxmlcmd
+\startxmlcmd {\cmdbasicsetup{xmlsetatt}}
+ set the value of attribute \cmdinternal {cd:name}
+\stopxmlcmd
+
+\startxmlcmd {\cmdbasicsetup{xmlsetattribute}}
+ set the value of attribute \cmdinternal {cd:name} for each match of \cmdinternal
+ {cd:lpath}
+\stopxmlcmd
+
\stopsection
\startsection[title={manipulation}]
@@ -1609,6 +1618,80 @@ mechanism for other purposes as well.
\stopsection
+\startsection[title={Parameters}]
+
+\startbuffer[test]
+<something whatever="alpha">
+ <what>
+ beta
+ </what>
+</something>
+\stopbuffer
+
+\startbuffer
+\startxmlsetups xml:mysetups
+ \xmlsetsetup{\xmldocument}{*}{xml:*}
+\stopxmlsetups
+
+\xmlregistersetup{xml:mysetups}
+
+\startxmlsetups xml:something
+ parameter : \xmlpar {#1}{whatever}\par
+ attribute : \xmlatt {#1}{whatever}\par
+ text : \xmlfirst {#1}{what} \par
+ \xmlsetpar{#1}{whatever}{gamma}
+ parameter : \xmlpar {#1}{whatever}\par
+ \xmlflush{#1}
+\stopxmlsetups
+
+\startxmlsetups xml:what
+ what: \xmlflush{#1}\par
+ parameter : \xmlparam{#1}{..}{whatever}\par
+\stopxmlsetups
+
+\xmlprocessbuffer{main}{test}{}
+\stopbuffer
+
+Say that we have this \XML\ blob:
+
+\typebuffer[test]
+
+With:
+
+\typebuffer
+
+we get:
+
+\getbuffer
+
+Parameters are stored with a node.
+
+\startxmlcmd {\cmdbasicsetup{xmlpar}}
+ returns the value of parameter \cmdinternal {cd:name} or empty if no such
+ parameter exists
+\stopxmlcmd
+
+\startxmlcmd {\cmdbasicsetup{xmlparam}}
+ finds a first match for \cmdinternal {cd:lpath} at \cmdinternal {cd:node} and
+ returns the value of parameter \cmdinternal {cd:name} or empty if no such
+ parameter exists
+\stopxmlcmd
+
+\startxmlcmd {\cmdbasicsetup{xmllastpar}}
+ returns the last parameter found (this avoids a lookup)
+\stopxmlcmd
+
+\startxmlcmd {\cmdbasicsetup{xmlsetpar}}
+ set the value of parameter \cmdinternal {cd:name}
+\stopxmlcmd
+
+\startxmlcmd {\cmdbasicsetup{xmlsetparam}}
+ set the value of parameter \cmdinternal {cd:name} for each match of \cmdinternal
+ {cd:lpath}
+\stopxmlcmd
+
+\stopsection
+
\stopchapter
\startchapter[title={Expressions and filters}]