Skip to content

Conversation

@roesslerj
Copy link

If the XSD is invalid, all the user sees right now is

  Error: Invalid XSD schema
      at ./node_modules/libxmljs/dist/lib/document.js:183:23
      at XMLDocument.validate (./node_modules/libxmljs/dist/lib/document.js:176:53)
      at validateSchema (./node_modules/xsd-validator/index.js:8:22)

With this change, the user sees e.g.:

  Error: Invalid XSD schema: Element '{http://www.w3.org/2001/XMLSchema}pattern': The value '\\d{1,4}[a-zA-Z]?(\\/\\d{1,4})?(-\\d{1,4})?' of the facet 'pattern' is not a valid regular expression.
      at ./node_modules/libxmljs/dist/lib/document.js:183:23
      at XMLDocument.validate (./node_modules/libxmljs/dist/lib/document.js:176:53)
      at validateSchema (./node_modules/xsd-validator/index.js:8:22)

@rchipka
Copy link
Member

rchipka commented Apr 8, 2025

Schema was broken out into a separate class in #656 , so we will need to relocate those changes into the XMLSchema class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants