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 : [email protected] / 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
___________________________________________________________________________________

Reply via email to