[webkit-dev] XML Serialization Issues
rniwa at webkit.org
Thu Aug 29 16:31:25 PDT 2013
It's supposed to be deterministic so there is a bug somewhere.
- R. Niwa
On Thu, Aug 29, 2013 at 4:27 PM, Dean Jackson <dino at apple.com> wrote:
> I believe the tests you added are not reliable across runs. In particular,
> the unique id you generate
> isn’t necessarily always the same, but your -expected.txt is just a dump
> of the DOM.
> I filed: http://webkit.org/b/120490, but I only mentioned one test. Since
> then I’ve seen more fail.
> On 30 Aug 2013, at 3:25 am, Rob Buis <rwlbuis at gmail.com> wrote:
> > Fixed.
> > More seriously, all bugs mentioned below are fixed/closed, please open
> > new ones for any regressions/improvements.
> > Cheers,
> > Rob.
> > On 19 June 2013 14:44, Alex Milowski <alex at milowski.com> wrote:
> >> I was working on using MathJax  to turn MathML into SVG and ran into
> >> serious serialization issues. In summary, as MathJax programmatically
> >> creates SVG renderings of the MathML, when it creates XLink attributes,
> >> doesn't seem to define a prefix. While this works for rendering, it
> >> when you try to extract a serialization of the SVG.
> >> That is, MathJax creates SVG 'use' elements like (assuming SVG as the
> >> default namespace):
> >> <use xlink:href="#MJMATHI-78" xmlns:xlink="http://www.w3.org/1999/xlink
> >> but instead I get:
> >> <use href="#MJMATHI-78" xmlns="http://www.w3.org/1999/xlink"/>
> >> which makes the SVG incorrect as the 'use' element is now in the xlink
> >> namespace.
> >> You can work around this by manually setting the "prefix" property on
> >> xlink:href attribute.
> >> Looking into why this happens, I can see that the serializer seriously
> >> broken in a number of ways when the DOM is constructed with incomplete
> >> missing namespace declarations) or inconsistent information (e.g. same
> >> prefix used for different namespaces in the same context).
> >> I found at least 6 bugs outstanding (#16739 , #16496 , #19121 ,
> >> #22958 , #83056 , #106531 ) and filed a new one (#117764 ).
> >> Some of these date back to 2007 (6 years ago!).
> >> These bugs break down to these categories:
> >> 1. Default namespace issues: #16739, #106531, #16496
> >> 2. Conflicting prefix mappings: #117764, #19121
> >> 3. Namespace attribute issues: #22958, #83056, #117764
> >> In looking at the code (MarkupAccumulator.cpp), they all suffer from
> one of
> >> two problems:
> >> 1. The computed prefix used isn't properly used for the declaration.
> >> 2. The generated namespace mappings aren't properly stored, scoped, or
> >> with when they are inconsistent.
> >> There is an general assumption in the code that certain prefixes should
> >> always be used for certain namespaces. Unfortunately, it does so
> >> looking to see whether there is a conflict already in scope. Also,
> when the
> >> namespace is not recognized and there is no prefix, a prefix needs to be
> >> generated for the serialization.
> >> Having written several robust XML Serializers for other projects, this
> >> all be fixed in a straightforward way. I've looked at the code and know
> >> what should be done. The changes are probably modest.
> >> Unfortunately, I can't spend the time to directly write and test the
> >> till probably after November. :(
> >> I am certainly willing to help, explain my strategy, advise, test, etc.
> >> there was another willing developer out there who would like to see
> >> bugs closed.
> >>  http://www.mathjax.org/
> >>  https://bugs.webkit.org/show_bug.cgi?id=16739
> >>  https://bugs.webkit.org/show_bug.cgi?id=16496
> >>  https://bugs.webkit.org/show_bug.cgi?id=19121
> >>  https://bugs.webkit.org/show_bug.cgi?id=22958
> >>  https://bugs.webkit.org/show_bug.cgi?id=83056
> >>  https://bugs.webkit.org/show_bug.cgi?id=106531
> >>  https://bugs.webkit.org/show_bug.cgi?id=117764
> >> --
> >> --Alex Milowski
> >> "The excellence of grammar as a guide is proportional to the paucity of
> >> inflexions, i.e. to the degree of analysis effected by the language
> >> considered."
> >> Bertrand Russell in a footnote of Principles of Mathematics
> >> _______________________________________________
> >> webkit-dev mailing list
> >> webkit-dev at lists.webkit.org
> >> https://lists.webkit.org/mailman/listinfo/webkit-dev
> > _______________________________________________
> > webkit-dev mailing list
> > webkit-dev at lists.webkit.org
> > https://lists.webkit.org/mailman/listinfo/webkit-dev
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev