Salvete, trying to typeset an unchanged old file with a more recent ConTeXt version, I keep running into problems. I have reduced the first of these (others may or may not be symptoms of the same, I'll see that later) to this input: \starttext \startXML <a>a::b</a> \stopXML \stoptext It seems the xml parser does something special with colons in the content of elements. I don't think it should and this is probably just a left-over from looking for xml namespaces, but that is just a guess. Regards, Christopher
Christopher Creutzig wrote:
\starttext \startXML <a>a::b</a> \stopXML \stoptext
The problem is the \setpretty`\:=10 in \XMLsetspecials in verb-xml.tex. This should only be done inside <...>. Suggested patch (I hope it survives being sent by mail): --- verb-xml.tex.orig 2007-07-11 11:08:45.000000000 +0200 +++ verb-xml.tex 2007-07-11 11:26:59.000000000 +0200 @@ -108,12 +108,13 @@ \setpretty`\(=30 \setpretty`\)=30 \setpretty`\,=30 \setpretty`\*=30 \setpretty`\+=30 \setpretty`\#=30 % \setpretty`\:=30 - \setpretty`\:=10 % better for tags + \setpretty`\:=18 % better for tags \setpretty`\&=41 \setpretty`\;=42 } \gdef\XMLsethandlers% {\installprettyhandler 17 \XMLnormal \installprettyhandler 10 \XMLwhattag + \installprettyhandler 18 \XMLmaybewhattag \installprettyhandler 11 \XMLstoptag \installprettyhandler 12 \XMLtypeonetwo \installprettyhandler 13 \XMLtypeonethree @@ -142,7 +143,15 @@ \gdef\XMLnormal#1{\getpretty{#1}} \gdef\XMLwhattag% - {\handlenextnextpretty\XMLdowhattag\XMLstarttag} + {\handlenextnextpretty\XMLdowhattag\XMLstarttag}% + +% For :, use \XMLwhattag inside tag names, \XMLnormal otherwise +\gdef\XMLmaybewhattag% + {\ifinXMLtagname + \expandafter\XMLwhattag + \else + \expandafter\getpretty + \fi} \gdef\XMLdowhattag#1#2% {\ifinXMLcomment
participants (1)
-
Christopher Creutzig