<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.org/"> <xs:element name="entity" type="xs:ENTITY" /> </xs:schema>
An XML instance that defines and uses an entity 'eg' is as follows:
<?xml version="1.0"?> <!DOCTYPE example [ <!ELEMENT entity (#PCDATA)> <!ATTLIST entity xmlns CDATA #IMPLIED xmlns:xsi CDATA #IMPLIED xsi:schemaLocation CDATA #IMPLIED> <!ENTITY eg "http://example.com/"> ]> <entity xmlns="http://example.org/">eg</entity>
The rdf:XMLLiteral type is used in conjunction with the 'Literal' parseType of the rdf/xml serialization. The base is http://example.org/base.
<?xml version="1.0" encoding="windows-1252"?> <rdf:RDF xmlns:ns1="http://example.org/def/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ns2="http://example.org/" xmlns:xs_="http://www.w3.org/2001/XMLSchema#" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <rdf:Description rdf:about=""> <ns2:entity rdf:parseType="Literal">http://example.com/</ns2:entity> </rdf:Description> </rdf:RDF>