Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Including entities file in an xml document

Reply
Thread Tools

Including entities file in an xml document

 
 
chak
Guest
Posts: n/a
 
      05-13-2004
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.
 
Reply With Quote
 
 
 
 
Richard Tobin
Guest
Posts: n/a
 
      05-13-2004
In article <40a3c0d4$0$18320$(E-Mail Removed)>,
chak <(E-Mail Removed)> 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
 
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
including xml entities with their own doctypes the.computational biologist XML 5 07-23-2011 06:08 PM
Including XSLT/XML document within a XSLT document dar_imiro@hotmail.com XML 4 12-13-2005 02:26 AM
Newbie. xml "dynamically" including another xml document Clive XML 1 08-21-2005 08:26 PM
HTML::Entities::encode() returning wrong(?) entities Jim Higson Perl Misc 3 07-25-2004 09:13 PM
Help on including one XML document within another XML document using XML Schemas Tony Prichard XML 0 12-12-2003 03:18 PM



Advertisments