![](https://secure.gravatar.com/avatar/7698ca8517c6b0d840c3eb065bceca3d.jpg?s=120&d=mm&r=g)
On Wed, Dec 18, 2002 at 06:42:00PM +0100, scarso luigi wrote:
When I just start to play with xml/context, I realize a test for table (i'm still playing with it) in which I write something like
<table> <!-- ... other elements --> <row> <entry role="setupentry[nx=2,background=color,backgroundcolor=red]"> blahh blahh </entry> <!-- ... other elements --> </row> <!-- ... other elements --> </table>
and define
\defineXMLpickup [entry] [role=]% %%Open tag {\expanded{\beforesplitstring{\XMLpar{entry}{role}{}}}\at [\to\Type% % get ..options..] \expanded{\aftersplitstring{\XMLpar{entry}{role}{}}}\at [\to\rawOptions% % get ..options.. \expanded{\beforesplitstring{\rawOptions}}\at ]\to\Options% \doifelse{\Type}{setupentry}% {%then \expanded{\bTD[\Options]} }{%else \bTD% }}% %%Close tag {\eTD}
Is your way, Simon ?
I remember this discussion. This is not my kind of XML file, the attribute value is too much written for context. It is useful if it is meant to be an input file for Context, but it is not useful if the XML file is meant to be formatter independent. And I think the code you have to write to use the attribute is too difficult as a user option. I was thinking more about the simple example <para type="rule"> and a simple user command like \defineattributeaction[para][type] {\doifsamestring{\XMLpar{para}{type}{}}{bold}{\bfa}} Regards, Simon -- Simon Pepping email: spepping@scaprea.hobby.nl