[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: OT: Schemas and entities
Nathan Shaw wrote: > I am working on converting our DTDs to W3C Schemas. I > have read quite a bit about how entities are not > supported by schemas, but I am still a bit confused by > it. I understand that character replacement entities > that have to be defined in the DTD (such as nbsp;, > amp;, etc...) are not supported, but if I use an ASCII > numerical replacement entity (such as 160;, 38;, > etc...) is that ok? Do numerical entities such as > those work in both elements and attributes with > schemas? The things you call "numerical entities" are called "character references" in the spec http://www.w3.org/TR/REC-xml#dt-charref These are used for putting arbitrary Unicode characters into documents regardless whether they can be expressed in the document encoding or not. There is no such a thing as "character replacement entities", although an entity may be defined as a single character. This is nothing more than a special case. Entities must be declared in DTDs, according to the spec, with the exception of a few predefined entities: http://www.w3.org/TR/REC-xml#sec-predefined-ent If you don't use a DTD, you can't use any entity other than the predefined entities, but you can use character references without restriction (becuase they don't need a definition). This is regardless whether you use a schema or not. HTH J.Pietschmann
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|