ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Pablo Rodriguez <oinos@gmx.es>
Subject: [NTG-context] Re: missing metadata in LMTX
Date: Wed, 6 Mar 2024 20:11:04 +0100	[thread overview]
Message-ID: <04be3666-e6cf-23c9-2a31-da13cf6d4fe0@gmx.es> (raw)
In-Reply-To: <c261eeb6-fa17-c5ec-f407-7bdbca7fefc7@gmail.com>

On 3/6/24 17:35, Wolfgang Schuster wrote:
> Pablo Rodriguez via ntg-context schrieb am 06.03.2024 um 16:52:
>> [...]
>> I wonder whether this requires a minimal sample to be fixed.
>
> Yes, a minimal example would help because \setupmetadata works in your
> previous example.

Many thanks for your reply, Wolfgang.

Now I have the minimal sample:

  \startbuffer[demo]
  <doc>
    <div id="header">
      <h2 class="author">author</h2>
    </div>
    <text>
      text
    </text>
  </doc>
  \stopbuffer

  \starttext
  \startxmlsetups xml:initialize
    \xmlsetsetup{#1}{doc}{xml:*}

    \xmlsetsetup{\xmldocument}
      {(div|section)[@id='header']}
      {xml:meta}

   \xmlsetsetup{\xmldocument}
      {(h2|p)[contains(@class,'author')]}
      {xml:title:author}
  \stopxmlsetups

  \xmlregistersetup{xml:initialize}

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

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

  \startxmlsetups xml:meta
    %\aftergrouped{\setupinteraction%
    \setupmetadata
     [author={\xmlconcat{#1}{/h2[contains(@class,'author')]}{, }}]
    %}
  \stopxmlsetups

  \startxmlsetups xml:title:author
    \xmlflush{#1}
  \stopxmlsetups

  \setupinteraction[state=start]
  \xmlprocessbuffer{main}{demo}{}
  \stoptext

With \setupmetadata it breaks compilation.

I know it is not the most elegant code, but in my real environment
xml:title:author outputs text.

Many thanks for your help,

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2024-03-06 19:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-03 19:02 [NTG-context] " Pablo Rodriguez via ntg-context
2024-03-04  0:18 ` [NTG-context] " Wolfgang Schuster
2024-03-04  6:17   ` Pablo Rodriguez via ntg-context
2024-03-05 22:14     ` Wolfgang Schuster
2024-03-06 10:18       ` Marco Patzer
2024-03-06 10:32         ` Henning Hraban Ramm
2024-03-06 14:54         ` Hans Hagen
2024-03-06 15:52           ` Pablo Rodriguez via ntg-context
2024-03-06 16:35             ` Wolfgang Schuster
2024-03-06 19:11               ` Pablo Rodriguez via ntg-context [this message]
2024-03-06 19:23                 ` Wolfgang Schuster
2024-03-06 19:27                 ` Wolfgang Schuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=04be3666-e6cf-23c9-2a31-da13cf6d4fe0@gmx.es \
    --to=ntg-context@ntg.nl \
    --cc=oinos@gmx.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).