Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add advisory check for supplementary document categories; document the closed/open distinction between mandatory and supplementary category values

...

GroupCheckResult if it fails
ArchiveZIP opens and every entry passes its CRCERROR
ArchiveNo encrypted entries and no duplicate entry namesERROR
ArchiveNo absolute paths, .. traversal, backslashes or control characters in entry namesERROR
ArchivePriorityDocumentIndex.xml present at the ZIP root, with exact casingERROR
IndexWell-formed XML, parsed with entity expansion and network access disabledERROR
IndexNo DOCTYPE and no XML entity referencesERROR
IndexRoot element is pde:PriorityDocumentIndexERROR
IndexValid against ST92PDDPIndex_V2_0.xsdERROR
IndexDocument categories match IPRightKindCategoryERROR
IndexMandatory documents present: priority document PDF (all types), certification page and representation (designs, trademarks)ERROR
IndexPatent package without a separate certification page (it must then be part of the priority document PDF)advisory
IndexSupplementary document category is one of the values ST.92 recommends for the IP right type. Mandatory categories are a closed enumeration enforced by the schema, but supplementary ones are declared as a union with xsd:token, so the schema accepts any value and a typo would otherwise pass unnoticedadvisory
IndexApplicationFilingDate and DocumentDate parse and are not in the futureERROR
IndexZIP name <Kind>_<Office>_<Number>_<YYYYMMDD>.zip matches the indexERROR / advisory
ReferencesEvery file listed in the index exists in the ZIPERROR
Referencescom:FileName contains no path componentERROR
ReferencesDocumentLocationURI is relative and does not escape the packageERROR
ReferencesMandatory documents live under MandatoryArtifacts/, supplementary under SupplementaryArtifacts/ERROR
ReferencesDocumentLocationURI is an external URL; file in the ZIP not listed in the index; one file referenced by several entriesadvisory
ContentNo empty filesERROR
ContentDeclared DocumentFileFormatCategory matches both the file extension and the actual bytesERROR
ContentFile content matches its extension (PDF, PNG, JPEG, WAV, MP3, STL, ZIP, TAR, XML)ERROR
ContentPDF structure: header, startxref, %%EOF, /RootERROR
ContentPNG structure: per-chunk CRCs, IHDR/IDAT/IEND present, non-zero dimensionsERROR
ContentWAV structure: RIFF size agrees with the file, fmt and data chunks present and in boundsERROR
ContentSTL structure: facet / loop / vertex counts agree (ASCII) or size matches the triangle count (binary)ERROR
ContentZipped artifacts open, are unencrypted and CRC-cleanERROR
ContentPageTotalQuantity matches the PDF page count; DocumentSizeQuantity matches the real byte sizeadvisory
ContentInternal XML is well-formedERROR
ContentSupplementary artifacts valid against the published ST.96 V9.0 schemasERROR
ContentST.26 sequence listings valid against the ST.26 DTDERROR
ContentST.26 cross-checks: fileName, SequenceTotalQuantity, sequenceIDNumber runs 1..n, INSDSeq_length matches the sequenceERROR
ContentST.26 characters within the Annex IV Basic Latin subsetadvisory

...

Note
titleBibliographic and classification data (ST.96)

Bibliographic and classification data are now validated against the published ST.96 V9.0 schemas, not just checked for well-formedness.

Note that these documents belong to the per-right ST.96 namespaces, not to Common: pat:BibliographicData and pat:PatentClassificationBag for patents, dgn:DesignApplication and com:DesignClassificationBag (Locarno) for designs, tmk:TrademarkApplication and tmk:GoodsServicesBag (Nice) for trademarks.

The trimmed ST96_Common_V9_0.xsd shipped inside the ST.92 Annex I bundle declares only 16 global elements, a subset built for the index schema. It is not a substitute for the full ST.96 Common namespace, which is why the supplementary artifacts are checked against the ST.96 release instead.

Info
titleDocument categories: mandatory is closed, supplementary is open

pde:*MandatoryDocumentCategory is declared with xsd:restriction, so only these values are valid and xmllint rejects anything else:

PatentIndustrial designTrademark
Certification pageCertification pageCertification page
Priority document PDFPriority document PDFPriority document PDF
Sequence listingIndustrial design representationTrademark representation

pde:*SupplementaryDocumentCategory is declared as a union of xsd:token and a base type, so the enumerated values are recommended rather than binding and an Office may legitimately use another token. The validator therefore reports an unrecognised supplementary category as advisory, to catch typos without blocking legitimate values:

PatentIndustrial designTrademark
AbstractBibliographic dataBibliographic data
Application bodyRegistration certificateRegistration certificate
Bibliographic dataIndustrial design representationMark representation
DescriptionClassification dataClassification data
ClaimsIntermediate documentsIntermediate documents
Drawings  
Classification data  
Preconversion document  
Sequence listing  

Note that com:DocumentName beside these elements is free text (xsd:string union) and carries no controlled vocabulary; the category element is the machine-readable one.

Example output

Code Block
languageshell
>>>> .venv/bin/python validate_pddp.py -v ./output/Patent_IB_PCT-IB2026-134592_20260103.zip
ST.92 schema: https://www.wipo.int/standards/XMLSchema/ST92/V2_0/ST92PDDPIndex_V2_0.xsd
ST.96 schema: https://www.wipo.int/standards/en/st96/v9-0/annex-iii/ST96XMLSchema_V9_0_Flattened.zip
Mode:         strict

[OK] Patent_IB_PCT-IB2026-134592_20260103.zip
    ok    ZIP integrity OK
    ok    11 ZIP entr(ies), all names safe and unique
    ok    PriorityDocumentIndex.xml valid against the ST.92 V2.0 schema
    ok    Document categories consistent with 'Patent'
    ok    Mandatory documents present: ['Certification page', 'Priority document PDF', 'Sequence listing']
    ok    ZIP file name consistent with index
    ok    All 7 referenced files resolved
    ok    MandatoryArtifacts/..._PriorityDocument.pdf: PDF OK (2,847 bytes, 3 page(s))
    ok    MandatoryArtifacts/..._SequenceListing_ST26.xml: valid against the ST.26 DTD
    ok    SupplementaryArtifacts/..._BibliographicData.xml: valid against ST.96 V9.0 (BibliographicData_V9_0.xsd)
    ok    SupplementaryArtifacts/..._ClassificationData.xml: valid against ST.96 V9.0 (Patent_V9_0.xsd)

1 package(s) checked: 1 passed, 0 failed.

Without -v only problems are listed:

>>>> .venv/bin/python validate_pddp.py ./received/
[FAIL] Patent_XX_1234567_20260101.zip
    ERROR MandatoryArtifacts/doc.pdf: declared format 'PNG' does not match extension '.pdf' (expected ['.png'])
    ERROR SupplementaryArtifacts/bib.xml ST.96: line 11: Element 'InventionTitle': This element is not expected. Expected is ( InventionTitleBag ).

1 package(s) checked: 0 passed, 1 failed.

...