ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* XML export: basic questions
@ 2019-05-22 20:30 Procházka Lukáš Ing.
  2019-05-22 21:00 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Procházka Lukáš Ing. @ 2019-05-22 20:30 UTC (permalink / raw)
  To: ConTeXt

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-22 21:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22 20:30 XML export: basic questions Procházka Lukáš Ing.
2019-05-22 21:00 ` Hans Hagen

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).