HTML character entities in XML files

Phil Heron Phil.Heron at CODA.com
Mon Jan 9 06:57:50 PST 2006


Mark,

In answer to your question about character entities in xml files, here
are two solutions to your problem:

1. Easy solution:
If you only want to use one or two character entities, add the
definitions to your DTD. For a non-breaking space, add a line such as
the following to your DTD:

<!ENTITY nbsp	"&#x00A0;"> <!-- NO-BREAK SPACE -->

2. More flexible solution

To use entity definitions stored in a file with structured Frame you
will need 3 things:

1. The file(s) storing the entity definitions.
2. A reference to the entity definitions in the DTD
3. A reference to the location of the entity definition file(s) in the
strctured application definition document.

Take a look at the example structured applications supplied with Frame
to see how this works. 

Frame XHTML structured application
-----------------
- The entity definitions are stored in 3 files in the
structure\xml\xhtml\app directory. You can find   in
xhtml-lat1.ent.
- The entity definitions are referenced in the DTD (called "dtd" in this
case).
- Entity locations are specified in structapps.fm in the "Entity
locations" element.

Frame xDocBook structured application
-----------------
- The entity definitions are stored in the .ent files in the
structure\xml\isoents directory. You can find   in iso-num.ent.
- The entity definitions are referenced in the DocBook XML Character
Entities module of the DTD (in the file called "dbcentx.mod" in this
case).
- Entity locations are specified in structapps.fm in the "Entity
locations" element.

NB: If you want to open xml files based on the Frame XHTML or xDocBook
DTDs in an xml editor such as XMetaL, you need to specify the entity
file locations in the DTD.

Hope this is not too incomprehensible,

Phil Heron
Technical Writer - CODA
www.coda.com

-----Original Message-----
From: owner-framers at omsys.com [mailto:owner-framers at omsys.com] On Behalf
Of Mark Barratt
Sent: 09 January 2006 11:15
To: FrameSGML at yahoogroups.com; Free Framers
Subject: HTML character entities in XML files

I have a contributor who sends me XML files containing HTML character
entities - particularly  , but also some others. (it's a byproduct
of his editing software)

These are not recognised by my XML Frame application. I have #include
"isoall.rw" in my rules file, but note that nbsp isn't among the
entities in any of the iso files.

Ideas on the simplest/cleanest way to deal with this?

--
Mark Barratt
Text Matters

Information design: we help explain things using language | design |
systems | process improvement
______________________________________________________
phone +44 (0)118 986 8313  email markb at textmatters.com web
http://www.textmatters.com


** To unsubscribe, send a message to majordomo at omsys.com **
** with "unsubscribe framers" (no quotes) in the body.   **


CODA Wins 5th Accountancy Age Award in 5 Years
For details visit www.coda.com/winners <http://www.coda.com/winners>


The information in this message is confidential and may be legally privileged. It may not be disclosed to, or used by, anyone other than the addressee. If you receive this message in error, please advise us immediately.  Internet emails are not necessarily secure. CODA does not accept responsibility for changes to any email which occur after the email has been sent. Attachments to this email may contain software viruses, which could damage your systems. CODA has checked the attachments for viruses before sending, but you should virus-check them before opening.	




More information about the framers mailing list