How to use the xml-name-validator.qname function in xml-name-validator

To help you get started, we’ve selected a few xml-name-validator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jsdom / jsdom / lib / jsdom / living / helpers / validate-names.js View on Github external
exports.qname = function (qname) {
  exports.name(qname);

  const result = xnv.qname(qname);
  if (!result.success) {
    throw new DOMException(
      "\"" + qname + "\" did not match the QName production: " + result.error,
      "InvalidCharacterError"
    );
  }
};
github Nols1000 / hltv-scorebot / node_modules / jsdom / lib / jsdom / living / helpers / validate-names.js View on Github external
exports.qname = function (qname, core) {
  exports.name(qname, core);

  try {
    xnv.qname(qname);
  } catch (e) {
    throw new core.DOMException(core.DOMException.NAMESPACE_ERR,
      "\"" + qname + "\" did not match the QName production: " + e.message);
  }
};
github sx1989827 / DOClever / node_modules / jsdom / lib / jsdom / living / helpers / validate-names.js View on Github external
exports.qname = function (qname) {
  exports.name(qname);

  const result = xnv.qname(qname);
  if (!result.success) {
    throw new DOMException(
      "\"" + qname + "\" did not match the QName production: " + result.error,
      "InvalidCharacterError"
    );
  }
};

xml-name-validator

Validates whether a string matches the production for an XML name or qualified name

Apache-2.0
Latest version published 12 months ago

Package Health Score

72 / 100
Full package analysis

Popular xml-name-validator functions