From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/6244 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: xml again Date: Mon, 26 Nov 2001 15:22:30 +0100 Sender: owner-ntg-context@let.uu.nl Message-ID: <5.1.0.14.1.20011126151307.03c6ceb0@server-1> References: <01112417461400.00957@levana> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1035396782 8822 80.91.224.250 (23 Oct 2002 18:13:02 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:13:02 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: Patrick Gundlach In-Reply-To: <01112417461400.00957@levana> Xref: main.gmane.org gmane.comp.tex.context:6244 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:6244 Hi Patrick and Taco, I am currently using the xml stuff (again). It is so great!!! But there is >one little problem: >I have a line like this in my xml file: >[...] > > shortname="tn1051_conic_splines.pdf" refname="tn1051_conic_splines"/> >[...] In your case, making the _ other is ok, but imagine such a thing showing up in normal text. This is why i map 'm on entities. Another reason is that as soon as such animals are written to as file and read in again, tex starts complaining about # and & and maybe some unbalanced {'s, depending on the text used. Now, such funny chars can be either mapped into an entity, or on a fake element (not yet in the distribution, think of something <*name>). One can expand such mapped things under several regimes (more on that in the source). A very simple solution for your problem is: \defineXMLentity [tex-hash] {\letterhash} \defineXMLentity [tex-dollar] {\letterdollar} \defineXMLentity [tex-percent] {\letterpercent} \defineXMLentity [tex-backslash] {\letterbackslash} \defineXMLentity [tex-hat] {\letterhat} \defineXMLentity [tex-underscore] {\letterunderscore} \defineXMLentity [tex-leftbrace] {\letterbgroup} \defineXMLentity [tex-rightbrace] {\letteregroup} \defineXMLentity [tex-bar] {\letterbar} \defineXMLentity [tex-tilde] {\lettertilde} \defineXMLsingular[test][oeps=,whow=,hm=] {\tttf \input \XMLop{oeps} [\XMLop{whow}] [\XMLop{hm}]} \startXMLdata \stopXMLdata Another option is (but i have to think that over first) is to have some fast switching mechanism between text representation and raw chars. Because these things are expandable, you can use them safely in tests and alike. If needed, we can also make an \enablerawXML.. for pure database apps. Btw, the _ is kind of special anyway; i'm thinking of making that one active by default. Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com -------------------------------------------------------------------------