[ 
https://issues.apache.org/jira/browse/AXIS2C-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574703#action_12574703
 ] 

Senaka Fernando commented on AXIS2C-1041:
-----------------------------------------

Hi Janapriya,

The entire enumeration, _axis2_xml_parser_type, defined in 
axutil_utils_defines.h, seems to have no use in Guththila. It is simply an 
unused parameter. This is therefore, a necessity only for libxml2. Also, when 
looking into the code it seems that AXIS2_XML_PARSER_TYPE_DOC is used no where 
else other than inside the libxml2 wrapper 
(axiom/src/parser/libxml2/libxml2_writer_wrapper.c). Therefore, if we do create 
for memory, we can rather use the type AXIS2_XML_PARSER_TYPE_BUFFER as in our 
code. This makes no difference for Guththila and libxml2.

Therefore, this wont affect any logic in Axis2/C, as it is unused. This is 
rather some code sitting inside the libxml2 wrapper, not being used, when it 
comes to native Axis2/C. However, I have no idea on any uses in sub projects 
and other related projects. When speaking in terms of Axis2/C it makes no 
difference in whether this portion is there or not.

So it can't be said that axiom_xml_reader_create_for_memory expects a libxml 
data type, because, parameter 2, is void * and it is upto the person who 
implements to use the appropriate type. If he implements it using a libxml2 
type it is his mistake. No where in Axis2/C it is used. However, if he is 
really interested in making libxml2 more productive, he can use these 
additional provisions, keeping in mind that Guththila wont support it.

But, we can instead do this. For Guththila, inside the Guththila wrapper we can 
detect this type and refuse to create a reader if it has a type other than 
AXIS2_XML_PARSER_TYPE_BUFFER. If we completely remove this, we might loose on 
some plus points on libxml2 which Guththila does not have and need not having. 
It is not done to believe that we should only have stuff that directly 
correlates in both implementations and drop the rest. The looser in this case 
will rather be libxml2.

Regards,
Senaka

> axiom_xml_reader_create_for_memory expects a libxml data type, denying parser 
> independent implemention. 
> --------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-1041
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1041
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: xml/parser
>            Reporter: Ruwan Janapriya
>
> the function axiom_xml_reader_create_for_memory is allowing type 
> AXIS2_XML_PARSER_TYPE_DOC (4th parameter). Under this type its container (2nd 
> Parameter) should be a variable of xmlDoc type. Since this function should be 
> independent from the parser (libxml wrapper or GUTHTHILA) it is been using, 
> it needed to be corrected.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to