Hi I am trying to keep common properties of base class in one location and use XML ENTITY to refer in Nhibernate mapping file.
Mapping file
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE hibernate-mapping [
<!ENTITY BasePropertyList SYSTEM "BasePropertyList.xml">
]>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
assembly="Model" namespace= "Model" default-lazy="false">
<class name="DerivedClass">
&BasePropertyList;
</class>
</hibernate-mapping>
BasePropertyList.xml
<id name="ID" column="ID" type="Int32" unsaved-value="0">
<generator class="native"></generator>
</id>
<property name="CreatedDate" update="false" />
<property name="CreatedBy" update="false" />
<property name="LastModifiedDate" />
<property name="LastModifiedBy" />
I am getting following exception
System.Xml.XmlException : DTD is prohibited in this XML document. at NHibernate.Cfg.Configuration.LogAndThrow(Exception exception)
Am I missing anything here? How DOCTYPE works in Nhibernate mapping file??