You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Martin Cooper <ma...@tumbleweed.com> on 2002/07/26 03:32:49 UTC

XML resources (was RE: Initialization Question)


> -----Original Message-----
> From: Craig R. McClanahan [mailto:craigmcc@apache.org]
> Sent: Thursday, July 25, 2002 6:07 PM
> To: Struts Users Mailing List
> Subject: Re: Initialization Question
> 

[lots of stuff snipped]

> NOTE:  Someone took a crack at abstracting the message 
> resources stuff out
> of STruts and into a jakarta-commons-sandbox project called 
> "resources",
> like we've extracted other useful things that are not (by themselves)
> Struts dependent.  It would be cool if someone wanted to 
> finish that work,
> including an implementation that reads XML files and an implementation
> that loads resources from a database.

There is a trivial implementation in the sandbox that reads from XML files,
which I added a while ago. It's a rather direct mapping of what's in
properties files, so doesn't add much value in and of itself. Where it can
come in handy is if your messages live in some other XML file, since you can
(presumably fairly easily) transform your existing XML format into the
simple format used by Resources.

At the time, I looked at TMX, but it seemed rather complicated, given what
we would be doing with the result. And I have no idea if this is a format
that people use enough to make it worthwhile adding support for it to
Commons.

So the real question is, what would a "good" XML-based implementation look
like? We know we need to get locales, keys and message text. But do we want
to dictate the XML DTD to be used, or do we want to try to come up with an
implementation that is configurable (probably using XML files :) so that it
can read from arbitrary XML files?

--
Martin Cooper


> 
> > ... I think that's all my questions :-)
> >
> > Thanks,
> >
> > Eddie
> >
> 
> Craig
> 
> 
> --
> To unsubscribe, e-mail:   
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: XML resources (was RE: Initialization Question)

Posted by Eddie Bush <ek...@swbell.net>.
Martin Cooper wrote:

>>-----Original Message-----
>>From: Craig R. McClanahan [mailto:craigmcc@apache.org]
>>Sent: Thursday, July 25, 2002 6:07 PM
>>To: Struts Users Mailing List
>>Subject: Re: Initialization Question
>>
>[lots of stuff snipped]
>
>>NOTE:  Someone took a crack at abstracting the message 
>>resources stuff out
>>of STruts and into a jakarta-commons-sandbox project called 
>>"resources",
>>like we've extracted other useful things that are not (by themselves)
>>Struts dependent.  It would be cool if someone wanted to 
>>finish that work,
>>including an implementation that reads XML files and an implementation
>>that loads resources from a database.
>>
>
>So the real question is, what would a "good" XML-based implementation look
>like? We know we need to get locales, keys and message text. But do we want
>to dictate the XML DTD to be used, or do we want to try to come up with an
>implementation that is configurable (probably using XML files :) so that it
>can read from arbitrary XML files?
>
... yet one more reason I couldn't do an XML implementation - I have no 
clue :-(




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>