It was goal of #520 to add validation support for XML BOM documents based on the CycloneDX XSD specification.
As there is no native XML support in JavaScript, it was researched which solution existed in the both build targets: NodeJS and WebBrowser
Utilizing te existing libxml2
seamed appealing.
This lib has all needed capabilities and was already utilized for similar purposes.
To get the libxml2
linked/accessible to NodeJS, native bindings via yp are required.
There are several implementations for this:
libxmljs
- maintained and working -- was abandoned for some time, and appears to be maintaines sporadically, again
libxmljs2
maintainedand working fork oflibxmljs
- as of 2024-05-24, this library is no longer mainained
- This library was used as an optional dependency, and needs to be replaced
libxmljs3
- unmaintained copy of
libxmljs2
- ! DO NOT USE !
- unmaintained copy of
libxml2-wasm
- maintained WASM implementation of a libxml2 wrapper
At the moment of writing (2023-04-21),
libxmljs
and libxmljs2
are both working on several test environments. Both had the needed capabilities.
Decided to go with libxmljs2
for the moment,
as it was more popular/used and had a more active community.
Decided to replace libxmljs2
, as it is end of life.
there seams to exist no solution for validating XML according to XSD