Using Doctype in Nhibernate
Posted
by sukh
on Stack Overflow
See other posts from Stack Overflow
or by sukh
Published on 2010-02-08T21:04:42Z
Indexed on
2010/03/28
0:03 UTC
Read the original article
Hit count: 476
nhibernate
|doctype
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??
© Stack Overflow or respective owner