axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Mitchell (JIRA)" <>
Subject [jira] Updated: (AXIS2C-857) guththila parser drops xml:id attributes from incoming elements
Date Thu, 24 Jan 2008 00:50:35 GMT


Bill Mitchell updated AXIS2C-857:

    Attachment: diff2.txt

Lahira, it's a nice start on a patch; it's certainly in the right direction.  In testing it
I uncovered a few minor coding errors.   In guththila_init(), (a) the declarations needed
to come at the start of the block, (b) the namespace size is getting setting wrong, as it
needs strlen(), sizeof is rounding up to the next multiple of the machine word, (c) the code
did not handle out-of-memory on the token creates.  In guththila_token_create, (d) it was
allocating the wrong length of for the string and the token structure, and (e) it was not
actually returning the pointer to the allocated token to the caller.  

In the attached diff2.txt, I corrected the coding errors and the client app now sees the xml:id
attributes on the elements and can process them.  Thanks for getting this started.  

> guththila parser drops xml:id attributes from incoming elements
> ---------------------------------------------------------------
>                 Key: AXIS2C-857
>                 URL:
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila
>    Affects Versions: Current (Nightly)
>         Environment: Windows XP, Visual Studio 2005, guththila parser, libcurl
>            Reporter: Bill Mitchell
>            Priority: Minor
>         Attachments: diff.txt, diff2.txt
> The XML specification allows an element to carry an xml:id attribute without the xml
namespace being declared explicitly.  In fact, if the xml namespace is declared, it must match  When the namespace is not declared explicitly, it appears
that the guththila parser discards the incoming xml:id attributes without including them in
the om.  
> For example, I receive a response message from a service that begins:
> <env:Envelope xmlns:xsd="" xmlns:env=""
> <env:Body>
> <fw:getExemplarResponse responseMessage="master exemplar provided." name="customer"
supportedMethods="browse browseNext browsePrevious create update delete retrieve">
> <exemplar handle="master">
> <cr-customer-record xml:id="Q375" type="xsd:string">
> <cr-customer-id xml:id="Q376" type="xsd:string">
> </cr-customer-id>
> ...
> When linked with libxml, the client code sees two attributes, a type attribute and an
xml:id attribute, attached to the element nodes.  When linked with the guththila parser, only
the type attribute is present.  

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:
For additional commands, e-mail:

View raw message