ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* ConTeXt FAQ format, XML with DTD
@ 2002-11-05 18:47 Henning Hraban Ramm
  2002-11-06  9:31 ` Taco Hoekwater
  0 siblings, 1 reply; 3+ messages in thread
From: Henning Hraban Ramm @ 2002-11-05 18:47 UTC (permalink / raw)


Hello again!

JM's proposal of FAQ format is only for one FAQ entry.
The following one may contain the whole thing: several "recipes" (FAQ
entries),
each in more than one language.

I tried to convert it with ConTeXt, but it doesn't like attributes
(I will make a minimal failing example later).

<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE context_cookbook SYSTEM "context_cookbook.dtd">
<cookbook date="2002-10-28" label="jum-000">
	<recipe id="test" section="first" subsection="subfirst">
		<version xml:lang="de" original="yes">
			<question>
				Wie kann ich dies und jenes erreichen?
			</question>
			<keyword sort-as="tech">&TeX;</keyword>
			<keyword>Test</keyword>
			<answer>
				<p>So vielleicht. <code
type="tex">blabla</code></p>
				<p>Oder so. <code type="shell">cat &gt;
test.txt</code></p>
				<p>Oder anders.</p>
			</answer>
			<author id="hraban" date="2002-10-20" />
			<editor id="nobody" date="2003-10-11" />
		</version>
		<version xml:lang="en" original="no">
			<question>
				How can I achieve that or this?
			</question>
			<keyword sort-as="tech">&TeX;</keyword>
			<keyword>test</keyword>
			<answer>
				<p>Perhaps this way.
				<code type="xml">
					<macro>clip</macro>

<sqbracket>nx=3,ny=2,x=2,y=1</sqbracket>
					<braces>

<macro>externalfigure</macro>

<sqbracket>yourfigure</sqbracket>
					</braces>
				</code></p>
				<p>Or maybe that way.</p>
				<p>Or somehow else.</p>
			</answer>
			<author id="john" date="2002-10-20" />
			<editor id="hraban" date="2002-10-21" />
		</version>
	</recipe>
</cookbook>

----------------------------------------------------------------------------
context_cookbook.dtd:

<?xml version="1.0" encoding="iso-8859-1" ?>
<!ENTITY % sortas	"sort-as CDATA #IMPLIED">
<!ENTITY % date		"date	CDATA #REQUIRED">
<!ENTITY % person	"id		IDREF #REQUIRED
					%date;">

<!ELEMENT cookbook	(recipe+)>
	<!ATTLIST cookbook	%date;>
	<!ATTLIST cookbook	label CDATA #IMPLIED>
<!ELEMENT recipe	(version+)>
	<!ATTLIST recipe	id	ID #REQUIRED>
	<!ATTLIST recipe	section	IDREF #REQUIRED>
	<!ATTLIST recipe	subsection	IDREF "none">
	<!ATTLIST recipe	subsubsection	IDREF "none">
<!ELEMENT version	(question, keyword*, answer, author, editor*)>
	<!ATTLIST version	xml:lang IDREF "en">
	<!ATTLIST version	original (yes|no) "yes">
<!ELEMENT question	ANY>
<!ELEMENT keyword	ANY>
	<!ATTLIST keyword	%sortas;>
<!ELEMENT answer	ANY>
<!ELEMENT author	EMPTY>
	<!ATTLIST author	%person;>
<!ELEMENT editor	EMPTY>
	<!ATTLIST editor	%person;>

<!ELEMENT code	(#PCDATA)>
	<!ATTLIST code	type (tex|shell|dos|xml) "tex">
<!ELEMENT index	(#PCDATA)>
	<!ATTLIST index		%sortas;>
<!ELEMENT emph	(#PCDATA)>
<!ELEMENT p		ANY>

<!ENTITY TeX "tech">

----------------------------------------------------------------------------

Grüßlis vom Hraban!
--
http://www.fiee.net
http://www.ramm.ch
---

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

end of thread, other threads:[~2002-11-06 20:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-05 18:47 ConTeXt FAQ format, XML with DTD Henning Hraban Ramm
2002-11-06  9:31 ` Taco Hoekwater
2002-11-06 20:20   ` Henning Hraban Ramm

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