qt4cg / qt4tests

QT4 tests
https://qt4cg.org/
3 stars 7 forks source link

HtmlTestSuite - svg attributes with mixed case #32

Open michaelhkay opened 1 year ago

michaelhkay commented 1 year ago

In the expected results for the new HtmlTestSuite test set, the case of SVG attributes has been forced to lower case. I believe this is incorrect. For example in test-0017, attributeName has been changed to attributename. I believe the correct procedure is first to normalise to lower-case, then to apply the rules for "adjust SVG attributes" in §13.4.6.1 of the HTML5 spec, which convert sttributename to attributeName.

michaelhkay commented 1 year ago

Fixed the test generator (based on JSoup) to do this.

michaelhkay commented 1 year ago

Also: in tests such as test-0580, JSoup is converting the element:

<ruby>
  <rbc><rb>新</rb><rb>幹</rb><rb>線</rb></rbc>
  <rtc><rt>しん</rt><rt>かん</rt><rt>せん</rt></rtc>
</ruby>

into:

<ruby>
  <rbc><rb>新</rb><rb>幹</rb><rb>線</rb></rbc>
  <rtc/><rt>しん</rt><rt>かん</rt><rt>せん</rt>
</ruby>

I can't see why it would do this: neither Chrome nor Safari does so.

michaelhkay commented 1 year ago

This appears to have been reported as an issue by @rhdunn at https://github.com/jhy/jsoup/issues/1294 but I'm not sure why there's a problem in the version I'm using - jsoup 1.15.3.

michaelhkay commented 1 year ago

Affects tests 0580 and 0587. Perhaps we should just fix them "by hand".

GuntherRademacher commented 11 months ago

Fixed the test generator (based on JSoup) to do this.

@michaelhkay Did you possibly not push that change? I was trying to reproduce the contents of the results folder from the files folder using the generateXhtml tool (with the intent to later adapt it for #57), but I am getting different results, including SVG attribute names in lower case where results have them in mixed case.

Please find the result differences in my fork here.

Concerning the other differences, could their cause be me using a different Saxon version? I used org.jsoup:jsoup:1.15.3 and net.sf.saxon:Saxon-HE:12.3. Also added a Gradle project to generateXhtml.

michaelhkay commented 11 months ago

There's been a fair bit of water flowing under the bridge since that previous comment, and I'm aware that it's still an open issue.

michaelhkay commented 9 months ago

I'm sorry, I haven't made any progress in exploring the history here. I've fixed the expected results for SVG elements that should be in mixed case, but I haven't revisited the test generator and it's not on my current list of priorities.