On 10/24/11 8:48 PM, Hans Hagen wrote:
sure, oryou can play with

if xml.filter(t,".[@frame=on]) then

the x-*.lua show some tricks


OK, I'm in my "stubborn" mode then: why doesn't this work:

\startbuffer[test]
<a>
  <nattable frame="on">
    <tr>
      <td>1</td>
      <td>2</td>
      <td>3</td>
      <td>4</td>
    </tr>
    <tr>
      <td>5</td>
      <td>6</td>
      <td>7</td>
      <td>8</td>
    </tr>
  </nattable>
</a>
\stopbuffer

\startxmlsetups xml:testsetups
    \xmlsetsetup{main}{a|nattable|tr|td|}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:a
    \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:nattable
    \startluacode
      if xml.attribute(t, "/", "frame", "off") == "on" then
      context("Yes, the frame is really on!")
      else
      context("Nope, sorry, it's still off.")
      end
      context(true)
      context.placefigure( { "here" }, "none" , function()
        context.bTABLE()
         context.xmlflush("#1")
        context.eTABLE()
      end)
    \stopluacode
\stopxmlsetups

\startxmlsetups xml:tr
    \startluacode
      context.bTR()
        context.xmlflush("#1")
      context.eTR()
    \stopluacode
\stopxmlsetups

\startxmlsetups xml:td
    \startluacode
      context.bTD()
        context.xmlflush("#1")
      context.eTD()
    \stopluacode
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext

I get a lua error here.

Thomas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to