commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Zarco <david.za...@rbcdexia-is.es>
Subject Re: Custom XML Rule Creation from Digester
Date Thu, 12 Apr 2007 10:06:17 GMT
Hi Simon,

thanks for you answer.

This solution was raised, but wasn't accepted well by software engineer 
and then, we began to find alternative solutions.

If there isn't possible other solution, we will have to implement this 
aproach.

Thanks you again.

Regards,
David

Simon Kitching wrote:
> Hi David,
>
> On Tue, 2007-04-10 at 10:44 +0200, David Zarco wrote:
>   
>> We're trying to create a custom rule which will be used by Digester. We
>> follow the steps indicated in
>> http://jakarta.apache.org/commons/digester/commons-digester-1.8/docs/api/
>>     
>
>
>   
>> but we had a problem with the inner class PatternRule of
>> DigesterRuleParser. We overrided addRuleInstances(Digester digester)
>> method but there was a compilation error because PatternRule is a
>> private class
>>     
>
>
> I haven't tried to do this myself; I prefer to use Digester via its API
> rather than the xmlrules stuff. However from a look at the code I think
> it's not a major problem.
>
> I agree that PatternRule probably should not be private, so that it can
> be reused. However it is a trivial class so I suggest you just
> copy-and-paste it into your DigesterRuleParser subclass. Rename it to
> something like MyPatternRule and then everything should be ok as far as
> I can see.
>
>
> All the PatternRule class is doing is pushing an object onto the
> enclosing DigesterRuleParser instances' patternStack, and that *is*
> protected scope so you do have access. I don't believe it matters
> whether it is the original PatternRule or some variant that you create
> that modifies the patternStack. And I think using "PatternRule" is
> optional anyway; it only allows you to have a "pattern" attribute in
> your new tag. As a pattern can also be defined via an enclosing pattern
> element this is just a "nice-to-have".
>
>
>   
>> Note: I'm sorry for my english
>>     
>
> No problem. I'm struggling to learn German at the moment so have plenty
> of sympathy for anyone struggling with a foreign language :-)
>
> Regards,
>
> Simon
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
>   


-- 

Un saludo,
David



CAMBIO de DIRECCIONES de CORREO-E
Rogamos actualice su agenda de direcciones de correo electrónico. Todas las
direcciones de correo del dominio "@bancoval.es" cambian a "@rbcdexia-is.es"

E-MAIL ADDRESSES are CHANGING
Be advised that all the e-mail addresses from the domain "@bancoval.es"
are changing to "@rbcdexia-is.es".Please update your e-mail addresses.

AVISO LEGAL
Este mensaje de correo electrónico y sus documentos adjuntos están dirigidos
exclusivamente a los destinatarios especificados. Puede contener información
confidencial o legalmente protegida. No hay renuncia a la confidencialidad o
privilegio por cualquier transmisión errónea. Si usted no es el destinatario
indicado, le rogamos que lo elimine y se lo comunique al remitente. No debe,
directa o indirectamente, usar, revelar, distribuir, imprimir o copiar 
ninguna de las partes de este mensaje. Si siendo destinatario de este 
mensaje no consintiera el uso de correo electrónico, rogamos nos lo 
comunique inmediatamente.
RBCDexia Investor Services E,S.A. y sus filiales no serán responsables de las
opiniones o informaciones incluidas en este mensaje salvo cuando el remitente esté 
autorizado para establecer que dichas opiniones proceden de RBCDexia Investor
Services ,S.A.  y sus filiales.

DISCLAIMER
Addressee/s identified herein. It may contain confidential or legally 
privileged information. No confidentiality privilege is waived or lost
by any mistransmission. If you are not the intended recipient, please
immediately delete it and notify the sender. You must not, directly or
indirectly, disclose, distribute, print, or copy any part of this message.
If you are the addressee of this message and do not consent to the use of
e-mail, please communicate it to us immediately. RBCDexia Investor Services
S.A. and its subsidiaries are not responsible for the opinions or information
included in this message except when the sender is authorised to state them to
 be the views of RBCDexia Investor Services, S.A. and its subsidiaries.

---------------------------------------------------------------------
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