I think in most cases you'd be fine just checking for [Content_Types].xml
. It's possible that someone would pass you a zip file including a file named like that but not containing the information you'd expect it to have as part of an XPS document, but how likely is that? The file name is pretty specific and, to me, unlikely to produce accidental collisions.
But if you want to be extra sure, you could check if the XML file conforms to the expected schema. You should generally see something like this:
<?xml version="1.0" encoding="utf-8"?>
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
<Default Extension="fdseq" ContentType="application/vnd.ms-package.xps-fixeddocumentsequence+xml"/>
<Default Extension="fdoc" ContentType="application/vnd.ms-package.xps-fixeddocument+xml"/>
<Default Extension="xml" ContentType="application/vnd.ms-printing.printticket+xml"/>
<Default Extension="JPG" ContentType="image/jpeg"/>
<Default Extension="fpage" ContentType="application/vnd.ms-package.xps-fixedpage+xml"/>
<Default Extension="dict" ContentType="application/vnd.ms-package.xps-resourcedictionary+xml"/>
</Types>
You could also check for the required FixedDocumentSequence.fdseq
file.
Hopefully helpful/relevant links: