forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject Re: forrest.properties vs forrest.properties.xml
Date Fri, 22 Feb 2008 10:57:48 GMT
Thorsten Scherler wrote:
> On Thu, 2008-02-21 at 20:37 +1100, David Crossley wrote:
>> Thorsten Scherler wrote:
>>> Thorsten Scherler wrote:
>>>
>>> Actually doing a wee bit research I wonder why we are not using the
>>> properties dtd from sun:
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
>>> <properties>
>>>     <entry key="plugin.TestPlugin">com.plugin.test.TestPluginModule</entry>
>>>     <entry key="messages.TestPlugin">TestPluginMessages.properties</entry>
>>> </properties>
>>>
>>> This has the benefit to do a
>>> Properties properties = new Properties();
>>> try {
>>>     InputStream xmlStream = getClass().getResourceAsStream("forrest.properties.xml");
>>>     if( xmlStream == null ) {
>>>          //throw some error
>>>     }            
>>>     properties.loadFromXML(xmlStream);
>>> } catch (IOException exception) {
>>>     // throw exception
>>> }
>> Sure.
> 
> Hmm, I think that is not that easy though since there is code that is
> using our custom dtd. 
> 
> Maybe Ross (as I can recall the first in using it) can tell us why we
> did not used the java one.

I didn't use it as I needed a quick fix for an immediate problem in a 
plugin. I did not do research into the best approach, at the time I said 
we need to explore the options before making it default.

You are doing this now (thanks).

In other words, do anything you want to make it happen, I'm not aware of 
any gotchas.

Thanks,
Ross

Mime
View raw message