export: tilde problems
Hi The following minimal example gives a broken xml: --- \setupinteraction[state=start] \setupbackend[export=test.xml] \starttext \goto{projects.dcs.kcl.ac.uk/~reviczky}[url(http://projects.dcs.kcl.ac.uk/~reviczky/)] \stoptext --- XML Parsing Error: not well-formed Location: file:///home/reviczky/Downloads/test/test.xml Line Number 10, Column 139: The tilde sign has a "A0;" value in the xml, shouldn't that be a "~"? Also the tilde in the "destination=" and "url=" properties for "link" have a space(?) instead. Adam
On Mon, Jun 20, 2011 at 7:22 AM, Reviczky, Adam
Hi
The following minimal example gives a broken xml: --- \setupinteraction[state=start] \setupbackend[export=test.xml] \starttext \goto{projects.dcs.kcl.ac.uk/~reviczky}[url(http://projects.dcs.kcl.ac.uk/~reviczky/)] \stoptext ---
XML Parsing Error: not well-formed Location: file:///home/reviczky/Downloads/test/test.xml Line Number 10, Column 139: This is ok, but it' low level. \setupinteraction[state=start] \setupbackend[export=test.xml] \starttext \bgroup \catcode`\~=11 \goto{projects.dcs.kcl.ac.uk/~reviczky}[url(http://projects.dcs.kcl.ac.uk/~reviczky/)] \egroup \stoptext
The right way should be something like \startcatacodetable <table identifier> \goto{projects.dcs.kcl.ac.uk/~reviczky}[url(http://projects.dcs.kcl.ac.uk/~reviczky/)] \stopcatcodetable but I'n not able to find the right <table identifier>
The tilde sign has a "A0;" value in the xml, shouldn't that be a "~"?
yes, I think so. -- luigi
On 20-6-2011 7:22, Reviczky, Adam wrote:
The tilde sign has a "A0;" value in the xml, shouldn't that be a "~"?
better is
Also the tilde in the "destination=" and "url=" properties for "link" have a space(?) instead.
no, it's the utf character Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
better is
I see, I should've used the \lettertilde instead then, sorry.
no, it's the utf character
So what would be the correct way to do this then? --- \setupinteraction[state=start] \setupbackend[export=test.xml] \starttext \bgroup \catcode`\~=11 \goto{projects.dcs.kcl.ac.uk/\lettertilde reviczky}[url(http://projects.dcs.kcl.ac.uk/~reviczky/)] \egroup \stoptext --- The above solution works (as suggested by luigi), but it doesn't look that good. How can I pass on the tilde in the url without the catcode? Adam
So what would be the correct way to do this then?
Right, so is this ok, or is there a better way? --- \setupinteraction[state=start] \setupbackend[export=test.xml] \starttext \goto{projects.dcs.kcl.ac.uk/\lettertilde reviczky}[url(http://projects.dcs.kcl.ac.uk/\string~reviczky/)] \stoptext --- Adam
On Mon, Jun 20, 2011 at 3:47 PM, Reviczky, Adam
So what would be the correct way to do this then?
Right, so is this ok, or is there a better way?
--- \setupinteraction[state=start] \setupbackend[export=test.xml] \starttext \goto{projects.dcs.kcl.ac.uk/\lettertilde reviczky}[url(http://projects.dcs.kcl.ac.uk/\string~reviczky/)] \stoptext --- at least for simmetry... \setupinteraction[state=start] \setupbackend[export=test.xml] \starttext \goto{projects.dcs.kcl.ac.uk/\string~reviczky}[url(http://projects.dcs.kcl.ac.uk/\string~reviczky/)] \stoptext
-- luigi
On 20-6-2011 3:47, Reviczky, Adam wrote:
So what would be the correct way to do this then?
Right, so is this ok, or is there a better way?
--- \setupinteraction[state=start] \setupbackend[export=test.xml] \starttext \goto{projects.dcs.kcl.ac.uk/\lettertilde reviczky}[url(http://projects.dcs..kcl.ac.uk/\string~reviczky/)] \stoptext
It's a side effect of ~ becoming a utf character for nbsp. I'll change the definition to: \unexpanded\edef~{\utfchar{"00A0}} Then you get this: \goto{a.c.d/~reviczky}[url(http://a.c.d/~reviczky)] \goto{\hyphenatedurl{a.c.d/~reviczky}}[url(http://a.c.d/~reviczky)] Which is what one can expect. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
It's a side effect of ~ becoming a utf character for nbsp. I'll change
Yeah, I completely forgot about that, because it was natural in an url.
the definition to:
\unexpanded\edef~{\utfchar{"00A0}}
Then you get this:
\goto{a.c.d/~reviczky}[url(http://a.c.d/~reviczky)]
\goto{\hyphenatedurl{a.c.d/~reviczky}}[url(http://a.c.d/~reviczky)]
Which is what one can expect.
Cheers. Adam
participants (4)
-
Hans Hagen
-
luigi scarso
-
Reviczky, Adam
-
Wolfgang Schuster