*** WARNING: XML question ***
*** WARNING: Long post ***
Hi,
I was exploring ways to organize tiles-config.xml
into multiple smaller files. The simple approach I
am taking (well... trying to) is to have one main
file and use XML entity references to the smaller
parts.
So that I have one main tiles-config as:
tiles-config-main.xml
which defines my "super-definitions" from which my
other <definition>s "extend".
The actual definitions are put in multiple files
(sort of based on modules, but we are not using
struts modules).
So that I have files like:
tiles-config-a.xmlf
tiles-config-b.xmlf
which I amd trying to include in the main file as:
-------------------------------------------------------
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration//EN"
"http://struts.apache.org/dtds/tiles-config_1_1.dtd"
[
<!ENTITY a-config SYSTEM "tiles-config-a.xmlf" >
<!ENTITY b-config SYSTEM "tiles-config-b.xmlf" >
]>
<tiles-definitions>
<!-- super definitions go here -->
.
.
<!-- 'import' definitions from fractional xml files
that have series of <definition> tags
-->
&a-config;
&b-config;
</tiles-definitions>
-------------------------------------------------------
The problem I am having is getting JBoss3.2 to resolve
the entity reference at startup without having to give
and absolute file path. With the path specified as above,
JBoss tries to look for
"d:\jboss-3.2.6\bin\tiles-config-a.xmlf"
^^^^^^^^^^^^^^__ my JBOSS_HOME directory
Clearly, the part that needs to change is the ENTITY
declaration, but I have tried few possiblities and it
just doesnt seem to work.
Other ways I have tried to so far:
<!ENTITY a-config SYSTEM "file:tiles-config-a.xmlf" >
&
<!ENTITY a-config SYSTEM "tiles-config-a.xmlf" NDATA tiles-a >
Any ideas/suggestions? How do others organize large
tiles-config.xml files?
Thanks,
~ amol
|