Bugs item #611445, was opened at 2002-09-18 23:24
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=611445&group_id=16035
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Possible Problem in DispatchHandler
Initial Comment:
There seems to be a problem when DispatchHandler is
executed more than once:
The following code sets the path as it receives the
onStart element.
public void onStart(ElementPath elementPath) {
[...]
if (atRoot)
{
path = path + element.getName();
atRoot = false;
}
else
{
path = path + "/" + element.getName();
}
[...]
}
The path is built depending on the atRoot.
So the first time the path would be "/{elementName}"
but the atRoot value is never set to true again, so, the
next time this class is used execution, the path is
"//{elementName}"
This causes a problem with the registered
ElementHandlers because the match will not be fit.
I think a possible solution would be:
public void onEnd(ElementPath elementPath)
{
[...]
if (pathStack.size() == 0) {
atRoot = true;
}
[...]
}
Ricardo Leon
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=611445&group_id=16035
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-dev