From: Hans Hagen <j.hagen@xs4all.nl>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>,
"Procházka Lukáš Ing." <LPr@pontex.cz>
Subject: Re: XML export: basic questions
Date: Wed, 22 May 2019 23:00:04 +0200 [thread overview]
Message-ID: <b1bcbf31-1d2f-566b-5a00-0669ba826d25@xs4all.nl> (raw)
In-Reply-To: <op.z17kkbl73h68c7@lkzd-dell-2016>
On 5/22/2019 10:30 PM, Procházka Lukáš Ing. wrote:
> 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.
no, because then we also need to check for files with that name already
present etc etc
> 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?
no, because they also server as check
> 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.
there are soem options to pass properties (probably also demonstrated in
examples)
> - Or is there another way, like enclosing into a user tag:
>
> \starttag[MyTag]
> \startsection[title={Sec},MyPar=MyVal]
> \input knuth
> \stopsection
> \stoptag
indeed you can define your own tags
> which would export into:
>
> <MyTag>
> <section detail="section" chain="section" implicit="1" level="3"
> MyPar="MyVal">
> ...
> </section>
> </MyTag>
as it is impossible to fulfil every possible scneario the export is just
that ... an export ... one can always postprocess the xml
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
prev parent reply other threads:[~2019-05-22 21:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-22 20:30 Procházka Lukáš Ing.
2019-05-22 21:00 ` Hans Hagen [this message]
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=b1bcbf31-1d2f-566b-5a00-0669ba826d25@xs4all.nl \
--to=j.hagen@xs4all.nl \
--cc=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).