Including entities file in an xml document

Discussion in 'XML' started by chak, May 13, 2004.

  1. chak

    chak Guest

    I'm writting xml documents in french language. So i need to use special
    characters like é and à. For this purpose i use HTML standard entities
    like é.
    But when i open my xml documents with my xml viewer an XML Parsing
    Error(undefined entity) occur. It seems to me quite normal as entity
    like é are not part of xml standard.

    I found on google a file called iso-lat1.ent (part of DocBook project)
    which defined all entities i need.

    But i don't know how to include this file in my xml documents.
    Especially is there a command to import all entities from the file
    rather than importing them one by one.

    Thanks for help.
     
    chak, May 13, 2004
    #1
    1. Advertising

  2. In article <40a3c0d4$0$18320$>,
    chak <> wrote:

    >I found on google a file called iso-lat1.ent (part of DocBook project)
    >which defined all entities i need.


    >But i don't know how to include this file in my xml documents.
    >Especially is there a command to import all entities from the file
    >rather than importing them one by one.


    You could place a copy of the entity file in the same directory as your
    document, then add it to your DTD like this:

    <!ENTITY % lat1 SYSTEM "iso-lat1.ent">
    %lat1;

    If you don't have a DTD, you can just use the internal subset:

    <!DOCTYPE whatever [
    <!ENTITY % lat1 SYSTEM "iso-lat1.ent">
    %lat1;
    ]>

    Better, you can use a PUBLIC declaration, and then systems which support
    XML catalogs and have a local copy will not have to fetch it, but you'll
    have to find the public identifier yourself.

    -- Richard
     
    Richard Tobin, May 13, 2004
    #2
    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. Tony Prichard
    Replies:
    0
    Views:
    736
    Tony Prichard
    Dec 12, 2003
  2. Clive
    Replies:
    1
    Views:
    376
    Peter Flynn
    Aug 21, 2005
  3. Replies:
    4
    Views:
    683
  4. the.computational biologist

    including xml entities with their own doctypes

    the.computational biologist, Jul 21, 2011, in forum: XML
    Replies:
    5
    Views:
    1,281
    Joe Kesselman
    Jul 23, 2011
  5. Jim Higson
    Replies:
    3
    Views:
    224
    Eric Amick
    Jul 25, 2004
Loading...

Share This Page