ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* xml processing
@ 2011-12-31 20:55 Meer, H. van der
  2012-01-01 12:14 ` Hans Hagen
  0 siblings, 1 reply; 11+ messages in thread
From: Meer, H. van der @ 2011-12-31 20:55 UTC (permalink / raw)
  To: ConTeXt NTG

Is there a macro to retrieve the name of the file when inside a call to \xmlprocessfile?

Hans van der Meer



___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread
* XML Processing
@ 2003-05-20 16:35 Alexandre Enkerli
  2003-05-21  8:11 ` Berend de Boer
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Alexandre Enkerli @ 2003-05-20 16:35 UTC (permalink / raw)


Hello all,
I'm building an exam using "ExamView Pro" which has, surprisingly, an 
XML export feature. I'd like to process the exam content into ConTeXt. 
I've looked at the "Example" file and tried to understand how it all 
works, but I'm not sure I can. So far, I've been able to process 
entities and MathML using the mm* and ent as options for --xmlfilter 
(texexec --pdf --xmlfilter=mml,mmp,mmc,ent file.xml) but I can't even 
get <b> to work as planned with any of the xtag-* files. I'm guessing I 
need to use the x-contml.tex file, but I don't know why.
Then, I'll probably need some guidance to have everything work.
The ExamView XML format uses attributes but I'd be happy with just 
getting the basic format straight.
What makes it somewhat harder is that I don't have so much experience 
with ConTeXt anyway.
So, I'd appreciate any help.

Here's the basic structure of the data I want to process:
	<question>
		<text></text>
		<choices>
			<choice></choice>
		</choices>
		<answer></answer>
		<info>
			<difficulty></difficulty>
			<reference></reference>
			<text-objective></text-objective>
		</info>
	</question>

In LaTeX terminology (sorry!) what I want is to have all the question 
texts as items in an "enumerate" and answer choices in an alphabetical 
enumerate for each question. Doesn't sound too hard. In fact, I guess I 
could probably do a find and replace...

Thanks in advance for your help.

^ permalink raw reply	[flat|nested] 11+ messages in thread
* XML processing
@ 2002-08-26 11:33 Robbie Pickering
  2002-08-26 14:40 ` Hans Hagen
  2002-08-26 18:53 ` Simon Pepping
  0 siblings, 2 replies; 11+ messages in thread
From: Robbie Pickering @ 2002-08-26 11:33 UTC (permalink / raw)


OK, I'm stymied here.

What i'm trying to do is typeset a dictionary entry from XML. It's
relatively simple so far. But there are occasions when I'd like to have
the same tags treated differently according to the context.

We have for example definitions DEFN which are sometimes followed by an
example EGPH and sometimes not.

...
<DNUM>3</DNUM>
<DEFN>a large body, esp. of a person</DEFN>
<EGPH>he eased his bulk out of the chair</EGPH>
<DNUM>4</DNUM>
<DEFN>unpackaged cargo or goods</DEFN>

I have setup DEFN very simply

\defineXMLenvironment [DEFN] {}{.}  
to add a full stop after the definition. It would be nice, though, to be
able to automatically add a colon instead in those cases where the DEFN
environment is immediately followed by a EGPH.

is the XML parsing code robust enough that one could start messing
around with counters, etc. in the arguments of a \defineXMLenvironment?
Or is there a better way of going about this?


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

end of thread, other threads:[~2012-01-01 12:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-31 20:55 xml processing Meer, H. van der
2012-01-01 12:14 ` Hans Hagen
  -- strict thread matches above, loose matches on Subject: below --
2003-05-20 16:35 XML Processing Alexandre Enkerli
2003-05-21  8:11 ` Berend de Boer
2003-05-21 19:56 ` Simon Pepping
2003-05-21 20:12 ` Johannes Hüsing
2003-05-23 12:46   ` Hans Hagen
2002-08-26 11:33 XML processing Robbie Pickering
2002-08-26 14:40 ` Hans Hagen
2002-08-26 18:53 ` Simon Pepping
2002-08-26 19:25   ` 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).