On Sun, 2009-08-02 at 01:35 +0000, [email protected] wrote:

> Modified: branches/struggleyb/libdom-remain/bindings/xml/xmlerror.h
> URL: 
> http://source.netsurf-browser.org/branches/struggleyb/libdom-remain/bindings/xml/xmlerror.h?rev=8973&r1=8972&r2=8973&view=diff
> ==============================================================================
> --- branches/struggleyb/libdom-remain/bindings/xml/xmlerror.h (original)
> +++ branches/struggleyb/libdom-remain/bindings/xml/xmlerror.h Sat Aug  1 
> 20:35:37 2009
> @@ -9,11 +9,15 @@
>  #define xml_xmlerror_h_
>  
>  typedef enum {
> -     DOM_XML_OK              = 0,
> +     DOM_XML_OK                                      = 0,
>  
> -     DOM_XML_NOMEM           = 1,
> +     DOM_XML_NOMEM                           = 1,
>  
> -     DOM_XML_LIBXML_ERR      = (1<<16),
> +     DOM_XML_LIBXML_ERR                      = 2,
> +
> +     DOM_XML_LIBWAPCAPLET_ERR        = 4,
> +     
> +     DOM_XML_UNKOWN_ERR                      = (1<<16),
>  } dom_xml_error;

I don't think this is correct. The point of DOM_XML_LIBXML_ERR is that
the libxml error code is placed in the bottom 16bits of the dom error
code. Also, we know how to convert libwapcaplet errors into dom errors,
anyway.

> Modified: branches/struggleyb/libdom-remain/bindings/xml/xmlparser.c
> URL: 
> http://source.netsurf-browser.org/branches/struggleyb/libdom-remain/bindings/xml/xmlparser.c?rev=8973&r1=8972&r2=8973&view=diff
> ==============================================================================
> --- branches/struggleyb/libdom-remain/bindings/xml/xmlparser.c (original)
> +++ branches/struggleyb/libdom-remain/bindings/xml/xmlparser.c Sat Aug  1 
> 20:35:37 2009
> @@ -309,9 +309,13 @@
>  
>       parser->complete = true;
>  
> -     lerr = lwc_context_intern(parser->ctx, "id", strlen("id"), &name);
> +     /**
> +      * TODO: In future, this string "id" should be extracted from the 
> +      * document schema file instead of just setting it as "id".
> +      */
> +     lerr = lwc_context_intern(parser->ctx, "id", SLEN("id"), &name);
>       if (lerr != lwc_error_ok)
> -             return  DOM_XML_LIBXML_ERR | lerr;
> +             return  DOM_XML_LIBWAPCAPLET_ERR;

What's wrong with calling _dom_exception_from_lwc_error() here?


J.


Reply via email to