hi,
i have figured out how to extend xerces2 xni to pass event position information about
start tag and end
tag positioning parsed entity. however this requires adding
getCurrentEntityAbsoluteOffset to
XMLLocator (see my previous email with this patch).
i do it by extending QName with PositionedQName that extends QName with positioning
information.
PositionedQName is passed to start and end element handlers and then passed to XNI
user handlers. and
in the handler i can do this:
public void startElement(QName element, XMLAttributes attributes)
throws XNIException
{
if(element instanceof PositionedQName) {
PositionedQName pqname = (PositionedQName) element;
eventStart = pqname.posAbsoluteStart;
eventEnd = pqname.posAbsoluteEnd;
}
this change would have also no impact on performance however i wonder if there is more
general
mechanism to enhance pipeline with more context information?
thanks,
alek
PositionedQName.java
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]