- This topic has 1 reply, 2 voices, and was last updated 17 years, 7 months ago by Riyad Kalla.
-
AuthorPosts
-
Yves BlouinParticipantI have the following in hstdb0.hibernate.cfg.xml:
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd" [ <!ENTITY common SYSTEM "common.hibernate.cfg.xml"> <!ENTITY connectionUrl "jdbc:oracle:thin:@hst080:1521:hstdb0"> ] > <hibernate-configuration> <session-factory> <!-- properties --> <property name="dialect"> org.hibernate.dialect.OracleDialect </property> <property name="connection.url"> &connectionUrl; </property> <property name="connection.driver_class"> oracle.jdbc.driver.OracleDriver </property> &common; </session-factory> </hibernate-configuration>
Then in common.hibernate.cfg.xml I have the following:
<property name="hbm2ddl.auto">none</property> <property name="show_sql">false</property> <property name="jdbc.batch_size">0</property> <property name="jdbc.use_scrollable_resultsets">false</property> <!-- Default Cache --> <property name="cache.provider_class"> org.hibernate.cache.EhCacheProvider </property> <!-- Use the C3P0 connection pool. --> <property name="c3p0.min_size">1</property> <property name="c3p0.max_size">1</property> <property name="c3p0.timeout">1800</property> <property name="c3p0.max_statements">0</property> <property name="c3p0.idle_test_period">300</property> <property name="c3p0.acquire_increment">1</property> <!-- mapping files --> <mapping resource="com/cfpwood/prup/hibernate/PairupG.hbm.xml" /> <!-- cache settings --> <class-cache class="com.cfpwood.prup.hibernate.PairupG" usage="read-only" />
Because there is no ROOT element for the external entity the XML Editor gives an error at the 2nd tag stating “The markup in the document following the root element must be well-formed”. Is there a way to turn off the XML editor error checking for that single document or set it up so it doesn’t give an error for these types of XML external entities? External XML entities have been around for a very long time so I imagine someone else must have had to deal with this. In other dedicated XML editors like OxygenXML and XMLEditor I don’t have this issue so most likely something similar can be done with the MyEclipse XML Editor and I just don’t know how. Please educate me!
Thanks,
Yves
Riyad KallaMemberIs there a way to turn off the XML editor error checking for that single document or set it up so it doesn’t give an error for these types of XML external entities? External XML entities have been around for a very long time so I imagine someone else must have had to deal with this.
You can right-click on the root of the file, go down to MyEclipse and select “Exclude from Validation”. You will still get warnings in the right-hand column, but they won’t clutter up your problem view.
-
AuthorPosts