[ 
http://issues.apache.org/jira/browse/DIGESTER-107?page=comments#action_12437150 
] 
            
Rahul Akolkar commented on DIGESTER-107:
----------------------------------------

Thanks for the feedback. WRT the earlier patch:

 * I had the new members protected since to achieve the "caching" effect of the 
currentNamespaces member, the implementation spilt out into other methods 
(start/endPrefixMapping() -- not just getCurrentNamespaces()) and was tied at 
the hip to the namespaces member (for the dirty flag) and therefore leaving the 
new members private (when namespaces is protected) would possibly leave 
subclasses in a wicked predicament.

 * The modifiability of the map may be better left to the semantics of the 
object model that the document gets parsed into, and I presumed it may be 
useful to have a namespaces snapshot that one can work with as one pleases, 
depending on the usecase (actually, a new instance is not created in the 
earlier patch, the old one is cleared -- but that could easily be changed).

Moving forward, I wonder whether the caching has any noticeable benefit (I have 
no measurements either way) and another proposal would be to not add any new 
members at all, and let getCurrentNamespaces() do all the work each time. I'll 
attach such a patch in a few minutes. Let me know which one you'd prefer, 
thanks!


> Provide ability to capture namespace snapshots
> ----------------------------------------------
>
>                 Key: DIGESTER-107
>                 URL: http://issues.apache.org/jira/browse/DIGESTER-107
>             Project: Commons Digester
>          Issue Type: Improvement
>    Affects Versions: Nightly Builds
>            Reporter: Rahul Akolkar
>         Attachments: DIGESTER-107.patch
>
>
> Attached patch adds the capability to snapshot current namespaces at any 
> point during parsing. This is useful, for example, in Commons SCXML where the 
> value of an attribute can contain an XPath expression which needs to be 
> evaluated later. The testcase in the patch captures namespace snapshots for 
> each object created by the digester. Feedback welcome.
> As an aside, does anyone mind if I bring the Digester JIRA versions up to 
> date? Thanks.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to