commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Kersten" <Martin.Kers...@Student.Uni-Magdeburg.DE>
Subject Re: [Digester 1.5] Pattern matching screwed me up
Date Sun, 29 Feb 2004 08:16:39 GMT
Hi Simon,

> >   after I've tried for hours to get my simple XML shema working
> > (due to bad documentation if you ask me). I nearly give up.
> Ummm .. you aren't likely to win many friends on this list with comments
> like that. You're asking for help, yet criticising the *volunteers* who
> wrote the software for not putting enough of their *unpaid* time into
> the project?
> I'm not sure why I'm answering this at all...

Well I fooled around with digester for about four hours ( also taking some
breaks to meditate to not get angry and reestablish selfcontrol).
Imagen looking around the internet and being not able to solve this problem.

The documentation is not that big problem. It was simple not accessible the
way I am used to. There wasn't even an getting started or basic tutorial
to go on. (ok ok some at ibm and stuff but it didn't covered the issus I am
tried to solve).

So bad means, it was not obvious where to look at, where to find a tutorial
which explains some details about the pattern. But after some wondering,
where the offical documentation is, I guessed there may be informations
hidden in the api documentation (easy but unusal guess, but there wasn't
any more then the api doc (no getting started guide nothing)). The
documentation is just not accessable at first glance. And it was of cause
lagging the informations I would have needed.

> > Crazy. It seams I've missed an important information. Can someone
> > shade some light? I dont want to blaim digester but I am trying
> > for hours. I wanted to save time but who could know that
> > digester hates tags containing itself. (anyone like trees?).
> > I can not imagen that simple trees are beyond the caps of digester.
> >  So I am thinking the fault is just on my side.
> >
> > So please, tell me what am I doing wrong?!
> > PS: Tried for more then four hours fooling around with test cases,
> > for the internet and debugging the digester api. I am just a little,
well lets
> > call it disapointed... .
> You want the following behaviour:
> * For an "a" element at the top level, create an object but don't try to
> add it to a parent object.
> * For "a" elements elsewhere, create an object and add it to a parent
> object.
> * For "b" elements elsewhere, create an object and add it to a parent
> object.
> So I think this should do:
> digester.addObjectCreate("a",A.class);
> digester.addObjectCreate("*/a",A.class);
> digester.addSetNext("*/a","add");
> digester.addObjectCreate("*/b",B.class);
> digester.addSetNext("*/b","addB");
> Note that because pattern "a" overrides pattern "*/a", digester doesn't
> (wrongly) try to call "add" for the top-level "a" element.
Yeah thats what I have needed. I didn't thought about using "addXX" on
A and B. (the orginal problem). Now I have to alter my test cases to avoid
setProperties for the pattern */a and a. I think I can handle that.

> And when you're done, feel free to write a user manual and submit it for
> inclusion into the project...
My english isn't that good. But I can provide some concepts and if someone
would like to play an English teacher and correct my bumpy english, I am
we can improve the situation about the first contact on digester.

Here is what I would like to do:

1. Write a getting-started.html put into the docs directory telling people
to look for the 'orginal' documentation (link to the package description).
2. Write a tutorial teaching the pattern matching and xml-parts mapping.

I guess it would take me additional 4 hours. But I would likely to
contribute that
peaces. But again, I need a person who's playing the English teacher.

Bye the way,

Thanks for the help, it seams to work now and I am going to alter my test
to avoid top-level attributes containing itself and adding an interface for
(cause this function is called within two tags).


Martin (Kersten)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message