* :: in xml?
@ 2007-07-10 9:40 Christopher Creutzig
2007-07-11 9:29 ` Christopher Creutzig
0 siblings, 1 reply; 2+ messages in thread
From: Christopher Creutzig @ 2007-07-10 9:40 UTC (permalink / raw)
To: ConTeXt Mailingliste
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: :: in xml?
2007-07-10 9:40 :: in xml? Christopher Creutzig
@ 2007-07-11 9:29 ` Christopher Creutzig
0 siblings, 0 replies; 2+ messages in thread
From: Christopher Creutzig @ 2007-07-11 9:29 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-11 9:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-10 9:40 :: in xml? Christopher Creutzig
2007-07-11 9:29 ` Christopher Creutzig
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).