|
From: Gerd S. <in...@ge...> - 2014-05-04 20:40:23
|
The parser does so because the HTML-4 standard (don't know whether
HTML-5 changed this) explicitly specifies that a value-less attribute
must be handled like this.
Maybe that should be configurable. The spec could go into the dtd, and
it would just include all standard cases, so that attributes outside the
standard are not affected.
Gerd
Am Freitag, den 02.05.2014, 17:06 -0400 schrieb Ashish Agarwal:
> Html like "<div data-id></div>" gets parsed as:
>
> Nethtml.Element ("div", [("data-id", "data-id")], [])
>
>
> The value is set to the attribute name, which seems wrong. The correct
> solution would be to change the type of an element so that values are
> `string option`, but I'm guessing that's infeasible. Alternatively,
> the parser should set the value to the empty string.
>
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos. Get
> unparalleled scalability from the best Selenium testing platform available.
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> Ocamlnet-devel mailing list
> Oca...@li...
> https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel
--
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany ge...@ge...
My OCaml site: http://www.camlcity.org
Contact details: http://www.camlcity.org/contact.html
Company homepage: http://www.gerd-stolpmann.de
------------------------------------------------------------
|