Skip to content

CoreFiling/xsd-pattern-js

 
 

Repository files navigation

XSD-Pattern-JS

This library parse a XSD (XML Schema), as defined by w3c ,regular expression (as use in a pattern facet). It can output an equivalent javascript (ECMAScript) regexp. This allows to validate an XSD pattern directly in javascript.

This library is written in Typescript.

Live demo

How to use it

Javascript

var xpj = require("xsd-pattern-js")
var pattern = new xpj.XsdPattern("A+");
pattern.match("AA"); //return true
pattern.match("AB"); //return false

About

This library parse a XSD (XML Schema) regular expression (as use in a pattern facet). It can output an equivalent javascript (ECMAScript) regexp. This allow to validate an XSD pattern directly in javascript.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages