From: Johannes Graumann <johannes_graumann@web.de>
To: ntg-context@ntg.nl
Subject: Re: XML: mapping definiton on the fly?
Date: Fri, 15 Feb 2008 21:05:02 +0100 [thread overview]
Message-ID: <fp4r9e$944$1@ger.gmane.org> (raw)
In-Reply-To: <fp107c$bqh$1@ger.gmane.org>
Hans,
Can you drop any hints as to whether this is even possible and whether
there's something exemplary around I may meditate about?
Thanks, Joh
Johannes Graumann wrote:
> Dear XML-processing inclined,
>
> I was wondering whether with MarkV it is possible to parse an XML file
> that contains style definitions as well as there usage and create context
> mappings for them on the fly. In the example fragment below this would
> mean:
> - scan the file until hitting the "<office:automatic-styles>" tag
> - analyze the style definition, find it to be
> of family text
> of name T1
> requiring bold fonts
> - construct a context/XML mapping along the lines of
> \startxmlsetups T1
> \bf{\xmlflush{#1}}
> \stopxmlsetups
> - keep on scanning, when hitting the style invocation: use the dynamically
> generated mapping.
>
> Please excuse the hobbyists nomenclature. Thank you for your time and
> insight,
>
> Joh
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> ...
> <office:automatic-styles>
> <style:style
> style:name="T1"
> style:family="text"
> >
> <style:text-properties
> fo:font-weight="bold"
> style:font-weight-asian="bold"
> style:font-weight-complex="bold"
> />
> </style:style>
> </office:automatic-styles>
> <office:body>
> <office:text>
> ...
> <text:p
> text:style-name="Standard"
> >
> Dies <text:span text:style-name="T1">ist</text:span> ein
> Text.
> </text:p>
> </office:text>
> </office:body>
> ...
>
>
___________________________________________________________________________________
> 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
>
___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2008-02-15 20:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-14 9:04 Johannes Graumann
2008-02-15 20:05 ` Johannes Graumann [this message]
2008-02-15 20:47 ` Hans Hagen
2008-02-15 21:45 ` Johannes Graumann
2008-02-15 20:47 ` Hans Hagen
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='fp4r9e$944$1@ger.gmane.org' \
--to=johannes_graumann@web.de \
--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).