Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: ISO_NUM.ent problems ... < and > custom replacements ?? [Thread Next] Re: ISO_NUM.ent problems ... < and > custom replacements ??To: NULL Date: 11/8/2004 1:58:00 PM Thanks Oleg I feared as much ... and glad to see that I wasn't missing something obvious. I tried (just now) doing a string translation ... but since I'm wanting to replace < with << and > with >> .... I found it rather difficult to understand what all was happening. After all ... I was looking for < and asking it to replace with <<. Even using literal and other codes, e.g., < resulted in the same confusion. So ... I think I'll just ask the author to give me "10 << 100" when they want "10 < 100". This way I don't have to worry about tranformation errors. Thanks Oleg. Yours, Allan "Oleg Tkachenko [MVP]" <oleg@NO!SPAM!PLEASEtkachenko.com> wrote in message news:eqFGzrLxEHA.3072@T...... > Allan Shearer wrote: > >> I'm struggling with trying to define custom replacements for the 'lt' and >> 'gt' predefined entities in the ISO_NUM.ent file. > > I don't think you can override predefined XML entirties. Here is what XML > spec says: > > "All XML processors MUST recognize these entities whether they are > declared or not. For interoperability, valid XML documents SHOULD declare > these entities, like any others, before using them. If the entities lt or > amp are declared, they MUST be declared as internal entities whose > replacement text is a character reference to the respective character > (less-than sign or ampersand) being escaped; the double escaping is > REQUIRED for these entities so that references to them produce a > well-formed result. If the entities gt, apos, or quot are declared, they > MUST be declared as internal entities whose replacement text is the single > character being escaped (or a character reference to that character; the > double escaping here is OPTIONAL but harmless). For example: > > <!ENTITY lt "&#60;"> > <!ENTITY gt ">"> > <!ENTITY amp "&#38;"> > <!ENTITY apos "'"> > <!ENTITY quot """>. > " > > Instead you can implement general string replace in your XSLT. > > -- > Oleg Tkachenko [XML MVP] > http://blog.tkachenko.com | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
