ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Procházka Lukáš Ing." <LPr@pontex.cz>
To: ConTeXt <ntg-context@ntg.nl>
Subject: XML export: basic questions
Date: Wed, 22 May 2019 22:30:01 +0200	[thread overview]
Message-ID: <op.z17kkbl73h68c7@lkzd-dell-2016> (raw)

Hello,

suppose having "Main.mkiv":

----
\setupbackend[export=yes]

\starttext
   \startsection[title={Sec},MyPar=MyVal]
     \input knuth
   \stopsection
\stoptext
----

Some questions concerning XML export:

1. Normally, with \setupbackend[export=yes], Ctx creates "Main-export" directory containing (among others) Main-raw.xml, and Main-tag.xhtml and some subdirs.

Is there a way to tell Ctx to produce just one XML file with a prescribed name which wouldn't be placed in any subdir?
In my case - to produce "Main.xml" (instead of "Main-export/Main-raw.xml"), other files to be omitted?

2. Is there a way to export user parameters used in \section?

In my case: \startsection[title={Sec},MyPar=MyVal] uses user parameter "MyPar" with value "MyVal", but "MyPar" is not transmitted into XML;
the goal is to have
	<section detail="section" chain="section" implicit="1" level="3"
          MyPar="MyVal"
         >
which would allow some filtering when reprocessing that XML.

- Or is there another way, like enclosing into a user tag:

   \starttag[MyTag]
     \startsection[title={Sec},MyPar=MyVal]
       \input knuth
     \stopsection
   \stoptag

which would export into:

	<MyTag>
	  <section detail="section" chain="section" implicit="1" level="3" MyPar="MyVal">
           ...
           </section>
         </MyTag>

Best regards,

Lukas


-- 
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o.      | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

             reply	other threads:[~2019-05-22 20:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22 20:30 Procházka Lukáš Ing. [this message]
2019-05-22 21:00 ` Hans Hagen

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=op.z17kkbl73h68c7@lkzd-dell-2016 \
    --to=lpr@pontex.cz \
    --cc=ntg-context@ntg.nl \
    /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).