nikku / node-xsd-schema-validator

A schema (XSD) validator for NodeJS
https://www.npmjs.com/package/xsd-schema-validator
MIT License
51 stars 24 forks source link

XSD validation inside bpmnlint-playground #27

Closed tboni91 closed 2 years ago

tboni91 commented 2 years ago

Is your feature request related to a problem? Please describe

I'm currently using the bpmnlint-playground tool which uses bpmn-js and bpmnlint inside. What I would like to implement within bpmnlint-playground is the XSD validation of the bpmn model that is imported. Is it possible to use your library to do this? Thanks in advance.

nikku commented 2 years ago

@tboni91 Please use the the existing issue templates? Also, please link if you refer to external resources. What is bpmn-playground?

tboni91 commented 2 years ago

Sorry for my mistake about the issue, do I have to close it and do it again?

nikku commented 2 years ago

You can simply edit the issue body to provide the relevant details.

tboni91 commented 2 years ago

I made the changes.

nikku commented 2 years ago

@tboni91 Sorry for the late follow up.

It is not easily possible to integrate this tool within what seems to be a client side browser app. This library by definition needs access to the file system to perform the XSD validation.

Depending on you're use-case (what would you like to accomplish with bpmnlint-playground) I suggest you to open an issue over there.

tboni91 commented 2 years ago

Hi @nikku,

my intent is to realize a custom validation system for bpmn models made by an editor that is completely client side, and I wanted to understand if it was possible to implement XSD validation in client side. As an alternative, since it's not possible, I was thinking of implementing XSD schema constraints via custom bpmnlint rules but I don't know if it would have the same result.

nikku commented 2 years ago

I wanted to understand if it was possible to implement XSD validation in client side.

There is many approaches, but that really depends on your use-case.

This library specifically targets NodeJS. Hence I was closing this issue.