FITS 1.2.0 XPTY0004 error while processing TIFFs

69 views
Skip to first unread message

Remco van Veenendaal

unread,
Sep 21, 2017, 7:43:47 AM9/21/17
to fits-users
Hi FITS community,

Today, I downloaded FITS 1.2.0, installed it in a new folder and ran FITS 1.2.0 on a file set. I received XPTY0004 errors (on line 174 of jhove_image_to_fits.xslt A sequence of more than one item is not allowed as the first operand of 'div') while processing TIFFs.

The file set consists of 1600 files in a variety of formats. As a result, JHOVE "failed" for the TIFF files and I find no JHOVE output in their fits.xml files. JHOVE 1.16.7 however tells me that at least one of the TIFF files is a well-formed and valid TIFF file.

I am not allowed to share the file, but I can share JHOVE's output, see below.

I would like to have JHOVE's output in the fits.xml file, so please help me fix this issue.

Best regards,
Remco van Veenendaal
Preservation advisor
National Archives of the Netherlands


JhoveView (Rel. 1.16.7, 2017-07-20)
 Date: 2017-09-21 13:22:43 CEST
 RepresentationInformation: XXXXXXXX.tif
  ReportingModule: TIFF-hul, Rel. 1.7 (2012-08-12)
  LastModified: 2017-09-16 02:11:22 CEST
  Size: 98307
  Format: TIFF
  Version: 5.0
  Status: Well-Formed and valid
  SignatureMatches:
   TIFF-hul
  InfoMessage: Unknown TIFF IFD tag: 33000
   Offset: 222
  InfoMessage: Unknown TIFF IFD tag: 33000
   Offset: 12538
  InfoMessage: Unknown TIFF IFD tag: 33000
   Offset: 54980
  MIMEtype: image/tiff
  TIFFMetadata:
   ByteOrder: little-endian
   IFDs:
    Number: 3
    IFD:
     Offset: 8
     Type: TIFF
     Entries:
      NisoImageMetadata:
       ByteOrder: little_endian
       CompressionScheme: CCITT Group 4
       ImageWidth: 1632
       ImageHeight: 2336
       ColorSpace: white is zero
       DateTimeCreated: 2004-09-21T10:54:15
       ScanningSoftware: Kofax standard Multi-Page TIFF Storage Filter v2.01.000
       Orientation: normal
       SamplingFrequencyUnit: inch
       XSamplingFrequency: 200
       YSamplingFrequency: 200
       BitsPerSample: 1
       BitsPerSampleUnit: integer
       SamplesPerPixel: 1
      DateTime: 2004:09:21 10:54:15
      NewSubfileType: single page of multi-page image
      SampleFormat: 1
      MinSampleValue: 0
      MaxSampleValue: 1
      Threshholding: 1
      T6Options: 0
      TIFFITProperties:
       BackgroundColorIndicator: background not defined
       ImageColorIndicator: image not defined
       TransparencyIndicator: no transparency
       PixelIntensityRange: 0, 1
       RasterPadding: 1 byte
       BitsPerRunLength: 8
       BitsPerExtendedRunLength: 16
    IFD:
     Offset: 12324
     Type: TIFF
     Entries:
      NisoImageMetadata:
       ByteOrder: little_endian
       CompressionScheme: CCITT Group 4
       ImageWidth: 1632
       ImageHeight: 2336
       ColorSpace: white is zero
       DateTimeCreated: 2004-09-21T10:54:15
       ScanningSoftware: Kofax standard Multi-Page TIFF Storage Filter v2.01.000
       Orientation: normal
       SamplingFrequencyUnit: inch
       XSamplingFrequency: 200
       YSamplingFrequency: 200
       BitsPerSample: 1
       BitsPerSampleUnit: integer
       SamplesPerPixel: 1
      DateTime: 2004:09:21 10:54:15
      NewSubfileType: single page of multi-page image
      SampleFormat: 1
      MinSampleValue: 0
      MaxSampleValue: 1
      Threshholding: 1
      T6Options: 0
      TIFFITProperties:
       BackgroundColorIndicator: background not defined
       ImageColorIndicator: image not defined
       TransparencyIndicator: no transparency
       PixelIntensityRange: 0, 1
       RasterPadding: 1 byte
       BitsPerRunLength: 8
       BitsPerExtendedRunLength: 16
    IFD:
     Offset: 54766
     Type: TIFF
     Entries:
      NisoImageMetadata:
       ByteOrder: little_endian
       CompressionScheme: CCITT Group 4
       ImageWidth: 1632
       ImageHeight: 2336
       ColorSpace: white is zero
       DateTimeCreated: 2004-09-21T10:54:15
       ScanningSoftware: Kofax standard Multi-Page TIFF Storage Filter v2.01.000
       Orientation: normal
       SamplingFrequencyUnit: inch
       XSamplingFrequency: 200
       YSamplingFrequency: 200
       BitsPerSample: 1
       BitsPerSampleUnit: integer
       SamplesPerPixel: 1
      DateTime: 2004:09:21 10:54:15
      NewSubfileType: single page of multi-page image
      SampleFormat: 1
      MinSampleValue: 0
      MaxSampleValue: 1
      Threshholding: 1
      T6Options: 0
      TIFFITProperties:
       BackgroundColorIndicator: background not defined
       ImageColorIndicator: image not defined
       TransparencyIndicator: no transparency
       PixelIntensityRange: 0, 1
       RasterPadding: 1 byte
       BitsPerRunLength: 8
       BitsPerExtendedRunLength: 16

