OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] OT: Schemas and entities

[ Lists Home | Date Index | Thread Index ]

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





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS