ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to process simple HTML files with LuaTeX
@ 2007-09-13 13:04 Mojca Miklavec
  2007-09-13 22:22 ` Hans Hagen
  0 siblings, 1 reply; 11+ messages in thread
From: Mojca Miklavec @ 2007-09-13 13:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,

I was trying to figure out how to process simple HTML files with the
new code, but I fail to understand the details. Here's a simple file I
would like to process:

<html>
<head>
	<title>My first HTML2ConTeXt</title>
</head>
<body>
	<h1>Main Title</h1>
	<p>Some text ...</p>
	<h2>Subtitle</h2>
	<p>Some text again ...</p>
	<h1>Second title</h1>
	<p>... and not much more text here either ...</p>
</body>
</html>

And the failed tries here:

% engine=luatex
\setupcolors[state=start]
\setuphead[subject][style=bfa,color=blue]
\setuphead[subsubject][style=tfa,color=blue]

\starttext
\xmlload{main}{test.html}{}
\xmlgrab{main}{h1}{h1}
\xmlgrab{main}{h2}{h2}

\startxmlsetups h1
\subject{H1: #1}
\stopxmlsetups

\startxmlsetups h2
\subsubject{H2: #1}
\stopxmlsetups

How to grab only the title out of here?

\xmlfilter{main}{html/head/title}

\xmlflush{main}
\stoptext

Any hints most wellcome.

Thank a lot,
     Mojca
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2007-10-02  3:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-13 13:04 How to process simple HTML files with LuaTeX Mojca Miklavec
2007-09-13 22:22 ` Hans Hagen
2007-09-14 13:46   ` Mojca Miklavec
2007-09-14 14:19     ` Hans Hagen
2007-09-16 10:29       ` Mojca Miklavec
2007-09-16 21:55         ` Hans Hagen
2007-10-02  3:17           ` Mojca Miklavec
2007-09-14 14:26     ` Hans Hagen
2007-09-16 10:31       ` Mojca Miklavec
2007-09-16 18:07         ` Aditya Mahajan
2007-09-16 21:58           ` 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).