#105 Element names in other namespaces than HTML should not be lowercased

v 2.8
closed-fixed
nobody
None
5
2014-03-18
2013-12-09
No

If a HTML document is using namespaces, then it's safe to assume that the authoring software knows how to type the element names, so they shouldn't be changed.

This is affecting, for example, svg:clipPath elements, which are turned into the unknown clippath element, leading to processing errors further down the line.

Related

Bugs: #99

Discussion

  • Sergiu Dumitriu

    Sergiu Dumitriu - 2013-12-09

    Test case. Note that current browsers ignore the case, so even clippath works in a browser, but it fails validation and doesn't work in other tools.

     
  • Sergiu Dumitriu

    Sergiu Dumitriu - 2013-12-09

    Attribute names shouldn't be altered as well, since viewBox gets changed to viewbox, which is not a valid <svg> attribute.

     
  • Scott Wilson

    Scott Wilson - 2014-03-18

    Keeping element names from "foreign markup" is relatively simple. For attribute names its slightly less so as the transforms processor works on them before the tree is constructed and therefore we don't know whether an attribute should be lowercased or not until after transformation.

     
  • Scott Wilson

    Scott Wilson - 2014-03-18

    OK, I've figured out how to implement this and also pass all the existing tests. Its not wonderfully elegant but it does the trick.

     
  • Scott Wilson

    Scott Wilson - 2014-03-18
    • status: open --> closed-fixed
     
  • Sergiu Dumitriu

    Sergiu Dumitriu - 2014-03-18

    Thank you Scott.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks