predefined entity set for spanish

Discussion in 'XML' started by poisondart, May 2, 2005.

  1. poisondart

    poisondart Guest

    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!
    poisondart, May 2, 2005
    #1
    1. Advertising

  2. "poisondart" <> 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
    David Carlisle, May 3, 2005
    #2
    1. Advertising

  3. "poisondart" <> 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 ( 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/
    Jukka K. Korpela, May 3, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    813
  2. Samuel van Laere

    Entity Name or Entity Number?

    Samuel van Laere, Feb 24, 2007, in forum: HTML
    Replies:
    4
    Views:
    1,624
    Jukka K. Korpela
    Feb 24, 2007
  3. markla
    Replies:
    1
    Views:
    541
    Steven Cheng
    Oct 6, 2008
  4. Norm
    Replies:
    3
    Views:
    2,708
  5. ThatsIT.net.au

    Entity, problem with entity key

    ThatsIT.net.au, Sep 6, 2009, in forum: ASP .Net
    Replies:
    1
    Views:
    1,195
    ThatsIT.net.au
    Sep 7, 2009
Loading...

Share This Page