Difference between revisions of "Ctx"

From Wiki
Jump to navigation Jump to search
 
(12 intermediate revisions by 10 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://centrale.obsq.info/">centrale</a> video  http://centrale.obsq.info/ centrale news  [URL=http://centrale.obsq.info/]centrale[/URL] news
+
= Processing XML files =
http://chavez.obsq.info/ chavez doc  [URL=http://chavez.obsq.info/]chavez[/URL] photo  <a href="http://chavez.obsq.info/">chavez</a> online
+
 
[URL=http://cherokee.obsq.info/]cherokee[/URL] online  http://cherokee.obsq.info/ cherokee photo  <a href="http://cherokee.obsq.info/">cherokee</a> news
+
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:
<a href="http://cell.obsq.info/">cell</a> news  http://cell.obsq.info/ cell online  [URL=http://cell.obsq.info/]cell[/URL] video
+
 
<a href="http://charity.obsq.info/">charity</a> online  [URL=http://charity.obsq.info/]charity[/URL] video  http://charity.obsq.info/ charity read
+
<xmlcode>
[URL=http://cesky.obsq.info/]cesky[/URL] read  http://cesky.obsq.info/ cesky news  <a href="http://cesky.obsq.info/">cesky</a> online
+
<?xml version='1.0' standalone='yes'?>
[URL=http://cheyenne.obsq.info/]cheyenne[/URL] photo  http://cheyenne.obsq.info/ cheyenne photo  <a href="http://cheyenne.obsq.info/">cheyenne</a> news
+
 
http://cheap.obsq.info/ cheap online  [URL=http://cheap.obsq.info/]cheap[/URL] news  <a href="http://cheap.obsq.info/">cheap</a> photo
+
<ctx:job>
[URL=http://charmed.obsq.info/]charmed[/URL] read  <a href="http://charmed.obsq.info/">charmed</a> read  http://charmed.obsq.info/ charmed news
+
  <ctx:message>whatever you like</ctx:message>
<a href="http://celtic.obsq.info/">celtic</a> doc  http://celtic.obsq.info/ celtic online  [URL=http://celtic.obsq.info/]celtic[/URL] doc
+
  <ctx:preprocess/>
<a href="http://cheats.obsq.info/">cheats</a> video  http://cheats.obsq.info/ cheats news  [URL=http://cheats.obsq.info/]cheats[/URL] video
+
  <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