I have submitted the patch for the following two JIRAs:
TUSCANY-2629: Enhancements to the AnyElementProcessor
[https://issues.apache.org/jira/browse/TUSCANY-2629] and
TUSCANY-2624: Missing namespace declarations at the element level
[https://issues.apache.org/jira/browse/TUSCANY-2624]
I have attached the patch with the TUSCANY-2629 JIRA. Because the submitted
patch is combined for the above two JIRAs as they are interrelated.
I can separate them if required.
A] Following is a summary of the working of the developed modules:
1. The existing processor for handling the Unknown Elements
[AnyElementProcessor] records the events inside the Unknown block of the
composite file
and returns the custom implementation of the XMLStreamReader called
'XMLEventsStreamReader' which can be further used to regenerate/write the model.
2. It was required by the processor to access the NamespaceContext for any
element at any level but the default implementation of the XMLStreamReader was
unable to provide it (TUSCANY-2624).
I have introduced another custom implementation of the XMLStreamReader
called 'TuscanyXMLStreamReader' which explicitly maintains the stack of the
namespace contexts at each element level.
Additionally, There is a custom implementation of the NamespaceContext
interface called 'TuscanyNamespaceContext' that provides NamespaceContext
related methods.
B] There are couple of things I am trying to decide :
1. Default location of these modules: Currently, I have added the above
mentioned modules inside the 'contribution-xml' package.
So, can someone guide me for their default location? 2. Initialization of
the TuscanyXMLStreamReader : Currently, the TuscanyXMLStreamReader is
initialized explicitly from the testcase for the AnyElementProcessor
[AnyElementReadWriteTestCase]
I am using a singleton called 'TuscanyXMLInputFactory' that returns the
instance of the TuscanyXMLStreamReader whenever required.
So, the other issue is how to incorporate the usage of the
TuscanyXMLStreamReader inside the runtime?
Looks like the summary went longer but I couldn't find a better way to explain
the patch. Hope it clears the scenario.
Thanks,
Dhaval
_________________________________________________________________
Want to read Hotmail messages in Outlook? The Wordsmiths show you how.
http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns!20EE04FBC541789!167.entry?ocid=TXT_TAGLM_WL_hotmail_092008