[dev-context] cont-en.xml / unique keys
Patrick Gundlach
patrick at gundla.ch
Mon Dec 22 13:58:05 CET 2008
Hi,
>> 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
tegory="fonts">
<cd:sequence>
<cd:string value="definebodyfontenvironment"/>
</cd:sequence>
<cd:arguments>
...
...
...
<cd:command id="cd:11" name="setupbodyfontenvironment" file="font-ini.tex" cat
egory="fonts">
<cd:sequence>
<cd:string value="setupbodyfontenvironment"/>
</cd:sequence>
<cd:arguments>
<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>
<cd:keywords n="2" optional="no">
<cd:inherit ref="cd:10" name="definebodyfontenvironment" n="2"/>
</cd:keywords>
<cd:assignments n="3" optional="yes" list="yes">
<cd:inherit ref="cd:10" name="definebodyfontenvironment" n="3"/>
</cd:assignments>
</cd:arguments>
</cd:command>
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?
Patrick
--
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