Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > predefined entity set for spanish

Reply
Thread Tools

predefined entity set for spanish

 
 
poisondart
Guest
Posts: n/a
 
      05-02-2005
Is there a predefined entity set for Spanish accents? I know that I
could just easily make one, except that I intend to do this for other
languages in the future, which may have more accents than Spanish.

The closest to what I was expecting was this link:
http://www.altheim.com/specs/charents.html

....but the link to the ent file is broken.

What is the usual/preferred method that you employ to render special
characters? I'm trying NOT to reinvent the wheel.

Thanks!

 
Reply With Quote
 
 
 
 
David Carlisle
Guest
Posts: n/a
 
      05-02-2005
"poisondart" <(E-Mail Removed)> writes:

> Is there a predefined entity set for Spanish accents? I know that I
> could just easily make one, except that I intend to do this for other
> languages in the future, which may have more accents than Spanish.
>
> The closest to what I was expecting was this link:
> http://www.altheim.com/specs/charents.html
>
> ...but the link to the ent file is broken.
>
> What is the usual/preferred method that you employ to render special
> characters? I'm trying NOT to reinvent the wheel.
>
> Thanks!


You don't need to use entities for (any) characters in XML, you can just
type the characters directly so long as the encoding used in the file is
declared (or you use the default utf8 or utf16 encodings) However if
you want entity sets for latin1 then there is a set available from
http://www.w3.org/2003/entities that you could use.

David

 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      05-03-2005
"poisondart" <(E-Mail Removed)> wrote:

> Is there a predefined entity set for Spanish accents?


No. Unlike HTML, XML has predefined entities for very few characters
only ("markup-significant" characters like "<").

> I know that I
> could just easily make one, except that I intend to do this for other
> languages in the future, which may have more accents than Spanish.


The entities for Latin-1 characters as defined in HTML cover the
accented characters of Spanish and a lot more. Their names have been
taken from the SGML standard, and there's little reason to invent your
own names for them instead - even though many of the names are just
half-mnemonic, or even misleading. The SGML standard also lists many
other entities for characters, and there's a pattern in the naming of
accented characters.

> What is the usual/preferred method that you employ to render special
> characters? I'm trying NOT to reinvent the wheel.


XML is based on Unicode (formally, ISO 10646) as regards to characters,
and in that sense there are just characters, not special characters.
So this is probably basically an authoring tool problem. Surely you
would like to write and see all characters as such, not as entity
references?

If you think you cannot use all characters as such due to some
restrictions that apply to data transfer or processing - in this case,
that would seem to me that some external obstacle forces you to use
ASCII characters only in an XML file or datastream - then you can
hopefully find a way to do a suitable conversion _upon sending_
your XML somewhere. That is, you would work with UTF-8 and a Unicode-
capable editor but convert the data to a more primitive form for
sending over some connection or to some program. In that case, I would
suggest using character references (&#xN; where N is the Unicode number
of the character) rather than entities. No need to invent or find names
then, and no fear of incorrect processing on an XML processor that does
not read your entity declarations.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Entity Framework - Reassigning child entity's parent Norm ASP .Net 3 07-06-2009 07:28 PM
How to relate a SQL based entity with an Object based entity in Entity Framework markla ASP .Net 1 10-06-2008 09:42 AM
dictionary spanish-english/english spanish Ant1 Computer Support 2 12-15-2007 08:57 PM
Entity Name or Entity Number? Samuel van Laere HTML 4 02-24-2007 10:11 PM
Spanish Vista or Spanish MUI? =?Utf-8?B?Q2FybG9z?= Windows 64bit 4 09-07-2006 02:37 AM



Advertisments