XMLDOMConfiguration.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. // Generated by CoffeeScript 1.12.7
  2. (function() {
  3. var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList;
  4. XMLDOMErrorHandler = require('./XMLDOMErrorHandler');
  5. XMLDOMStringList = require('./XMLDOMStringList');
  6. module.exports = XMLDOMConfiguration = (function() {
  7. function XMLDOMConfiguration() {
  8. var clonedSelf;
  9. this.defaultParams = {
  10. "canonical-form": false,
  11. "cdata-sections": false,
  12. "comments": false,
  13. "datatype-normalization": false,
  14. "element-content-whitespace": true,
  15. "entities": true,
  16. "error-handler": new XMLDOMErrorHandler(),
  17. "infoset": true,
  18. "validate-if-schema": false,
  19. "namespaces": true,
  20. "namespace-declarations": true,
  21. "normalize-characters": false,
  22. "schema-location": '',
  23. "schema-type": '',
  24. "split-cdata-sections": true,
  25. "validate": false,
  26. "well-formed": true
  27. };
  28. this.params = clonedSelf = Object.create(this.defaultParams);
  29. }
  30. Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', {
  31. get: function() {
  32. return new XMLDOMStringList(Object.keys(this.defaultParams));
  33. }
  34. });
  35. XMLDOMConfiguration.prototype.getParameter = function(name) {
  36. if (this.params.hasOwnProperty(name)) {
  37. return this.params[name];
  38. } else {
  39. return null;
  40. }
  41. };
  42. XMLDOMConfiguration.prototype.canSetParameter = function(name, value) {
  43. return true;
  44. };
  45. XMLDOMConfiguration.prototype.setParameter = function(name, value) {
  46. if (value != null) {
  47. return this.params[name] = value;
  48. } else {
  49. return delete this.params[name];
  50. }
  51. };
  52. return XMLDOMConfiguration;
  53. })();
  54. }).call(this);