Schema Central > XML Schema 1.1 > xsd:ENTITY
Advanced search
Need XML Help?

Recommended Reading:

Definitive XML Schema


Web Service Contract Design and Versioning for SOA


Advanced XML Applications



The type xsd:ENTITY represents a reference to an unparsed entity. The xsd:ENTITY type is most often used to include information from another location that is not in XML format, such as graphics. An xsd:ENTITY value must be an NCName. An xsd:ENTITY value carries the additional constraint that it must match the name of an unparsed entity in a document type definition (DTD) for the instance.

Simple Type Information


Schema Document: builtintypes.xsd



The example shows an XML document that links product numbers to pictures of the products. In the schema, the picture element declaration declares an attribute location that has the type xsd:ENTITY. In the instance, each value of the location attribute (in this case, prod557 and prod563) matches the name of an entity declared in the internal DTD subset of the instance.


<xs:element name="picture">
    <xs:attribute name="location" type="xs:ENTITY"/>


<!DOCTYPE catalog SYSTEM "catalog.dtd" [
<!ENTITY prod557 SYSTEM "prod557.jpg" NDATA jpeg>
<!ENTITY prod563 SYSTEM "prod563.jpg" NDATA jpeg>

    <picture location="prod557"/>
    <picture location="prod563"/>

Type Inheritance Chain

Site developed and hosted by Datypic, Inc.

Please report errors or comments about this site to