ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matilda Östling <matilda.ostl...@ladok.umu.se>
Subject RE: Including a SqlMapConfig.xml file
Date Wed, 12 Oct 2005 04:57:48 GMT
Hello,

I have tried to include the xml-files using 'ENTITY', but it did not work. 

--------------------
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
    "http://www.ibatis.com/dtd/sql-map-config-2.dtd"> [ 
	<!ENTITY common SYSTEM "relative/path/to/CommonSqlMapConfig.xml"> 
	<!ENTITY someOtherPart SYSTEM "relative/path/to/sop.xml"> 
]> 

<!-- Keep the root structure in the main file --> 
<sqlmapconfig> 
  <!-- Include the contents of the common file like this --> 
  &common; 
</sqlmapconfig> 
--------------------


I have also tried to use:
...
<!ENTITY SB01 SYSTEM "file:../maps/sop.xml">
...
But then the path to the xml-file must be absolute and that is not a
solution since the application will be run at different machines...

I would really appreciate help in this matter!
Best regards
/Matilda


-----Original Message-----
From: Daniel Henrique Ferreira e Silva [mailto:dhsilva@gmail.com] 
Sent: den 11 oktober 2005 16:11
To: user-java@ibatis.apache.org
Subject: Re: Including a SqlMapConfig.xml file

Hi Matilda,

That's because you're using a sqlMap tag to include a config file.
That won't work afaik.
Not sure there is a way to do that within iBATIS.
But you can try xml includes. I guess they'd work fine.

Hope that helped.

Cheers,
Daniel Silva.



On 10/11/05, Matilda Östling <matilda.ostling@ladok.umu.se> wrote:
> Hi,
> I have a little problem. How do I include a SqlMapConfig-file into another
> SqlMapConfig-file. In our project we have a file called
> CommonSqlMapConfig.xml which we would like to include in all other more
> specific xml-files.
>
> I have tried
> <sqlMap resource="se/ladok/batch/common/maps/CommonSqlMapConfig.xml"/>
> I do not get an errormessage while building the project but when running
the
> application the included xml-files in CommonSqlMapConfig.xml are not
found.
>
> Thanks in advance!
> Best regards
> /Matilda
>
>
>



Mime
View raw message