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: Open
    • Minor
    • Resolution: Unresolved
    • 1.25
    • None
    • 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

        Activity

          People

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

            Dates

              Created:
              Updated: