commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <si...@ecnetwork.co.nz>
Subject Re: [digester] how to make use of xml:lang?
Date Mon, 20 Oct 2003 21:28:59 GMT
On Tue, 2003-10-21 at 22:57, Simon Kitching wrote:
> Hi Ricky,
> 

Doh! I wasn't thinking so clearly..the suggestion below is complete
rubbish :-)

> Implementing such a Rules class would be non-trivial, though. As a
> simpler solution along the same lines, how about writing a LangRules
> class which extends BaseRules (or whichever), and has a match method
> like:
>   List matches = super.match(...)
>   for each rule in matches
>   {
>     if xml:lang exists, 
>        and the attribute value is not the desired language
>     {
>       remove the element from the match list
>     }
>   }

In order to match on the xml:lang attribute of an element in a Rules
object, you would need access to the element's attributes. And currently
Digester doesn't provide that info.

I still think that the Rules object is the correct place to do this sort
of matching but it obviously won't be that simple.

Regards,

Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message