From: Henning Hraban Ramm <hraban@fiee.net>
Subject: Fwd: ConTeXt FAQ format, XML with DTD
Date: Tue, 5 Nov 2002 19:22:08 +0100 [thread overview]
Message-ID: <200211051922.08315.hraban@fiee.net> (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 >
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
---
next reply other threads:[~2002-11-05 18:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-05 18:22 Henning Hraban Ramm [this message]
2002-11-08 11:34 Simon Pepping
2002-11-09 10:17 ` Henning Hraban Ramm
2002-11-10 15:30 ` Simon Pepping
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=200211051922.08315.hraban@fiee.net \
--to=hraban@fiee.net \
--cc=ntg-context@ref.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).