Difference between revisions of "Ctx"

From Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
* [[manual:xmanipulate.pdf|Preprocessing source files, Manipulating graphics]]
 
* [[manual:xmanipulate.pdf|Preprocessing source files, Manipulating graphics]]
  
<a href="http://democratization.obsq.info/">democratization</a> video  http://democratization.obsq.info/ democratization doc  [URL=http://democratization.obsq.info/]democratization[/URL] read
+
= Processing XML files =
<a href="http://december.obsq.info/">december</a> online  http://december.obsq.info/ december online  [URL=http://december.obsq.info/]december[/URL] read
+
 
<a href="http://defensive.obsq.info/">defensive</a> read  [URL=http://defensive.obsq.info/]defensive[/URL] news  http://defensive.obsq.info/ defensive online
+
To process a file <code>xml.xml</code> with style definitions in <code>style.tex</code> you can make a file <code>xml.ctx</code> that says:
http://dear.obsq.info/ dear doc  <a href="http://dear.obsq.info/">dear</a> video  [URL=http://dear.obsq.info/]dear[/URL] read
+
 
http://delhi.obsq.info/ delhi online  [URL=http://delhi.obsq.info/]delhi[/URL] photo  <a href="http://delhi.obsq.info/">delhi</a> read
+
<xmlcode>
http://day.obsq.info/ day read  <a href="http://day.obsq.info/">day</a> video  [URL=http://day.obsq.info/]day[/URL] news
+
<?xml version='1.0' standalone='yes'?>
<a href="http://denmark.obsq.info/">denmark</a> online  http://denmark.obsq.info/ denmark read  [URL=http://denmark.obsq.info/]denmark[/URL] video
+
 
http://declared.obsq.info/ declared news  <a href="http://declared.obsq.info/">declared</a> news  [URL=http://declared.obsq.info/]declared[/URL] news
+
<ctx:job>
http://definition.obsq.info/ definition news  [URL=http://definition.obsq.info/]definition[/URL] online  <a href="http://definition.obsq.info/">definition</a> online
+
  <ctx:message>whatever you like</ctx:message>
[URL=http://deal.obsq.info/]deal[/URL] video  http://deal.obsq.info/ deal online  <a href="http://deal.obsq.info/">deal</a> news
+
  <ctx:preprocess/>
http://deaths.obsq.info/ deaths read  [URL=http://deaths.obsq.info/]deaths[/URL] video  <a href="http://deaths.obsq.info/">deaths</a> news
+
  <ctx:process>
 +
      <ctx:resources>
 +
          <ctx:environment>style.tex</ctx:environment>
 +
      </ctx:resources>
 +
  </ctx:process>
 +
  <ctx:postprocess/>
 +
</ctx:job>
 +
</xmlcode>
 +
 
 +
If you include a directive into the file <code>xml.xml</code>
 +
 
 +
<xmlcode>
 +
<?context-directive job ctxfile xml.ctx ?>
 +
</xmlcode>  
 +
 
 +
you can process your xml file directly with the command
 +
<code>context xml.xml</code>
 +
 
 +
[[Category:XML]]

Latest revision as of 18:13, 21 December 2022

See:

Processing XML files

To process a file xml.xml with style definitions in style.tex you can make a file xml.ctx that says:

<?xml version='1.0' standalone='yes'?>

<ctx:job>
   <ctx:message>whatever you like</ctx:message>
   <ctx:preprocess/>
   <ctx:process>
       <ctx:resources>
           <ctx:environment>style.tex</ctx:environment>
       </ctx:resources>
   </ctx:process>
   <ctx:postprocess/>
</ctx:job>

If you include a directive into the file xml.xml

<?context-directive job ctxfile xml.ctx ?>

you can process your xml file directly with the command context xml.xml