[dev-context] cont-en.xml / unique keys

Patrick Gundlach patrick at gundla.ch
Mon Dec 22 13:58:05 CET 2008


>> example:
>>   <cd:command id="d1e311" name="setuplanguage" file="lang-ini.tex" category="lan
> why not using something
> cd:command id=cd:<number>

OK, either way would be ok to me. As long as the keys are uniqe and they
don't change over time. 

How about this:

  <cd:command id="cd:10" name="definebodyfontenvironment" file="font-ini.tex" ca
      <cd:string value="definebodyfontenvironment"/>

  <cd:command id="cd:11" name="setupbodyfontenvironment" file="font-ini.tex" cat
      <cd:string value="setupbodyfontenvironment"/>
      <cd:keywords n="1" optional="yes"> <!-- same as definebodyfontenvironment;
 you can define the whole commant to inherit, not only parameters-->
        <cd:inherit ref="cd:10" name="definebodyfontenvironment" n="1"/>
      <cd:keywords n="2" optional="no">
        <cd:inherit ref="cd:10" name="definebodyfontenvironment" n="2"/>
      <cd:assignments n="3" optional="yes" list="yes">
        <cd:inherit ref="cd:10" name="definebodyfontenvironment" n="3"/>

The attached version 2 xslt stylesheet creates these id/ref attributes if (and
only if) they are not existant. 

> btw 1: i made a simple variation of texshow using texlua as webserver,
> just for local usage in editors like i do in scite)

cool! Is it in the distribution?

ConTeXt wiki and more: http://contextgarden.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add_id.xsl
Type: application/octet-stream
Size: 1865 bytes
Desc: not available
URL: <http://www.ntg.nl/mailman/private/dev-context/attachments/20081222/c6cd35d9/attachment.obj>

More information about the dev-context mailing list