Skip to content

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.

License

Notifications You must be signed in to change notification settings

sboreux/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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published