From: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: processing xml in mkiv
Date: Sun, 16 Mar 2008 14:40:38 +0100 [thread overview]
Message-ID: <DA084D0B-9297-4FFC-919E-DD10186F1548@uni-bonn.de> (raw)
In-Reply-To: <20080316135106.75223e86.schuster.wolfgang@googlemail.com>
On Mar 16, 2008, at 1:51 PM, Wolfgang Schuster wrote:
>>
> This seems like a bug to me. This did only happen with the content in
> the first line because I inserted a empty first line at the begin of
> the line the xml header disappeared from the pdf, could be related to
> a wrong catcode for the "<" at the beginning of the line.
>
OK, then this is a bug. The declaration has to be on the first line,
my editor (emacs in nxml mode) doesn't even let me save the file when
I introduce a first blank line before it.
>>>> \xmlprocess{main}{filename.xml}{} works for me.
Yes, but that would mean you need an environment for every xml file
you want to process. I have now tried
\xmlprocess{main}{\inputfilename}{}
and this seems to work.
>> \startxmlsetups xml:section
>> \section{\xmlatt{#1}{section}{title}}
>> \stopxmlsetups
>
> \startxmlsetups xml:section
> \section{\xmlatt{#1}{section}{title}}
> \xmlflush{#1}
> \stopxmlsetups
Thanks! I experimented a bit more; I think it has to be
\startxmlsetups xml:section
\section{\xmlatt{#1}{title}}
\xmlflush{#1}
\stopxmlsetups
(at least, this seems to work for me...)
>
>
>> \starttext
>> \xmlprocess{main}{test.xml}{}
>> \stoptext
>>
>> But then, I only get "invalid xml file" in the output.
>
> Remove the DOCDATA definition from your xml file, seems the parser has
> problems with "<>" pairs inside of the DOCDATA definition.
>
> The following line give me a pdf file
>
> <!DOCTYPE document [
> <!ELEMENT section (p)
> ]>
Hmm, but this isn't valid xml?
>
> but the next one
>
> <!DOCTYPE document [
> <!ELEMENT section (p)>
> ]>
Whereas this is valid and processed without problems by mkii?
Hmm, either mkiv xml handling is still a bit immature, or I'm not
mature enough to use it yet :-)
Thanks a lot, Wolfgang!
Best
Thomas
___________________________________________________________________________________
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-03-16 13:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-16 10:29 Thomas A. Schmitz
2008-03-16 11:04 ` Wolfgang Schuster
2008-03-16 12:00 ` Thomas A. Schmitz
2008-03-16 12:51 ` Wolfgang Schuster
2008-03-16 13:40 ` Thomas A. Schmitz [this message]
2008-03-16 13:56 ` Wolfgang Schuster
2008-03-16 17:16 ` Hans Hagen
2008-03-17 6:36 ` Thomas A. Schmitz
2008-03-17 13:04 ` Taco Hoekwater
2008-03-18 15:59 ` Thomas A. Schmitz
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=DA084D0B-9297-4FFC-919E-DD10186F1548@uni-bonn.de \
--to=thomas.schmitz@uni-bonn.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).