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] Namespace aware wildcard mathing
Date Wed, 24 Sep 2003 00:51:56 GMT
Hmm.. looks to me like it should work.

If you post a runnable example, I would be willing to have a look.

You could also turn up digester logging, and see if you can spot the
problem yourself. Placing the following two files in the classpath
should do the trick:

filename: commons-logging.properties

org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog

filename: simplelog.properties
 org.apache.commons.logging.simplelog.defaultlog=debug 

This will turn on debug-level logging inside the Digester, resulting in
plenty of diagnostic output...

Regards,

Simon

On Wed, 2003-09-24 at 02:22, Vilmantas Baranauskas wrote:
> Hello,
> 
> I have a following situation using Digester. There is an XML file with 
> two namespaces, e.g.:
> <s:search>
>    <f:form>
>      <f:field />
>      <f:field />
>    </f:form>
> </s:search>
> 
> I have such RuleSet with correct namespace for prefix "f:".
>    digester.addFactoryCreate("*/form", new FormCreator());
>    digester.addFactoryCreate("*/field", new FieldCreator());
> 
> Such wildcard matching doesn't match "field" element unless I specify it 
>   together with "form" element like this:
>    digester.addFactoryCreate("*/form", new FormCreator());
>    digester.addFactoryCreate("*/form/field", new FieldCreator());
> 
> There was one mail on 18 Sep 2003 explaining that:
> ------------------
> digester.setNamespaceUri("http://acme.com";);
> digester.addObjectCreate("foo/bar/baz", ...)
> 
> means that the pattern will match:
> * a baz element in the acme.com namespace ONLY, when inside
> * a bar element in any namespace or no namespace, when inside
> * a foo element in any namespace or no namespace.
> ------------------
> 
> So if it is like this, what is wrong in my case?
> 
> BTW, I use digester 1.5.
> 
> Thanks a lot!
> Vilmantas
> 


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