brightway-lca / pyilcd

A Python package that converts ILCD XML formats to their Python equivalents and export the same data back to XML.
Other
2 stars 2 forks source link

Fix CAS RegEx and add local xml.xsd #3

Open linancn opened 4 months ago

linancn commented 4 months ago

This pull request includes the following updates:

It fixes the CAS RegEx pattern in the XML schema file. The original pattern from the ILCD schemas incorrectly allowed only six digits in the first segment. The pattern has now been modified to allow 2 to 7 digits before the first hyphen, thereby enhancing the accuracy of CAS Number validation.

It adds a local copy of xml.xsd to improve batch processing performance. Previously, each validation attempt accessed http://www.w3.org/2001/xml.xsd, which could lead to network errors and validation failures due to the large volume of files being verified. By using a local copy, these issues are mitigated.