Details
-
Type:
New Feature
-
Status:
In Progress
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Number of attachments :
Description
(filed based on request by Elnar Hajiyev)
It would be nice if there was a way to track location information for individual attributes. Currently all attribute events give location of the enclosing element, since tracking of location information for all attributes would cause additional complexity and overhead, and was assumed not be needed by most users.
The support can be added via Woodstox-specific property, disabled by default. For Event API location could be passed by Woodstox, but for raw cursor API, a new method may need to be added.
One open question is what to do with attributes that get default value from DTD (and hence there's no attribute within parsed document itself): one possibility would be to give location where attribute (and its default value) was declared in DTD; another to just use element's location. Latter might be less surprising to users.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Attachment | BasicStreamReader.patch [ 40425 ] | |
| Attachment | AttributeCollector.patch [ 40424 ] | |
| Attachment | CompactNsContext.patch [ 40426 ] |
| Attachment | NonNsAttributeCollector.patch [ 40428 ] | |
| Attachment | InputElementStack.patch [ 40427 ] | |
| Attachment | NonNsInputElementStack.patch [ 40429 ] |
| Attachment | NsInputElementStack.patch [ 40431 ] | |
| Attachment | NsAttributeCollector.patch [ 40430 ] |
| Status | Open [ 1 ] | In Progress [ 3 ] |
| Attachment | BasicStreamReader1.patch [ 40679 ] |
Hmmh. Implementing this looks quite hairy, due to optimizations done for the specific code path that'd need to be supported (passing distinct Location objects so Element events can be constructed). It is doable, still. I'll have to keep on thinking of how exactly to get it done.