Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-3308

SVG file without xml declaration tag is detected as text/plain

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.25
    • 2.7.0
    • mime
    • None

    Description

      The SVG file attached to the issue is interpreted as text/plain by

      tika.detect(filePath)

       

      If I add 

       <?xml version="1.0" standalone="no"?> 

      at the beginning of the file, then tika detects it as  "image/svg+xml"

       

      When i read the documentation i see that xml is not necessary for a file to be well-formed

      https://www.w3.org/TR/REC-xml/#sec-prolog-dtd

       

      It will be great if tika can detect a file as a SVG without the prolog

       

      Attachments

        1. logo-luma.svg
          4 kB
          Anas Hammani

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ahammani Anas Hammani
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: