cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neeme Praks" <ne...@one.lv>
Subject RE: XMLResourceBundle
Date Sun, 25 Jun 2000 20:16:33 GMT

> -----Original Message-----
> From: Niclas Hedhman [mailto:niclas@localbar.com]
> Sent: Friday, June 23, 2000 12:48 PM
> 
> I would like to offer an alternative layout for using XML 
> Resource strings, which would allow for a DTD.
> 
> Using Mike's example;

[snip]

> and sample usage:
> System.out.println(bundle.getString("/resources/forms/form[@id
> ='contacts-search']/labels/label[@id='from-mycontacts']"));
> 
> Not nearly as elegant, I most certainly agree.
> Advantage. A fixed DTD!!! No changes to the DTD when the 
> resources are updated.

A disadvantage: no easy way to enforce that the translated file contains
the same information as the original file. In the previous case you
could simply generate a DTD or XSchema from the original and check
against that. Then you can at least be sure that the structure is the
same...

But it doesn't matter for Mike, the XPath expression is universal...
just your own implementation concern.

Neeme

Mime
View raw message