Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-483

Escaped identifier start character not handled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 1.5
    • None
    • CSS
    • None
    • Operating System: All
      Platform: All

    Description

      The following property identifier is not parsed correctly:

      -ilx-myproperty

      The hyphen is not an allowed identifier start character, whereas the W3C recommends using the
      hyphen as a start character for custom properties. The problem is that

      -ilx-myproperty

      is guaranteed to not parse in any conformant CSS parser, so it is not even possible to have
      additional proprietary properties in otherwise fully parseable CSS files. The suggested solution in
      a discussion on www-style@w3c.org was to quote the leading hyphen and thus make the whole
      stylesheet parseable.

      However, the Batik CSS parser does not seem to recognize

      -ilx-myproperty

      as a valid identifier name. The CSS2.1 grammar, however, suggests that the technique described
      above is allowed:

      nmstart [_a-z]|

      {nonascii}

      |

      {escape}

      allows an escape to introduce an identifier.

      Though I have figured a really dirty hack to remedy the above situation for me locally, I'd rather
      leave a correct fix to those familiar with the code (I've only had a look at it for about half an hour)
      and therefore don't dare to describe it here in public.

      Regards, Christian.

      Attachments

        Activity

          People

            batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
            roth@visualclick.de Christian Roth
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: