From: Hans Hagen <pragma@wxs.nl>
Subject: Re: XML and references
Date: Mon, 03 Apr 2006 10:43:33 +0200 [thread overview]
Message-ID: <4430E035.8090703@wxs.nl> (raw)
In-Reply-To: <e0prml$d9e$1@sea.gmane.org>
Johannes Graumann wrote:
> Hello all,
>
> I'm trying to interpret something like
> <section label="intro:mixtureprob">
> <title>The problem of the complex protein mixture</title>
> <content>
> <ref name="intro:mixtureprob"/>
> </content>
> </section>
>
> With the follwing mapping rules and am failing:
> \defineXMLenvironment
> [section]
> {
> \defineXMLargument
> [title]
> [\XMLpar{section}{label}{}]
>
wrong argument, should be [name=]
> {\section}
> \defineXMLenvironment
> [content]
> {}{}
> }
> {}
> \defineXMLargument
> [ref]
> {\textreference[\XMLpar{ref}{name}{}]}
>
wrong command \textreference should be \in
> I would appreciate any insight into my folly ...
>
> Thanks, Joh
>
\defineXMLenvironment
[section]
{\setups{section:define}}
{}
\startsetups section:define
\defineXMLargument
[title]
[label=]
{\expanded{\section[\XMLpar{section}{label}{}]}}
\defineXMLprocess
[content]
\stopsetups
\defineXMLenvironmentsave
[pageref]
[name=]
{}
{\at{\XMLflush{pageref}}[\XMLop{name}]}
\defineXMLenvironmentsave
[textref]
[name=]
{}
{\in{\XMLflush{textref}}[\XMLop{name}]}
\starttext
\startXMLdata
<section label="intro:mixtureprob">
<title>The problem of the complex protein mixture</title>
<content>
<pageref name="intro:mixtureprob"/>
<textref name="intro:mixtureprob"/>
<pageref name="intro:mixtureprob">page</pageref>
<textref name="intro:mixtureprob">chapter</textref>
</content>
</section>
\stopXMLdata
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
next prev parent reply other threads:[~2006-04-03 8:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-03 0:51 Johannes Graumann
2006-04-03 8:20 ` Taco Hoekwater
2006-04-03 8:43 ` Hans Hagen [this message]
2006-04-03 15:27 ` Johannes Graumann
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=4430E035.8090703@wxs.nl \
--to=pragma@wxs.nl \
--cc=ntg-context@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).