[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: OT: Schemas and entities


nbsp amp entity
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.