On 8/10/2023 10:50 AM, Hans Hagen via ntg-context wrote:
On 8/10/2023 10:37 AM, Hans Hagen wrote:
On 8/10/2023 10:14 AM, Thangalin wrote:
Here's an MWE:
attached the more final version


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
% follow up on mail discussion with T

\startbuffer[demo]
<html>
    <body>
        <div class="concurrent" data-title="Berth 5" data-location="San Diego">
            Text Goes Here
        </div>
        <div class="concurrent" data-title="Road" data-location="Beale AFB">
            Different Text Goes Here
        </div>
    </body>
</html>
\stopbuffer

\startxmlsetups xml:xhtml
    \xmlsetsetup{\xmldocument}{*}{-}
    \xmlsetsetup{\xmldocument}{html|body|div}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:xhtml}

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

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

\startxmlsetups xml:div
    \setupstartstop
        [\xmlatt{#1}{class}]
        [title=\xmlatt{#1}{data-title}]%
    \start[\xmlatt{#1}{class}]%
        \xmlflush{#1}
    \stop
    \blank
    used wherever needed: \namedstartstopparameter{concurrent}{title}
    \blank
\stopxmlsetups

\definestartstop
   [concurrent]
   [before=\startsection[title={TITLE: 
\namedstartstopparameter{concurrent}{title}}],
    after=\stopsection]%

\starttext
    \xmlprocessbuffer{main}{demo}{}
\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

Reply via email to