You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Python script to validate WIPO ST.92 Priority Document Data Packages (PDDP ZIP files) before REGISTRATION of priority documents in WIPO DAS REST API V2. It works with packages created by the generator (4.- Generating PDDP samples for testing) and with packages produced by any other system.

Disclaimer

This is a helper tool for testing. It does not replace the validation performed by WIPO DAS and does not cover every rule of ST.92.

Get the validator here: PDDP_Validator.zip (version of 02.10.2026)

Contents of the package

validatorPddp/
├── validate_pddp.py                    # Validator script
├── requirements.txt                    # Python dependency (lxml)
├── README.md                           # Documentation
├── xsd/                                # WIPO ST.92 V2.0 schemas
│   ├── ST92PDDPIndex_V2_0.xsd
│   ├── ST96_Common_V9_0.xsd
│   ├── ST96_Design_V9_0.xsd
│   └── ST96_Trademark_V9_0.xsd
└── dtd/
    └── ST26SequenceListing_V1_3.dtd    # WIPO ST.26 DTD for sequence listings

The XSD files are the official ST.92 V2.0 schemas from https://www.wipo.int/standards/XMLSchema/ST92/V2_0/ST92PDDPIndex_V2_0.zip.

Installation

The validator needs Python 3.10+ and the lxml library (XSD/DTD validation is not available in the Python standard library).

Create a virtual environment and install lxml
# Linux / macOS
cd validatorPddp
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt

# Windows (PowerShell)
cd validatorPddp
py -m venv .venv
.venv\Scripts\pip install -r requirements.txt

On Debian / Ubuntu / Raspberry Pi OS you can instead install the system package: sudo apt install python3-lxml.

Usage

# Validate all ZIP files in ../output (default)
.venv/bin/python validate_pddp.py

# Validate specific ZIP files and/or all ZIP files in a folder
.venv/bin/python validate_pddp.py Patent_NO_20210008_20210924.zip ./received/

# Also list every check that passed
.venv/bin/python validate_pddp.py -v ./output

All options

OptionDefaultDescription
paths ...../outputZIP files and/or folders containing ZIP files
-v, --verboseoffAlso list the checks that passed
--xsd FILExsd/ST92PDDPIndex_V2_0.xsdST.92 index schema
--st26-dtd FILEdtd/ST26SequenceListing_V1_3.dtdST.26 sequence listing DTD

Exit code: 0 when no package has errors, 1 otherwise (can be used in scripts / CI).

Checks performed

#CheckResult if it fails
1ZIP file opens and CRC is correctERROR
2PriorityDocumentIndex.xml present at the root of the ZIPERROR
3PriorityDocumentIndex.xml valid against ST92PDDPIndex_V2_0.xsdERROR
4Document categories match IPRightKindCategory (e.g. only PatentMandatoryDocumentCategory in a patent package)ERROR
5Mandatory documents present: Priority document PDF (all types), Certification page (designs, trademarks), representation (designs, trademarks)ERROR
5bPatent package without a separate Certification page (the certification must then be part of the priority document PDF)WARNING
6ZIP name <Kind>_<Office>_<Number>_<YYYYMMDD>.zip matches kind / office in the indexERROR
6bZIP name number / date match the application number / filing date in the indexWARNING
7Every file listed in the index exists in the ZIP (DocumentLocationURI may be a folder or the full path)ERROR
7bDocumentLocationURI is an external URLWARNING
8File in the ZIP not listed in the indexWARNING
9File content matches its extension (PDF, PNG, JPEG, WAV, MP3, STL)ERROR
10Every XML file is well-formedERROR
11ST.26 sequence listings valid against the ST.26 DTDERROR

Limitations

The ST.92 V2.0 schema set does not declare the ST.96 root elements used in bibliographic and classification data (e.g. com:PatentBibliographicData), so those XML files are only checked for well-formedness.

Example output

>>>> .venv/bin/python validate_pddp.py ../output/Patent_NO_20250011_20251117.zip ../output/Patent_IB_PCT-IB2026-544115_20260112.zip
[FAIL] Patent_NO_20250011_20251117.zip
    WARN  No separate 'Certification page' document; make sure the certification is included in the priority document PDF
    ERROR PriorityDocumentIndex.xml XSD: line 17: Element '{http://www.wipo.int/standards/XMLSchema/PriorityDocumentExchange}SupplementaryDocumentBag': Missing child element(s). Expected is ( {http://www.wipo.int/standards/XMLSchema/PriorityDocumentExchange}SupplementaryDocument ).
[OK] Patent_IB_PCT-IB2026-544115_20260112.zip

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

Common errors

MessageCause / fix
SupplementaryDocumentBag': Missing child element(s)An empty <pde:SupplementaryDocumentBag> is not allowed. Remove the element if there are no supplementary documents.
'Text' is not a valid value of the union type ... DocumentFileFormatCategoryTypeFile format values are case sensitive: use TEXT, PDF, XML, …
No declaration for element INSDSeq_organismNot part of ST.26. The organism must be given as the organism qualifier of the source feature.
content is not a valid STL/PDF/... fileThe file does not contain what its extension says (e.g. an HTML page saved with a .stl extension).

Requirements

Python 3.10+ and lxml.

  • No labels