Remco van Veenendaal

unread,
Sep 21, 2017, 7:50:39 AM9/21/17
to fits-users
Please note that the same error occurs in:
- FITS 1.1.1
- FITS 1.0.5
- FITS 1.0.2

Regards,
Remco


dne...@g.harvard.edu

unread,
Sep 22, 2017, 9:59:00 AM9/22/17
to fits-users
Thanks for letting us know about this issue.
It does seem like a failure in the XSLT where a variable is being assigned multiple elements rather than just one (line 172 of jhove_image_to_fits.xslt).
Our use of FITS has been to process a single file (TIFF file in this case) at a time. Your original post seems to indicate that somehow there are multiple TIFF's being processed by FITS within a single file. This might be what is resulting in multiple elements being assigned to the variable in the XSLT. I'm sorry you are unable to supply the file causing this error. Is there another sample file that also causes this error that you are able to supply? We currently have no resources dedicated to FITS so any outside help would be greatly appreciated.

Best,
David Neiman

Remco van Veenendaal

unread,
Sep 28, 2017, 4:29:52 AM9/28/17
to fits-users
Hi David and others,

I've tested individual TIFFs with FITS, and all (8) TIFF files are multi-page TIFF files, with multiple IFDs and therefore multiple occurrences of e.g. xSamplingFrequency and ySamplingFrequency.

My Java and xslt is a bit rusty, but this seems to explain the FITS error message "A sequence of more than one item is not allowed as the first operand of 'div'". The xslt seems to select all occurrences of x|ySamplingFrequency, and this results in an error with the div operand on line 174. Other elements also occur multiple times, but no calculations are performed on them, so I guess that's why they don't result in error messages.

170: <!-- xSamplingFrequency -->
171: <xSamplingFrequency>
172: <xsl:variable name="xNumerator" select="//mix:xSamplingFrequency/mix:numerator"/>
173: <xsl:variable name="xDenominator" select="//mix:xSamplingFrequency/mix:denominator"/>
174: <xsl:value-of select="round($xNumerator div $xDenominator)"/>
175: </xSamplingFrequency>

Looking at the same xslt, line 162 (orientation, using [1]) or line 184+ (BitsPerSample, using for-each) seem to hold possible solutions.

I googled "jhove_image_to_fits.xslt" and saw that there were similar issues resulting from multi-page TIFFs in the past. Perhaps their solutions can be reused here too.

Regards,
Remco

dne...@g.harvard.edu

unread,
Sep 28, 2017, 11:53:41 AM9/28/17
to fits-users
Hi Remco,

Thanks so much for your helpful comments. I searched online for a couple of multi-page TIFF files and ran them through the current FITS and there were no errors reported.
Being able to replicate the error would be helpful in this eventual fix. If anyone could send along a sample file that reveals this error in FITS it would be really helpful.

Thanks,
David
Reply all
Reply to author
Forward
0 new messages