Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: ISO_NUM.ent problems ... < and > custom replacements ??

From: "Allan Shearer" <allan@-------.-->
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 &lt; and 
asking it to replace with &lt;&lt;.  Even using literal and other codes, 
e.g., &#60; resulted in the same confusion.

So ... I think I'll just ask the author to give me "10 &lt;&lt; 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     "&#38;#60;">
> <!ENTITY gt     "&#62;">
> <!ENTITY amp    "&#38;#38;">
> <!ENTITY apos   "&#39;">
> <!ENTITY quot   "&#34;">.
> "
>
> Instead you can implement general string replace in your XSLT.
>
> -- 
> Oleg Tkachenko [XML MVP]
> http://blog.tkachenko.com 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent