summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/x-fdf-00.mkii
blob: fd4bea7e74c45833b5678745eddc1807f688bf8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
% <xfdf>
%   <fields>
%     <field name="one">
%       <value>first</value>
%     </field>
%     <field name="two">
%       <value>second</value>
%     </field>
%   </fields>
% </xfdf>
% 
% previous method:
%
% object 
% data 
% fields 
% field 

\defineXMLprocess[fdf:xfdf] 
\defineXMLprocess[fdf:fields]
\defineXMLignore [fdf:f] 
\defineXMLpush   [fdf:value]

\defineXMLenvironment [fdf:field] [name=,value=]
  {\XMLerase{fdf:value}} 
  {\gsaveXMLdata{fdf:\XMLop{name}}{fdf:value}}

\defineXMLsingular [fdf:field] [name=,value=]
  {\gsaveXMLasdata{fdf:\XMLop{name}}{\XMLop{value}}}

\def\doifelseFDFfield#1{\doifelseXMLelement{fdf:#1}}
\def\flushFDFfield   #1{\flushXMLelement   {fdf:#1}}
\def\processFDFfield #1{\processXMLelement {fdf:#1}}   
   
\def\loadFDFfile#1%
  {\bgroup
   \autoXMLnamespace[fdf]%
   \processXMLfilegrouped{#1}%
   \egroup}

\endinput