aboutsummaryrefslogtreecommitdiff
path: root/generator/node_modules/xmlbuilder
diff options
context:
space:
mode:
Diffstat (limited to 'generator/node_modules/xmlbuilder')
-rw-r--r--generator/node_modules/xmlbuilder/.nycrc6
-rw-r--r--generator/node_modules/xmlbuilder/.vscode/launch.json23
-rw-r--r--generator/node_modules/xmlbuilder/CHANGELOG.md593
-rw-r--r--generator/node_modules/xmlbuilder/LICENSE21
-rw-r--r--generator/node_modules/xmlbuilder/README.md103
-rw-r--r--generator/node_modules/xmlbuilder/lib/Derivation.js10
-rw-r--r--generator/node_modules/xmlbuilder/lib/DocumentPosition.js12
-rw-r--r--generator/node_modules/xmlbuilder/lib/NodeType.js25
-rw-r--r--generator/node_modules/xmlbuilder/lib/OperationType.js11
-rw-r--r--generator/node_modules/xmlbuilder/lib/Utility.js88
-rw-r--r--generator/node_modules/xmlbuilder/lib/WriterState.js10
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLAttribute.js130
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLCData.js41
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLCharacterData.js86
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLComment.js41
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js80
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js20
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLDOMImplementation.js55
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLDOMStringList.js44
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLDTDAttList.js66
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLDTDElement.js44
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLDTDEntity.js115
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLDTDNotation.js66
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLDeclaration.js51
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLDocType.js235
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLDocument.js282
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLDocumentCB.js650
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLDocumentFragment.js21
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLDummy.js39
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLElement.js334
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js77
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLNode.js999
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLNodeFilter.js51
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLNodeList.js45
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js56
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLRaw.js40
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLStreamWriter.js209
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLStringWriter.js40
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLStringifier.js291
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLText.js82
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLTypeInfo.js23
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLUserDataHandler.js27
-rw-r--r--generator/node_modules/xmlbuilder/lib/XMLWriterBase.js485
-rw-r--r--generator/node_modules/xmlbuilder/lib/index.js120
-rw-r--r--generator/node_modules/xmlbuilder/package.json51
-rw-r--r--generator/node_modules/xmlbuilder/perf/basic/escaping.coffee244
-rw-r--r--generator/node_modules/xmlbuilder/perf/basic/object.coffee21
-rw-r--r--generator/node_modules/xmlbuilder/perf/index.coffee161
-rw-r--r--generator/node_modules/xmlbuilder/perf/perf.list11
-rw-r--r--generator/node_modules/xmlbuilder/typings/index.d.ts1771
50 files changed, 8106 insertions, 0 deletions
diff --git a/generator/node_modules/xmlbuilder/.nycrc b/generator/node_modules/xmlbuilder/.nycrc
new file mode 100644
index 0000000..a21df9b
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/.nycrc
@@ -0,0 +1,6 @@
+{
+ "reporter": ["lcov", "text"],
+ "extension": [".coffee"],
+ "sourceMap": false,
+ "instrument": false
+} \ No newline at end of file
diff --git a/generator/node_modules/xmlbuilder/.vscode/launch.json b/generator/node_modules/xmlbuilder/.vscode/launch.json
new file mode 100644
index 0000000..45a0637
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/.vscode/launch.json
@@ -0,0 +1,23 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "type": "node",
+ "request": "launch",
+ "name": "Debug Coffee",
+ "skipFiles": [
+ "<node_internals>/**"
+ ],
+ "program": "${workspaceFolder}/node_modules/mocha/bin/mocha",
+ "args": [
+ "\"test/**/*.coffee\""
+ ],
+ "outFiles": [
+ "${workspaceFolder}/**/*.js"
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/generator/node_modules/xmlbuilder/CHANGELOG.md b/generator/node_modules/xmlbuilder/CHANGELOG.md
new file mode 100644
index 0000000..77974ed
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/CHANGELOG.md
@@ -0,0 +1,593 @@
+# Change Log
+
+All notable changes to this project are documented in this file. This project adheres to [Semantic Versioning](http://semver.org/#semantic-versioning-200).
+
+## [15.1.1] - 2020-04-09
+
+- Fixed a bug where the `noDoubleEncoding` flag kept named entities other than [those specified in the spec](https://www.w3.org/TR/xml/#sec-predefined-ent) (see [#16](https://github.com/oozcitak/xmlbuilder2/issues/16) in `xmlbuilder2`).
+
+## [15.1.0] - 2020-03-20
+
+- Added the `invalidCharReplacement` option to replace invalid characters with a user supplied replacement character. See [#147](https://github.com/oozcitak/xmlbuilder-js/issues/147).
+
+## [15.0.1] - 2020-03-10
+
+- Pretty printing now keeps single CDATA nodes in-line with their parent elements also with the stream writer.
+
+## [15.0.0] - 2020-03-10
+
+- Pretty printing now keeps single CDATA nodes in-line with their parent elements. See [#224](https://github.com/oozcitak/xmlbuilder-js/issues/224).
+
+## [14.0.0] - 2020-02-14
+
+- Removed support for node.js 6.0\. Minimum required version is now 8.0.
+
+## [13.0.2] - 2019-05-22
+
+- Fixed a bug where importing a document into an empty parent document did not set the root node. See [#213](https://github.com/oozcitak/xmlbuilder-js/issues/213).
+
+## [13.0.1] - 2019-05-10
+
+- Corrected typings for doctype and character data nodes. See [#211](https://github.com/oozcitak/xmlbuilder-js/issues/211).
+
+## [13.0.0] - 2019-05-07
+
+- Rewrote all TypeSript typings to be strictly compatible with the API. This is a breaking change for TypeScript users only.
+
+## [12.0.1] - 2019-04-30
+
+- Added option for pretty printing attributes.
+
+## [12.0.0] - 2019-04-03
+
+- Removed support for node.js 4.0 and 5.0\. Minimum required version is now 6.0.
+
+## [11.0.1] - 2019-03-22
+
+- Added TypeScript typings. See [#200](https://github.com/oozcitak/xmlbuilder-js/issues/200).
+
+## [11.0.0] - 2019-02-18
+
+- Calling `end()` with arguments no longer overwrites writer options. See [#120](https://github.com/oozcitak/xmlbuilder-js/issues/120).
+- Added writer state and customizable space and endline functions to help customize writer behavior. Also added `openNode` and `closeNode` functions to writer. See [#193](https://github.com/oozcitak/xmlbuilder-js/issues/193).
+- Fixed a bug where writer functions would not be called for nodes with a single child node in pretty print mode. See [#195](https://github.com/oozcitak/xmlbuilder-js/issues/195).
+- Renamed `elEscape` to `textEscape` in `XMLStringifier`.
+- Fixed a bug where empty arrays would produce child nodes. See [#190](https://github.com/oozcitak/xmlbuilder-js/issues/190).
+- Removed the `skipNullAttributes` option. `null` attributes are now skipped by default. Added the `keepNullAttributes` option in case someone needs the old behavior.
+- Removed the `skipNullNodes` option. `null` nodes are now skipped by default. Added the `keepNullNodes` option in case someone needs the old behavior.
+- `undefined` values are now skipped when converting JS objects.
+- Renamed stringify functions. See [#194](https://github.com/oozcitak/xmlbuilder-js/issues/194):
+
+ - `eleName` -> `name`
+ - `attName` -> `name`
+ - `eleText` -> `text`
+
+- Fixed argument order for `attribute` function in the writer. See [#196](https://github.com/oozcitak/xmlbuilder-js/issues/196).
+- Added `openAttribute` and `closeAttribute` functions to writer. See [#196](https://github.com/oozcitak/xmlbuilder-js/issues/196).
+- Added node types to node objects. Node types and writer states are exported by the module with the `nodeType` and `writerState` properties.
+- Fixed a bug where array items would not be correctly converted. See [#159](https://github.com/oozcitak/xmlbuilder-js/issues/159).
+- Fixed a bug where mixed-content inside JS objects with `#text` decorator would not be correctly converted. See [#171](https://github.com/oozcitak/xmlbuilder-js/issues/171).
+- Fixed a bug where JS objects would not be expanded in callback mode. See [#173](https://github.com/oozcitak/xmlbuilder-js/issues/173).
+- Fixed a bug where character validation would not obey document's XML version. Added separate validation for XML 1.0 and XML 1.1 documents. See [#169](https://github.com/oozcitak/xmlbuilder-js/issues/169).
+- Fixed a bug where names would not be validated according to the spec. See [#49](https://github.com/oozcitak/xmlbuilder-js/issues/49).
+- Renamed `text` property to `value` in comment and cdata nodes to unify the API.
+- Removed `doctype` function to prevent name clash with DOM implementation. Use the `dtd` function instead.
+- Removed dummy nodes from the XML tree (Those were created while chain-building the tree).
+- Renamed `attributes`property to `attribs` to prevent name clash with DOM property with the same name.
+- Implemented the DOM standard (read-only) to support XPath lookups. XML namespaces are not currently supported. See [#122](https://github.com/oozcitak/xmlbuilder-js/issues/122).
+
+## [10.1.1] - 2018-10-24
+
+- Fixed an edge case where a null node at root level would be printed although `skipNullNodes` was set. See [#187](https://github.com/oozcitak/xmlbuilder-js/issues/187).
+
+## [10.1.0] - 2018-10-10
+
+- Added the `skipNullNodes` option to skip nodes with null values. See [#158](https://github.com/oozcitak/xmlbuilder-js/issues/158).
+
+## [10.0.0] - 2018-04-26
+
+- Added current indentation level as a parameter to the onData function when in callback mode. See [#125](https://github.com/oozcitak/xmlbuilder-js/issues/125).
+- Added name of the current node and parent node to error messages where possible. See [#152](https://github.com/oozcitak/xmlbuilder-js/issues/152). This has the potential to break code depending on the content of error messages.
+- Fixed an issue where objects created with Object.create(null) created an error. See [#176](https://github.com/oozcitak/xmlbuilder-js/issues/176).
+- Added test builds for node.js v8 and v10.
+
+## [9.0.7] - 2018-02-09
+
+- Simplified regex used for validating encoding.
+
+## [9.0.4] - 2017-08-16
+
+- `spacebeforeslash` writer option accepts `true` as well as space char(s).
+
+## [9.0.3] - 2017-08-15
+
+- `spacebeforeslash` writer option can now be used with XML fragments.
+
+## [9.0.2] - 2017-08-15
+
+- Added the `spacebeforeslash` writer option to add a space character before closing tags of empty elements. See [#157](https://github.com/oozcitak/xmlbuilder-js/issues/157).
+
+## [9.0.1] - 2017-06-19
+
+- Fixed character validity checks to work with node.js 4.0 and 5.0\. See [#161](https://github.com/oozcitak/xmlbuilder-js/issues/161).
+
+## [9.0.0] - 2017-05-05
+
+- Removed case conversion options.
+- Removed support for node.js 4.0 and 5.0\. Minimum required version is now 6.0.
+- Fixed valid char filter to use XML 1.1 instead of 1.0\. See [#147](https://github.com/oozcitak/xmlbuilder-js/issues/147).
+- Added options for negative indentation and suppressing pretty printing of text nodes. See [#145](https://github.com/oozcitak/xmlbuilder-js/issues/145).
+
+## [8.2.2] - 2016-04-08
+
+- Falsy values can now be used as a text node in callback mode.
+
+## [8.2.1] - 2016-04-07
+
+- Falsy values can now be used as a text node. See [#117](https://github.com/oozcitak/xmlbuilder-js/issues/117).
+
+## [8.2.0] - 2016-04-01
+
+- Removed lodash dependency to keep the library small and simple. See [#114](https://github.com/oozcitak/xmlbuilder-js/issues/114), [#53](https://github.com/oozcitak/xmlbuilder-js/issues/53), and [#43](https://github.com/oozcitak/xmlbuilder-js/issues/43).
+- Added title case to name conversion options.
+
+## [8.1.0] - 2016-03-29
+
+- Added the callback option to the `begin` export function. When used with a callback function, the XML document will be generated in chunks and each chunk will be passed to the supplied function. In this mode, `begin` uses a different code path and the builder should use much less memory since the entire XML tree is not kept. There are a few drawbacks though. For example, traversing the document tree or adding attributes to a node after it is written is not possible. It is also not possible to remove nodes or attributes.
+
+```javascript
+var result = '';
+
+builder.begin(function(chunk) { result += chunk; })
+ .dec()
+ .ele('root')
+ .ele('xmlbuilder').up()
+ .end();
+```
+
+- Replaced native `Object.assign` with `lodash.assign` to support old JS engines. See [#111](https://github.com/oozcitak/xmlbuilder-js/issues/111).
+
+## [8.0.0] - 2016-03-25
+
+- Added the `begin` export function. See the wiki for details.
+- Added the ability to add comments and processing instructions before and after the root element. Added `commentBefore`, `commentAfter`, `instructionBefore` and `instructionAfter` functions for this purpose.
+- Dropped support for old node.js releases. Minimum required node.js version is now 4.0.
+
+## [7.0.0] - 2016-03-21
+
+- Processing instructions are now created as regular nodes. This is a major breaking change if you are using processing instructions. Previously processing instructions were inserted before their parent node. After this change processing instructions are appended to the children of the parent node. Note that it is not currently possible to insert processing instructions before or after the root element.
+
+ ```javascript
+ root.ele('node').ins('pi');
+ // pre-v7
+ <?pi?><node/>
+ // v7
+ <node><?pi?></node>
+ ```
+
+## [6.0.0] - 2016-03-20
+
+- Added custom XML writers. The default string conversion functions are now collected under the `XMLStringWriter` class which can be accessed by the `stringWriter(options)` function exported by the module. An `XMLStreamWriter` is also added which outputs the XML document to a writable stream. A stream writer can be created by calling the `streamWriter(stream, options)` function exported by the module. Both classes are heavily customizable and the details are added to the wiki. It is also possible to write an XML writer from scratch and use it when calling `end()` on the XML document.
+
+## [5.0.1] - 2016-03-08
+
+- Moved require statements for text case conversion to the top of files to reduce lazy requires.
+
+## [5.0.0] - 2016-03-05
+
+- Added text case option for element names and attribute names. Valid cases are `lower`, `upper`, `camel`, `kebab` and `snake`.
+- Attribute and element values are escaped according to the [Canonical XML 1.0 specification](http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping). See [#54](https://github.com/oozcitak/xmlbuilder-js/issues/54) and [#86](https://github.com/oozcitak/xmlbuilder-js/issues/86).
+- Added the `allowEmpty` option to `end()`. When this option is set, empty elements are not self-closed.
+- Added support for [nested CDATA](https://en.wikipedia.org/wiki/CDATA#Nesting). The triad `]]>` in CDATA is now automatically replaced with `]]]]><![CDATA[>`.
+
+## [4.2.1] - 2016-01-15
+
+- Updated lodash dependency to 4.0.0.
+
+## [4.2.0] - 2015-12-16
+
+- Added the `noDoubleEncoding` option to `create()` to control whether existing html entities are encoded.
+
+## [4.1.0] - 2015-11-11
+
+- Added the `separateArrayItems` option to `create()` to control how arrays are handled when converting from objects. e.g.
+
+```javascript
+root.ele({ number: [ "one", "two" ]});
+// with separateArrayItems: true
+<number>
+ <one/>
+ <two/>
+</number>
+// with separateArrayItems: false
+<number>one</number>
+<number>two</number>
+```
+
+## [4.0.0] - 2015-11-01
+
+- Removed the `#list` decorator. Array items are now created as child nodes by default.
+- Fixed a bug where the XML encoding string was checked partially.
+
+## [3.1.0] - 2015-09-19
+
+- `#list` decorator ignores empty arrays.
+
+## [3.0.0] - 2015-09-10
+
+- Allow `\r`, `\n` and `\t` in attribute values without escaping. See [#86](https://github.com/oozcitak/xmlbuilder-js/issues/86).
+
+## [2.6.5] - 2015-09-09
+
+- Use native `isArray` instead of lodash.
+- Indentation of processing instructions are set to the parent element's.
+
+## [2.6.4] - 2015-05-27
+
+- Updated lodash dependency to 3.5.0.
+
+## [2.6.3] - 2015-05-27
+
+- Bumped version because previous release was not published on npm.
+
+## [2.6.2] - 2015-03-10
+
+- Updated lodash dependency to 3.5.0.
+
+## [2.6.1] - 2015-02-20
+
+- Updated lodash dependency to 3.3.0.
+
+## [2.6.0] - 2015-02-20
+
+- Fixed a bug where the `XMLNode` constructor overwrote the super class parent.
+- Removed document property from cloned nodes.
+- Switched to mocha.js for testing.
+
+## [2.5.2] - 2015-02-16
+
+- Updated lodash dependency to 3.2.0.
+
+## [2.5.1] - 2015-02-09
+
+- Updated lodash dependency to 3.1.0.
+- Support all node >= 0.8.
+
+## [2.5.0] - 2015-00-03
+
+- Updated lodash dependency to 3.0.0.
+
+## [2.4.6] - 2015-01-26
+
+- Show more information from attribute creation with null values.
+- Added iojs as an engine.
+- Self close elements with empty text.
+
+## [2.4.5] - 2014-11-15
+
+- Fixed prepublish script to run on windows.
+- Fixed bug in XMLStringifier where an undefined value was used while reporting an invalid encoding value.
+- Moved require statements to the top of files to reduce lazy requires. See [#62](https://github.com/oozcitak/xmlbuilder-js/issues/62).
+
+## [2.4.4] - 2014-09-08
+
+- Added the `offset` option to `toString()` for use in XML fragments.
+
+## [2.4.3] - 2014-08-13
+
+- Corrected license in package description.
+
+## [2.4.2] - 2014-08-13
+
+- Dropped performance test and memwatch dependency.
+
+## [2.4.1] - 2014-08-12
+
+- Fixed a bug where empty indent string was omitted when pretty printing. See [#59](https://github.com/oozcitak/xmlbuilder-js/issues/59).
+
+## [2.4.0] - 2014-08-04
+
+- Correct cases of pubID and sysID.
+- Use single lodash instead of separate npm modules. See [#53](https://github.com/oozcitak/xmlbuilder-js/issues/53).
+- Escape according to Canonical XML 1.0\. See [#54](https://github.com/oozcitak/xmlbuilder-js/issues/54).
+
+## [2.3.0] - 2014-07-17
+
+- Convert objects to JS primitives while sanitizing user input.
+- Object builder preserves items with null values. See [#44](https://github.com/oozcitak/xmlbuilder-js/issues/44).
+- Use modularized lodash functions to cut down dependencies.
+- Process empty objects when converting from objects so that we don't throw on empty child objects.
+
+## [2.2.1] - 2014-04-04
+
+- Bumped version because previous release was not published on npm.
+
+## [2.2.0] - 2014-04-04
+
+- Switch to lodash from underscore.
+- Removed legacy `ext` option from `create()`.
+- Drop old node versions: 0.4, 0.5, 0.6\. 0.8 is the minimum requirement from now on.
+
+## [2.1.0] - 2013-12-30
+
+- Removed duplicate null checks from constructors.
+- Fixed node count in performance test.
+- Added option for skipping null attribute values. See [#26](https://github.com/oozcitak/xmlbuilder-js/issues/26).
+- Allow multiple values in `att()` and `ins()`.
+- Added ability to run individual performance tests.
+- Added flag for ignoring decorator strings.
+
+## [2.0.1] - 2013-12-24
+
+- Removed performance tests from npm package.
+
+## [2.0.0] - 2013-12-24
+
+- Combined loops for speed up.
+- Added support for the DTD and XML declaration.
+- `clone` includes attributes.
+- Added performance tests.
+- Evaluate attribute value if function.
+- Evaluate instruction value if function.
+
+## [1.1.2] - 2013-12-11
+
+- Changed processing instruction decorator to `?`.
+
+## [1.1.1] - 2013-12-11
+
+- Added processing instructions to JS object conversion.
+
+## [1.1.0] - 2013-12-10
+
+- Added license to package.
+- `create()` and `element()` accept JS object to fully build the document.
+- Added `nod()` and `n()` aliases for `node()`.
+- Renamed `convertAttChar` decorator to `convertAttKey`.
+- Ignore empty decorator strings when converting JS objects.
+
+## [1.0.2] - 2013-11-27
+
+- Removed temp file which was accidentally included in the package.
+
+## [1.0.1] - 2013-11-27
+
+- Custom stringify functions affect current instance only.
+
+## [1.0.0] - 2013-11-27
+
+- Added processing instructions.
+- Added stringify functions to sanitize and convert input values.
+- Added option for headless XML documents.
+- Added vows tests.
+- Removed Makefile. Using npm publish scripts instead.
+- Removed the `begin()` function. `create()` begins the document by creating the root node.
+
+## [0.4.3] - 2013-11-08
+
+- Added option to include surrogate pairs in XML content. See [#29](https://github.com/oozcitak/xmlbuilder-js/issues/29).
+- Fixed empty value string representation in pretty mode.
+- Added pre and postpublish scripts to package.json.
+- Filtered out prototype properties when appending attributes. See [#31](https://github.com/oozcitak/xmlbuilder-js/issues/31).
+
+## [0.4.2] - 2012-09-14
+
+- Removed README.md from `.npmignore`.
+
+## [0.4.1] - 2012-08-31
+
+- Removed `begin()` calls in favor of `XMLBuilder` constructor.
+- Added the `end()` function. `end()` is a convenience over `doc().toString()`.
+
+## [0.4.0] - 2012-08-31
+
+- Added arguments to `XMLBuilder` constructor to allow the name of the root element and XML prolog to be defined in one line.
+- Soft deprecated `begin()`.
+
+## [0.3.11] - 2012-08-13
+
+- Package keywords are fixed to be an array of values.
+
+## [0.3.10] - 2012-08-13
+
+- Brought back npm package contents which were lost due to incorrect configuration of `package.json` in previous releases.
+
+## [0.3.3] - 2012-07-27
+
+- Implemented `importXMLBuilder()`.
+
+## [0.3.2] - 2012-07-20
+
+- Fixed a duplicated escaping problem on `element()`.
+- Fixed a problem with text node creation from empty string.
+- Calling `root()` on the document element returns the root element.
+- `XMLBuilder` no longer extends `XMLFragment`.
+
+## [0.3.1] - 2011-11-28
+
+- Added guards for document element so that nodes cannot be inserted at document level.
+
+## [0.3.0] - 2011-11-28
+
+- Added `doc()` to return the document element.
+
+## [0.2.2] - 2011-11-28
+
+- Prevent code relying on `up()`'s older behavior to break.
+
+## [0.2.1] - 2011-11-28
+
+- Added the `root()` function.
+
+## [0.2.0] - 2011-11-21
+
+- Added Travis-CI integration.
+- Added coffee-script dependency.
+- Added insert, traversal and delete functions.
+
+## [0.1.7] - 2011-10-25
+
+- No changes. Accidental release.
+
+## [0.1.6] - 2011-10-25
+
+- Corrected `package.json` bugs link to `url` from `web`.
+
+## [0.1.5] - 2011-08-08
+
+- Added missing npm package contents.
+
+## [0.1.4] - 2011-07-29
+
+- Text-only nodes are no longer indented.
+- Added documentation for multiple instances.
+
+## [0.1.3] - 2011-07-27
+
+- Exported the `create()` function to return a new instance. This allows multiple builder instances to be constructed.
+- Fixed `u()` function so that it now correctly calls `up()`.
+- Fixed typo in `element()` so that `attributes` and `text` can be passed interchangeably.
+
+## [0.1.2] - 2011-06-03
+
+- `ele()` accepts element text.
+- `attributes()` now overrides existing attributes if passed the same attribute name.
+
+## [0.1.1] - 2011-05-19
+
+- Added the raw output option.
+- Removed most validity checks.
+
+## [0.1.0] - 2011-04-27
+
+- `text()` and `cdata()` now return parent element.
+- Attribute values are escaped.
+
+## [0.0.7] - 2011-04-23
+
+- Coerced text values to string.
+
+## [0.0.6] - 2011-02-23
+
+- Added support for XML comments.
+- Text nodes are checked against CharData.
+
+## [0.0.5] - 2010-12-31
+
+- Corrected the name of the main npm module in `package.json`.
+
+## [0.0.4] - 2010-12-28
+
+- Added `.npmignore`.
+
+## [0.0.3] - 2010-12-27
+
+- root element is now constructed in `begin()`.
+- moved prolog to `begin()`.
+- Added the ability to have CDATA in element text.
+- Removed unused prolog aliases.
+- Removed `builder()` function from main module.
+- Added the name of the main npm module in `package.json`.
+
+## [0.0.2] - 2010-11-03
+
+- `element()` expands nested arrays.
+- Added pretty printing.
+- Added the `up()`, `build()` and `prolog()` functions.
+- Added readme.
+
+## 0.0.1 - 2010-11-02
+
+- Initial release
+
+[0.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.1...v0.0.2
+[0.0.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.2...v0.0.3
+[0.0.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.3...v0.0.4
+[0.0.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.4...v0.0.5
+[0.0.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.5...v0.0.6
+[0.0.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.6...v0.0.7
+[0.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.7...v0.1.0
+[0.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.0...v0.1.1
+[0.1.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.1...v0.1.2
+[0.1.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.2...v0.1.3
+[0.1.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.3...v0.1.4
+[0.1.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.4...v0.1.5
+[0.1.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.5...v0.1.6
+[0.1.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.6...v0.1.7
+[0.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.7...v0.2.0
+[0.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.0...v0.2.1
+[0.2.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.1...v0.2.2
+[0.3.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.2...v0.3.0
+[0.3.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.0...v0.3.1
+[0.3.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.1...v0.3.2
+[0.3.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.2...v0.3.3
+[0.3.10]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.3...v0.3.10
+[0.3.11]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.10...v0.3.11
+[0.4.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.11...v0.4.0
+[0.4.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.0...v0.4.1
+[0.4.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.1...v0.4.2
+[0.4.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.2...v0.4.3
+[1.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.3...v1.0.0
+[1.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.0...v1.0.1
+[1.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.1...v1.0.2
+[1.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.2...v1.1.0
+[1.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.0...v1.1.1
+[1.1.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.1...v1.1.2
+[2.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.2...v2.0.0
+[2.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.0.0...v2.0.1
+[2.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.0.1...v2.1.0
+[2.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.1.0...v2.2.0
+[2.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.2.0...v2.2.1
+[2.3.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.2.1...v2.3.0
+[2.4.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.3.0...v2.4.0
+[2.4.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.0...v2.4.1
+[2.4.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.1...v2.4.2
+[2.4.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.2...v2.4.3
+[2.4.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.3...v2.4.4
+[2.4.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.4...v2.4.5
+[2.4.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.5...v2.4.6
+[2.5.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.6...v2.5.0
+[2.5.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.0...v2.5.1
+[2.5.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.1...v2.5.2
+[2.6.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.2...v2.6.0
+[2.6.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.0...v2.6.1
+[2.6.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.1...v2.6.2
+[2.6.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.2...v2.6.3
+[2.6.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.3...v2.6.4
+[2.6.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.4...v2.6.5
+[3.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.5...v3.0.0
+[3.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v3.0.0...v3.1.0
+[4.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v3.1.0...v4.0.0
+[4.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.0.0...v4.1.0
+[4.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.1.0...v4.2.0
+[4.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.2.0...v4.2.1
+[5.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.2.1...v5.0.0
+[5.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v5.0.0...v5.0.1
+[6.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v5.0.1...v6.0.0
+[7.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v6.0.0...v7.0.0
+[8.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v7.0.0...v8.0.0
+[8.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.0.0...v8.1.0
+[8.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.1.0...v8.2.0
+[8.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.0...v8.2.1
+[8.2.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.1...v8.2.2
+[9.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.2...v9.0.0
+[9.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.0...v9.0.1
+[9.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.1...v9.0.2
+[9.0.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.2...v9.0.3
+[9.0.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.3...v9.0.4
+[9.0.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.4...v9.0.7
+[10.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.7...v10.0.0
+[10.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v10.0.0...v10.1.0
+[10.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v10.1.0...v10.1.1
+[11.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v10.1.1...v11.0.0
+[11.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v11.0.0...v11.0.1
+[12.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v11.0.1...v12.0.0
+[12.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v12.0.0...v12.0.1
+[13.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v12.0.1...v13.0.0
+[13.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v13.0.0...v13.0.1
+[13.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v13.0.1...v13.0.2
+[14.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v13.0.2...v14.0.0
+[15.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v14.0.0...v15.0.0
+[15.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v15.0.0...v15.0.1
+[15.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v15.0.1...v15.1.0
+[15.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v15.1.0...v15.1.1
diff --git a/generator/node_modules/xmlbuilder/LICENSE b/generator/node_modules/xmlbuilder/LICENSE
new file mode 100644
index 0000000..9fb9700
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2013 Ozgur Ozcitak
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/generator/node_modules/xmlbuilder/README.md b/generator/node_modules/xmlbuilder/README.md
new file mode 100644
index 0000000..d15b627
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/README.md
@@ -0,0 +1,103 @@
+# xmlbuilder-js
+
+An XML builder for [node.js](https://nodejs.org/) similar to
+[java-xmlbuilder](https://github.com/jmurty/java-xmlbuilder).
+
+[![License](http://img.shields.io/npm/l/xmlbuilder.svg?style=flat-square)](http://opensource.org/licenses/MIT)
+[![NPM Version](http://img.shields.io/npm/v/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder)
+[![NPM Downloads](https://img.shields.io/npm/dm/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder)
+
+[![Travis Build Status](http://img.shields.io/travis/oozcitak/xmlbuilder-js.svg?style=flat-square)](http://travis-ci.org/oozcitak/xmlbuilder-js)
+[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/bf7odb20hj77isry?svg=true)](https://ci.appveyor.com/project/oozcitak/xmlbuilder-js)
+[![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://david-dm.org/oozcitak/xmlbuilder-js)
+[![Code Coverage](https://img.shields.io/coveralls/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://coveralls.io/github/oozcitak/xmlbuilder-js)
+
+### Announcing `xmlbuilder2`:
+
+The new release of `xmlbuilder` is available at [`xmlbuilder2`](https://github.com/oozcitak/xmlbuilder2)! `xmlbuilder2` has been redesigned from the ground up to be fully conforming to the [modern DOM specification](https://dom.spec.whatwg.org). It supports XML namespaces, provides built-in converters for multiple formats, collection functions, and more. Please see [upgrading from xmlbuilder](https://oozcitak.github.io/xmlbuilder2/upgrading-from-xmlbuilder.html) in the wiki.
+
+New development will be focused towards `xmlbuilder2`; `xmlbuilder` will only receive critical bug fixes.
+
+### Installation:
+
+``` sh
+npm install xmlbuilder
+```
+
+### Usage:
+
+``` js
+var builder = require('xmlbuilder');
+
+var xml = builder.create('root')
+ .ele('xmlbuilder')
+ .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git')
+ .end({ pretty: true});
+
+console.log(xml);
+```
+
+will result in:
+
+``` xml
+<?xml version="1.0"?>
+<root>
+ <xmlbuilder>
+ <repo type="git">git://github.com/oozcitak/xmlbuilder-js.git</repo>
+ </xmlbuilder>
+</root>
+```
+
+It is also possible to convert objects into nodes:
+
+``` js
+var builder = require('xmlbuilder');
+
+var obj = {
+ root: {
+ xmlbuilder: {
+ repo: {
+ '@type': 'git', // attributes start with @
+ '#text': 'git://github.com/oozcitak/xmlbuilder-js.git' // text node
+ }
+ }
+ }
+};
+
+var xml = builder.create(obj).end({ pretty: true});
+console.log(xml);
+```
+
+If you need to do some processing:
+
+``` js
+var builder = require('xmlbuilder');
+
+var root = builder.create('squares');
+root.com('f(x) = x^2');
+for(var i = 1; i <= 5; i++)
+{
+ var item = root.ele('data');
+ item.att('x', i);
+ item.att('y', i * i);
+}
+
+var xml = root.end({ pretty: true});
+console.log(xml);
+```
+
+This will result in:
+
+``` xml
+<?xml version="1.0"?>
+<squares>
+ <!-- f(x) = x^2 -->
+ <data x="1" y="1"/>
+ <data x="2" y="4"/>
+ <data x="3" y="9"/>
+ <data x="4" y="16"/>
+ <data x="5" y="25"/>
+</squares>
+```
+
+See the [wiki](https://github.com/oozcitak/xmlbuilder-js/wiki) for details and [examples](https://github.com/oozcitak/xmlbuilder-js/wiki/Examples) for more complex examples.
diff --git a/generator/node_modules/xmlbuilder/lib/Derivation.js b/generator/node_modules/xmlbuilder/lib/Derivation.js
new file mode 100644
index 0000000..ae3d951
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/Derivation.js
@@ -0,0 +1,10 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ module.exports = {
+ Restriction: 1,
+ Extension: 2,
+ Union: 4,
+ List: 8
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/DocumentPosition.js b/generator/node_modules/xmlbuilder/lib/DocumentPosition.js
new file mode 100644
index 0000000..55abc5c
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/DocumentPosition.js
@@ -0,0 +1,12 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ module.exports = {
+ Disconnected: 1,
+ Preceding: 2,
+ Following: 4,
+ Contains: 8,
+ ContainedBy: 16,
+ ImplementationSpecific: 32
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/NodeType.js b/generator/node_modules/xmlbuilder/lib/NodeType.js
new file mode 100644
index 0000000..40990ca
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/NodeType.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ module.exports = {
+ Element: 1,
+ Attribute: 2,
+ Text: 3,
+ CData: 4,
+ EntityReference: 5,
+ EntityDeclaration: 6,
+ ProcessingInstruction: 7,
+ Comment: 8,
+ Document: 9,
+ DocType: 10,
+ DocumentFragment: 11,
+ NotationDeclaration: 12,
+ // Numeric codes up to 200 are reserved to W3C for possible future use.
+ // Following are types internal to this library:
+ Declaration: 201,
+ Raw: 202,
+ AttributeDeclaration: 203,
+ ElementDeclaration: 204,
+ Dummy: 205
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/OperationType.js b/generator/node_modules/xmlbuilder/lib/OperationType.js
new file mode 100644
index 0000000..47b1046
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/OperationType.js
@@ -0,0 +1,11 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ module.exports = {
+ Clones: 1,
+ Imported: 2,
+ Deleted: 3,
+ Renamed: 4,
+ Adopted: 5
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/Utility.js b/generator/node_modules/xmlbuilder/lib/Utility.js
new file mode 100644
index 0000000..c338865
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/Utility.js
@@ -0,0 +1,88 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Copies all enumerable own properties from `sources` to `target`
+ var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject,
+ hasProp = {}.hasOwnProperty;
+
+ assign = function(target, ...sources) {
+ var i, key, len, source;
+ if (isFunction(Object.assign)) {
+ Object.assign.apply(null, arguments);
+ } else {
+ for (i = 0, len = sources.length; i < len; i++) {
+ source = sources[i];
+ if (source != null) {
+ for (key in source) {
+ if (!hasProp.call(source, key)) continue;
+ target[key] = source[key];
+ }
+ }
+ }
+ }
+ return target;
+ };
+
+ // Determines if `val` is a Function object
+ isFunction = function(val) {
+ return !!val && Object.prototype.toString.call(val) === '[object Function]';
+ };
+
+ // Determines if `val` is an Object
+ isObject = function(val) {
+ var ref;
+ return !!val && ((ref = typeof val) === 'function' || ref === 'object');
+ };
+
+ // Determines if `val` is an Array
+ isArray = function(val) {
+ if (isFunction(Array.isArray)) {
+ return Array.isArray(val);
+ } else {
+ return Object.prototype.toString.call(val) === '[object Array]';
+ }
+ };
+
+ // Determines if `val` is an empty Array or an Object with no own properties
+ isEmpty = function(val) {
+ var key;
+ if (isArray(val)) {
+ return !val.length;
+ } else {
+ for (key in val) {
+ if (!hasProp.call(val, key)) continue;
+ return false;
+ }
+ return true;
+ }
+ };
+
+ // Determines if `val` is a plain Object
+ isPlainObject = function(val) {
+ var ctor, proto;
+ return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object));
+ };
+
+ // Gets the primitive value of an object
+ getValue = function(obj) {
+ if (isFunction(obj.valueOf)) {
+ return obj.valueOf();
+ } else {
+ return obj;
+ }
+ };
+
+ module.exports.assign = assign;
+
+ module.exports.isFunction = isFunction;
+
+ module.exports.isObject = isObject;
+
+ module.exports.isArray = isArray;
+
+ module.exports.isEmpty = isEmpty;
+
+ module.exports.isPlainObject = isPlainObject;
+
+ module.exports.getValue = getValue;
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/WriterState.js b/generator/node_modules/xmlbuilder/lib/WriterState.js
new file mode 100644
index 0000000..b1cd7a4
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/WriterState.js
@@ -0,0 +1,10 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ module.exports = {
+ None: 0,
+ OpenTag: 1,
+ InsideTag: 2,
+ CloseTag: 3
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLAttribute.js b/generator/node_modules/xmlbuilder/lib/XMLAttribute.js
new file mode 100644
index 0000000..71922b7
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLAttribute.js
@@ -0,0 +1,130 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLAttribute, XMLNode;
+
+ NodeType = require('./NodeType');
+
+ XMLNode = require('./XMLNode');
+
+ // Represents an attribute
+ module.exports = XMLAttribute = (function() {
+ class XMLAttribute {
+ // Initializes a new instance of `XMLAttribute`
+
+ // `parent` the parent node
+ // `name` attribute target
+ // `value` attribute value
+ constructor(parent, name, value) {
+ this.parent = parent;
+ if (this.parent) {
+ this.options = this.parent.options;
+ this.stringify = this.parent.stringify;
+ }
+ if (name == null) {
+ throw new Error("Missing attribute name. " + this.debugInfo(name));
+ }
+ this.name = this.stringify.name(name);
+ this.value = this.stringify.attValue(value);
+ this.type = NodeType.Attribute;
+ // DOM level 3
+ this.isId = false;
+ this.schemaTypeInfo = null;
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.attribute(this, this.options.writer.filterOptions(options));
+ }
+
+
+ // Returns debug string for this node
+ debugInfo(name) {
+ name = name || this.name;
+ if (name == null) {
+ return "parent: <" + this.parent.name + ">";
+ } else {
+ return "attribute: {" + name + "}, parent: <" + this.parent.name + ">";
+ }
+ }
+
+ isEqualNode(node) {
+ if (node.namespaceURI !== this.namespaceURI) {
+ return false;
+ }
+ if (node.prefix !== this.prefix) {
+ return false;
+ }
+ if (node.localName !== this.localName) {
+ return false;
+ }
+ if (node.value !== this.value) {
+ return false;
+ }
+ return true;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLAttribute.prototype, 'nodeType', {
+ get: function() {
+ return this.type;
+ }
+ });
+
+ Object.defineProperty(XMLAttribute.prototype, 'ownerElement', {
+ get: function() {
+ return this.parent;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLAttribute.prototype, 'textContent', {
+ get: function() {
+ return this.value;
+ },
+ set: function(value) {
+ return this.value = value || '';
+ }
+ });
+
+ // DOM level 4
+ Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', {
+ get: function() {
+ return '';
+ }
+ });
+
+ Object.defineProperty(XMLAttribute.prototype, 'prefix', {
+ get: function() {
+ return '';
+ }
+ });
+
+ Object.defineProperty(XMLAttribute.prototype, 'localName', {
+ get: function() {
+ return this.name;
+ }
+ });
+
+ Object.defineProperty(XMLAttribute.prototype, 'specified', {
+ get: function() {
+ return true;
+ }
+ });
+
+ return XMLAttribute;
+
+ }).call(this);
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLCData.js b/generator/node_modules/xmlbuilder/lib/XMLCData.js
new file mode 100644
index 0000000..91a4410
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLCData.js
@@ -0,0 +1,41 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLCData, XMLCharacterData;
+
+ NodeType = require('./NodeType');
+
+ XMLCharacterData = require('./XMLCharacterData');
+
+ // Represents a CDATA node
+ module.exports = XMLCData = class XMLCData extends XMLCharacterData {
+ // Initializes a new instance of `XMLCData`
+
+ // `text` CDATA text
+ constructor(parent, text) {
+ super(parent);
+ if (text == null) {
+ throw new Error("Missing CDATA text. " + this.debugInfo());
+ }
+ this.name = "#cdata-section";
+ this.type = NodeType.CData;
+ this.value = this.stringify.cdata(text);
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.cdata(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLCharacterData.js b/generator/node_modules/xmlbuilder/lib/XMLCharacterData.js
new file mode 100644
index 0000000..13b9c00
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLCharacterData.js
@@ -0,0 +1,86 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var XMLCharacterData, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ // Represents a character data node
+ module.exports = XMLCharacterData = (function() {
+ class XMLCharacterData extends XMLNode {
+ // Initializes a new instance of `XMLCharacterData`
+
+ constructor(parent) {
+ super(parent);
+ this.value = '';
+ }
+
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // DOM level 1 functions to be implemented later
+ substringData(offset, count) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ appendData(arg) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ insertData(offset, arg) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ deleteData(offset, count) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ replaceData(offset, count, arg) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ isEqualNode(node) {
+ if (!super.isEqualNode(node)) {
+ return false;
+ }
+ if (node.data !== this.data) {
+ return false;
+ }
+ return true;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLCharacterData.prototype, 'data', {
+ get: function() {
+ return this.value;
+ },
+ set: function(value) {
+ return this.value = value || '';
+ }
+ });
+
+ Object.defineProperty(XMLCharacterData.prototype, 'length', {
+ get: function() {
+ return this.value.length;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLCharacterData.prototype, 'textContent', {
+ get: function() {
+ return this.value;
+ },
+ set: function(value) {
+ return this.value = value || '';
+ }
+ });
+
+ return XMLCharacterData;
+
+ }).call(this);
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLComment.js b/generator/node_modules/xmlbuilder/lib/XMLComment.js
new file mode 100644
index 0000000..2254d63
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLComment.js
@@ -0,0 +1,41 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLCharacterData, XMLComment;
+
+ NodeType = require('./NodeType');
+
+ XMLCharacterData = require('./XMLCharacterData');
+
+ // Represents a comment node
+ module.exports = XMLComment = class XMLComment extends XMLCharacterData {
+ // Initializes a new instance of `XMLComment`
+
+ // `text` comment text
+ constructor(parent, text) {
+ super(parent);
+ if (text == null) {
+ throw new Error("Missing comment text. " + this.debugInfo());
+ }
+ this.name = "#comment";
+ this.type = NodeType.Comment;
+ this.value = this.stringify.comment(text);
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.comment(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js b/generator/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js
new file mode 100644
index 0000000..32e896d
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js
@@ -0,0 +1,80 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList;
+
+ XMLDOMErrorHandler = require('./XMLDOMErrorHandler');
+
+ XMLDOMStringList = require('./XMLDOMStringList');
+
+ // Implements the DOMConfiguration interface
+ module.exports = XMLDOMConfiguration = (function() {
+ class XMLDOMConfiguration {
+ constructor() {
+ var clonedSelf;
+ this.defaultParams = {
+ "canonical-form": false,
+ "cdata-sections": false,
+ "comments": false,
+ "datatype-normalization": false,
+ "element-content-whitespace": true,
+ "entities": true,
+ "error-handler": new XMLDOMErrorHandler(),
+ "infoset": true,
+ "validate-if-schema": false,
+ "namespaces": true,
+ "namespace-declarations": true,
+ "normalize-characters": false,
+ "schema-location": '',
+ "schema-type": '',
+ "split-cdata-sections": true,
+ "validate": false,
+ "well-formed": true
+ };
+ this.params = clonedSelf = Object.create(this.defaultParams);
+ }
+
+ // Gets the value of a parameter.
+
+ // `name` name of the parameter
+ getParameter(name) {
+ if (this.params.hasOwnProperty(name)) {
+ return this.params[name];
+ } else {
+ return null;
+ }
+ }
+
+ // Checks if setting a parameter to a specific value is supported.
+
+ // `name` name of the parameter
+ // `value` parameter value
+ canSetParameter(name, value) {
+ return true;
+ }
+
+ // Sets the value of a parameter.
+
+ // `name` name of the parameter
+ // `value` new value or null if the user wishes to unset the parameter
+ setParameter(name, value) {
+ if (value != null) {
+ return this.params[name] = value;
+ } else {
+ return delete this.params[name];
+ }
+ }
+
+ };
+
+ // Returns the list of parameter names
+ Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', {
+ get: function() {
+ return new XMLDOMStringList(Object.keys(this.defaultParams));
+ }
+ });
+
+ return XMLDOMConfiguration;
+
+ }).call(this);
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js b/generator/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js
new file mode 100644
index 0000000..b546a0c
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js
@@ -0,0 +1,20 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents the error handler for DOM operations
+ var XMLDOMErrorHandler;
+
+ module.exports = XMLDOMErrorHandler = class XMLDOMErrorHandler {
+ // Initializes a new instance of `XMLDOMErrorHandler`
+
+ constructor() {}
+
+ // Called on the error handler when an error occurs.
+
+ // `error` the error message as a string
+ handleError(error) {
+ throw new Error(error);
+ }
+
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLDOMImplementation.js b/generator/node_modules/xmlbuilder/lib/XMLDOMImplementation.js
new file mode 100644
index 0000000..4b5be79
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLDOMImplementation.js
@@ -0,0 +1,55 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Implements the DOMImplementation interface
+ var XMLDOMImplementation;
+
+ module.exports = XMLDOMImplementation = class XMLDOMImplementation {
+ // Tests if the DOM implementation implements a specific feature.
+
+ // `feature` package name of the feature to test. In Level 1, the
+ // legal values are "HTML" and "XML" (case-insensitive).
+ // `version` version number of the package name to test.
+ // In Level 1, this is the string "1.0". If the version is
+ // not specified, supporting any version of the feature will
+ // cause the method to return true.
+ hasFeature(feature, version) {
+ return true;
+ }
+
+ // Creates a new document type declaration.
+
+ // `qualifiedName` qualified name of the document type to be created
+ // `publicId` public identifier of the external subset
+ // `systemId` system identifier of the external subset
+ createDocumentType(qualifiedName, publicId, systemId) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ // Creates a new document.
+
+ // `namespaceURI` namespace URI of the document element to create
+ // `qualifiedName` the qualified name of the document to be created
+ // `doctype` the type of document to be created or null
+ createDocument(namespaceURI, qualifiedName, doctype) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ // Creates a new HTML document.
+
+ // `title` document title
+ createHTMLDocument(title) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ // Returns a specialized object which implements the specialized APIs
+ // of the specified feature and version.
+
+ // `feature` name of the feature requested.
+ // `version` version number of the feature to test
+ getFeature(feature, version) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLDOMStringList.js b/generator/node_modules/xmlbuilder/lib/XMLDOMStringList.js
new file mode 100644
index 0000000..7e87e8e
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLDOMStringList.js
@@ -0,0 +1,44 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents a list of string entries
+ var XMLDOMStringList;
+
+ module.exports = XMLDOMStringList = (function() {
+ class XMLDOMStringList {
+ // Initializes a new instance of `XMLDOMStringList`
+ // This is just a wrapper around an ordinary
+ // JS array.
+
+ // `arr` the array of string values
+ constructor(arr) {
+ this.arr = arr || [];
+ }
+
+ // Returns the indexth item in the collection.
+
+ // `index` index into the collection
+ item(index) {
+ return this.arr[index] || null;
+ }
+
+ // Test if a string is part of this DOMStringList.
+
+ // `str` the string to look for
+ contains(str) {
+ return this.arr.indexOf(str) !== -1;
+ }
+
+ };
+
+ // Returns the number of strings in the list.
+ Object.defineProperty(XMLDOMStringList.prototype, 'length', {
+ get: function() {
+ return this.arr.length;
+ }
+ });
+
+ return XMLDOMStringList;
+
+ }).call(this);
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLDTDAttList.js b/generator/node_modules/xmlbuilder/lib/XMLDTDAttList.js
new file mode 100644
index 0000000..8637ea2
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLDTDAttList.js
@@ -0,0 +1,66 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDAttList, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents an attribute list
+ module.exports = XMLDTDAttList = class XMLDTDAttList extends XMLNode {
+ // Initializes a new instance of `XMLDTDAttList`
+
+ // `parent` the parent `XMLDocType` element
+ // `elementName` the name of the element containing this attribute
+ // `attributeName` attribute name
+ // `attributeType` type of the attribute
+ // `defaultValueType` default value type (either #REQUIRED, #IMPLIED,
+ // #FIXED or #DEFAULT)
+ // `defaultValue` default value of the attribute
+ // (only used for #FIXED or #DEFAULT)
+ constructor(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ super(parent);
+ if (elementName == null) {
+ throw new Error("Missing DTD element name. " + this.debugInfo());
+ }
+ if (attributeName == null) {
+ throw new Error("Missing DTD attribute name. " + this.debugInfo(elementName));
+ }
+ if (!attributeType) {
+ throw new Error("Missing DTD attribute type. " + this.debugInfo(elementName));
+ }
+ if (!defaultValueType) {
+ throw new Error("Missing DTD attribute default. " + this.debugInfo(elementName));
+ }
+ if (defaultValueType.indexOf('#') !== 0) {
+ defaultValueType = '#' + defaultValueType;
+ }
+ if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) {
+ throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. " + this.debugInfo(elementName));
+ }
+ if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) {
+ throw new Error("Default value only applies to #FIXED or #DEFAULT. " + this.debugInfo(elementName));
+ }
+ this.elementName = this.stringify.name(elementName);
+ this.type = NodeType.AttributeDeclaration;
+ this.attributeName = this.stringify.name(attributeName);
+ this.attributeType = this.stringify.dtdAttType(attributeType);
+ if (defaultValue) {
+ this.defaultValue = this.stringify.dtdAttDefault(defaultValue);
+ }
+ this.defaultValueType = defaultValueType;
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLDTDElement.js b/generator/node_modules/xmlbuilder/lib/XMLDTDElement.js
new file mode 100644
index 0000000..a154679
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLDTDElement.js
@@ -0,0 +1,44 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDElement, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents an attribute
+ module.exports = XMLDTDElement = class XMLDTDElement extends XMLNode {
+ // Initializes a new instance of `XMLDTDElement`
+
+ // `parent` the parent `XMLDocType` element
+ // `name` element name
+ // `value` element content (defaults to #PCDATA)
+ constructor(parent, name, value) {
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing DTD element name. " + this.debugInfo());
+ }
+ if (!value) {
+ value = '(#PCDATA)';
+ }
+ if (Array.isArray(value)) {
+ value = '(' + value.join(',') + ')';
+ }
+ this.name = this.stringify.name(name);
+ this.type = NodeType.ElementDeclaration;
+ this.value = this.stringify.dtdElementValue(value);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLDTDEntity.js b/generator/node_modules/xmlbuilder/lib/XMLDTDEntity.js
new file mode 100644
index 0000000..76bf665
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLDTDEntity.js
@@ -0,0 +1,115 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDEntity, XMLNode, isObject;
+
+ ({isObject} = require('./Utility'));
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents an entity declaration in the DTD
+ module.exports = XMLDTDEntity = (function() {
+ class XMLDTDEntity extends XMLNode {
+ // Initializes a new instance of `XMLDTDEntity`
+
+ // `parent` the parent `XMLDocType` element
+ // `pe` whether this is a parameter entity or a general entity
+ // defaults to `false` (general entity)
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ // `value.nData` notation declaration
+ constructor(parent, pe, name, value) {
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing DTD entity name. " + this.debugInfo(name));
+ }
+ if (value == null) {
+ throw new Error("Missing DTD entity value. " + this.debugInfo(name));
+ }
+ this.pe = !!pe;
+ this.name = this.stringify.name(name);
+ this.type = NodeType.EntityDeclaration;
+ if (!isObject(value)) {
+ this.value = this.stringify.dtdEntityValue(value);
+ this.internal = true;
+ } else {
+ if (!value.pubID && !value.sysID) {
+ throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(name));
+ }
+ if (value.pubID && !value.sysID) {
+ throw new Error("System identifier is required for a public external entity. " + this.debugInfo(name));
+ }
+ this.internal = false;
+ if (value.pubID != null) {
+ this.pubID = this.stringify.dtdPubID(value.pubID);
+ }
+ if (value.sysID != null) {
+ this.sysID = this.stringify.dtdSysID(value.sysID);
+ }
+ if (value.nData != null) {
+ this.nData = this.stringify.dtdNData(value.nData);
+ }
+ if (this.pe && this.nData) {
+ throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(name));
+ }
+ }
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLDTDEntity.prototype, 'publicId', {
+ get: function() {
+ return this.pubID;
+ }
+ });
+
+ Object.defineProperty(XMLDTDEntity.prototype, 'systemId', {
+ get: function() {
+ return this.sysID;
+ }
+ });
+
+ Object.defineProperty(XMLDTDEntity.prototype, 'notationName', {
+ get: function() {
+ return this.nData || null;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', {
+ get: function() {
+ return null;
+ }
+ });
+
+ return XMLDTDEntity;
+
+ }).call(this);
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLDTDNotation.js b/generator/node_modules/xmlbuilder/lib/XMLDTDNotation.js
new file mode 100644
index 0000000..37a469a
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLDTDNotation.js
@@ -0,0 +1,66 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDNotation, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents a NOTATION entry in the DTD
+ module.exports = XMLDTDNotation = (function() {
+ class XMLDTDNotation extends XMLNode {
+ // Initializes a new instance of `XMLDTDNotation`
+
+ // `parent` the parent `XMLDocType` element
+ // `name` the name of the notation
+ // `value` an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ constructor(parent, name, value) {
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing DTD notation name. " + this.debugInfo(name));
+ }
+ if (!value.pubID && !value.sysID) {
+ throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name));
+ }
+ this.name = this.stringify.name(name);
+ this.type = NodeType.NotationDeclaration;
+ if (value.pubID != null) {
+ this.pubID = this.stringify.dtdPubID(value.pubID);
+ }
+ if (value.sysID != null) {
+ this.sysID = this.stringify.dtdSysID(value.sysID);
+ }
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLDTDNotation.prototype, 'publicId', {
+ get: function() {
+ return this.pubID;
+ }
+ });
+
+ Object.defineProperty(XMLDTDNotation.prototype, 'systemId', {
+ get: function() {
+ return this.sysID;
+ }
+ });
+
+ return XMLDTDNotation;
+
+ }).call(this);
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLDeclaration.js b/generator/node_modules/xmlbuilder/lib/XMLDeclaration.js
new file mode 100644
index 0000000..90b8edc
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLDeclaration.js
@@ -0,0 +1,51 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDeclaration, XMLNode, isObject;
+
+ ({isObject} = require('./Utility'));
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents the XML declaration
+ module.exports = XMLDeclaration = class XMLDeclaration extends XMLNode {
+ // Initializes a new instance of `XMLDeclaration`
+
+ // `parent` the document object
+
+ // `version` A version number string, e.g. 1.0
+ // `encoding` Encoding declaration, e.g. UTF-8
+ // `standalone` standalone document declaration: true or false
+ constructor(parent, version, encoding, standalone) {
+ super(parent);
+ // arguments may also be passed as an object
+ if (isObject(version)) {
+ ({version, encoding, standalone} = version);
+ }
+ if (!version) {
+ version = '1.0';
+ }
+ this.type = NodeType.Declaration;
+ this.version = this.stringify.xmlVersion(version);
+ if (encoding != null) {
+ this.encoding = this.stringify.xmlEncoding(encoding);
+ }
+ if (standalone != null) {
+ this.standalone = this.stringify.xmlStandalone(standalone);
+ }
+ }
+
+ // Converts to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.declaration(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLDocType.js b/generator/node_modules/xmlbuilder/lib/XMLDocType.js
new file mode 100644
index 0000000..4af825f
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLDocType.js
@@ -0,0 +1,235 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject;
+
+ ({isObject} = require('./Utility'));
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ XMLDTDAttList = require('./XMLDTDAttList');
+
+ XMLDTDEntity = require('./XMLDTDEntity');
+
+ XMLDTDElement = require('./XMLDTDElement');
+
+ XMLDTDNotation = require('./XMLDTDNotation');
+
+ XMLNamedNodeMap = require('./XMLNamedNodeMap');
+
+ // Represents doctype declaration
+ module.exports = XMLDocType = (function() {
+ class XMLDocType extends XMLNode {
+ // Initializes a new instance of `XMLDocType`
+
+ // `parent` the document object
+
+ // `pubID` public identifier of the external subset
+ // `sysID` system identifier of the external subset
+ constructor(parent, pubID, sysID) {
+ var child, i, len, ref;
+ super(parent);
+ this.type = NodeType.DocType;
+ // set DTD name to the name of the root node
+ if (parent.children) {
+ ref = parent.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if (child.type === NodeType.Element) {
+ this.name = child.name;
+ break;
+ }
+ }
+ }
+ this.documentObject = parent;
+ // arguments may also be passed as an object
+ if (isObject(pubID)) {
+ ({pubID, sysID} = pubID);
+ }
+ if (sysID == null) {
+ [sysID, pubID] = [pubID, sysID];
+ }
+ if (pubID != null) {
+ this.pubID = this.stringify.dtdPubID(pubID);
+ }
+ if (sysID != null) {
+ this.sysID = this.stringify.dtdSysID(sysID);
+ }
+ }
+
+ // Creates an element type declaration
+
+ // `name` element name
+ // `value` element content (defaults to #PCDATA)
+ element(name, value) {
+ var child;
+ child = new XMLDTDElement(this, name, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates an attribute declaration
+
+ // `elementName` the name of the element containing this attribute
+ // `attributeName` attribute name
+ // `attributeType` type of the attribute (defaults to CDATA)
+ // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
+ // #DEFAULT) (defaults to #IMPLIED)
+ // `defaultValue` default value of the attribute
+ // (only used for #FIXED or #DEFAULT)
+ attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ var child;
+ child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a general entity declaration
+
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ // `value.nData` notation declaration
+ entity(name, value) {
+ var child;
+ child = new XMLDTDEntity(this, false, name, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a parameter entity declaration
+
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ pEntity(name, value) {
+ var child;
+ child = new XMLDTDEntity(this, true, name, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a NOTATION declaration
+
+ // `name` the name of the notation
+ // `value` an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ notation(name, value) {
+ var child;
+ child = new XMLDTDNotation(this, name, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Converts to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.docType(this, this.options.writer.filterOptions(options));
+ }
+
+ // Aliases
+ ele(name, value) {
+ return this.element(name, value);
+ }
+
+ att(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);
+ }
+
+ ent(name, value) {
+ return this.entity(name, value);
+ }
+
+ pent(name, value) {
+ return this.pEntity(name, value);
+ }
+
+ not(name, value) {
+ return this.notation(name, value);
+ }
+
+ up() {
+ return this.root() || this.documentObject;
+ }
+
+ isEqualNode(node) {
+ if (!super.isEqualNode(node)) {
+ return false;
+ }
+ if (node.name !== this.name) {
+ return false;
+ }
+ if (node.publicId !== this.publicId) {
+ return false;
+ }
+ if (node.systemId !== this.systemId) {
+ return false;
+ }
+ return true;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLDocType.prototype, 'entities', {
+ get: function() {
+ var child, i, len, nodes, ref;
+ nodes = {};
+ ref = this.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if ((child.type === NodeType.EntityDeclaration) && !child.pe) {
+ nodes[child.name] = child;
+ }
+ }
+ return new XMLNamedNodeMap(nodes);
+ }
+ });
+
+ Object.defineProperty(XMLDocType.prototype, 'notations', {
+ get: function() {
+ var child, i, len, nodes, ref;
+ nodes = {};
+ ref = this.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if (child.type === NodeType.NotationDeclaration) {
+ nodes[child.name] = child;
+ }
+ }
+ return new XMLNamedNodeMap(nodes);
+ }
+ });
+
+ // DOM level 2
+ Object.defineProperty(XMLDocType.prototype, 'publicId', {
+ get: function() {
+ return this.pubID;
+ }
+ });
+
+ Object.defineProperty(XMLDocType.prototype, 'systemId', {
+ get: function() {
+ return this.sysID;
+ }
+ });
+
+ Object.defineProperty(XMLDocType.prototype, 'internalSubset', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ return XMLDocType;
+
+ }).call(this);
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLDocument.js b/generator/node_modules/xmlbuilder/lib/XMLDocument.js
new file mode 100644
index 0000000..56ec08f
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLDocument.js
@@ -0,0 +1,282 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject;
+
+ ({isPlainObject} = require('./Utility'));
+
+ XMLDOMImplementation = require('./XMLDOMImplementation');
+
+ XMLDOMConfiguration = require('./XMLDOMConfiguration');
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ XMLStringifier = require('./XMLStringifier');
+
+ XMLStringWriter = require('./XMLStringWriter');
+
+ // Represents an XML builder
+ module.exports = XMLDocument = (function() {
+ class XMLDocument extends XMLNode {
+ // Initializes a new instance of `XMLDocument`
+
+ // `options.keepNullNodes` whether nodes with null values will be kept
+ // or ignored: true or false
+ // `options.keepNullAttributes` whether attributes with null values will be
+ // kept or ignored: true or false
+ // `options.ignoreDecorators` whether decorator strings will be ignored when
+ // converting JS objects: true or false
+ // `options.separateArrayItems` whether array items are created as separate
+ // nodes when passed as an object value: true or false
+ // `options.noDoubleEncoding` whether existing html entities are encoded:
+ // true or false
+ // `options.stringify` a set of functions to use for converting values to
+ // strings
+ // `options.writer` the default XML writer to use for converting nodes to
+ // string. If the default writer is not set, the built-in XMLStringWriter
+ // will be used instead.
+ constructor(options) {
+ super(null);
+ this.name = "#document";
+ this.type = NodeType.Document;
+ this.documentURI = null;
+ this.domConfig = new XMLDOMConfiguration();
+ options || (options = {});
+ if (!options.writer) {
+ options.writer = new XMLStringWriter();
+ }
+ this.options = options;
+ this.stringify = new XMLStringifier(options);
+ }
+
+ // Ends the document and passes it to the given XML writer
+
+ // `writer` is either an XML writer or a plain object to pass to the
+ // constructor of the default XML writer. The default writer is assigned when
+ // creating the XML document. Following flags are recognized by the
+ // built-in XMLStringWriter:
+ // `writer.pretty` pretty prints the result
+ // `writer.indent` indentation for pretty print
+ // `writer.offset` how many indentations to add to every line for pretty print
+ // `writer.newline` newline sequence for pretty print
+ end(writer) {
+ var writerOptions;
+ writerOptions = {};
+ if (!writer) {
+ writer = this.options.writer;
+ } else if (isPlainObject(writer)) {
+ writerOptions = writer;
+ writer = this.options.writer;
+ }
+ return writer.document(this, writer.filterOptions(writerOptions));
+ }
+
+ // Converts the XML document to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.document(this, this.options.writer.filterOptions(options));
+ }
+
+ // DOM level 1 functions to be implemented later
+ createElement(tagName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createDocumentFragment() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createTextNode(data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createComment(data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createCDATASection(data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createProcessingInstruction(target, data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createAttribute(name) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createEntityReference(name) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagName(tagname) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 2 functions to be implemented later
+ importNode(importedNode, deep) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createElementNS(namespaceURI, qualifiedName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createAttributeNS(namespaceURI, qualifiedName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagNameNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementById(elementId) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 3 functions to be implemented later
+ adoptNode(source) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ normalizeDocument() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ renameNode(node, namespaceURI, qualifiedName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 4 functions to be implemented later
+ getElementsByClassName(classNames) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createEvent(eventInterface) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createRange() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createNodeIterator(root, whatToShow, filter) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createTreeWalker(root, whatToShow, filter) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLDocument.prototype, 'implementation', {
+ value: new XMLDOMImplementation()
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'doctype', {
+ get: function() {
+ var child, i, len, ref;
+ ref = this.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if (child.type === NodeType.DocType) {
+ return child;
+ }
+ }
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'documentElement', {
+ get: function() {
+ return this.rootObject || null;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLDocument.prototype, 'inputEncoding', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', {
+ get: function() {
+ return false;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', {
+ get: function() {
+ if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {
+ return this.children[0].encoding;
+ } else {
+ return null;
+ }
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', {
+ get: function() {
+ if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {
+ return this.children[0].standalone === 'yes';
+ } else {
+ return false;
+ }
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'xmlVersion', {
+ get: function() {
+ if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {
+ return this.children[0].version;
+ } else {
+ return "1.0";
+ }
+ }
+ });
+
+ // DOM level 4
+ Object.defineProperty(XMLDocument.prototype, 'URL', {
+ get: function() {
+ return this.documentURI;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'origin', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'compatMode', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'characterSet', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'contentType', {
+ get: function() {
+ return null;
+ }
+ });
+
+ return XMLDocument;
+
+ }).call(this);
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLDocumentCB.js b/generator/node_modules/xmlbuilder/lib/XMLDocumentCB.js
new file mode 100644
index 0000000..c55a4bf
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLDocumentCB.js
@@ -0,0 +1,650 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject,
+ hasProp = {}.hasOwnProperty;
+
+ ({isObject, isFunction, isPlainObject, getValue} = require('./Utility'));
+
+ NodeType = require('./NodeType');
+
+ XMLDocument = require('./XMLDocument');
+
+ XMLElement = require('./XMLElement');
+
+ XMLCData = require('./XMLCData');
+
+ XMLComment = require('./XMLComment');
+
+ XMLRaw = require('./XMLRaw');
+
+ XMLText = require('./XMLText');
+
+ XMLProcessingInstruction = require('./XMLProcessingInstruction');
+
+ XMLDeclaration = require('./XMLDeclaration');
+
+ XMLDocType = require('./XMLDocType');
+
+ XMLDTDAttList = require('./XMLDTDAttList');
+
+ XMLDTDEntity = require('./XMLDTDEntity');
+
+ XMLDTDElement = require('./XMLDTDElement');
+
+ XMLDTDNotation = require('./XMLDTDNotation');
+
+ XMLAttribute = require('./XMLAttribute');
+
+ XMLStringifier = require('./XMLStringifier');
+
+ XMLStringWriter = require('./XMLStringWriter');
+
+ WriterState = require('./WriterState');
+
+ // Represents an XML builder
+ module.exports = XMLDocumentCB = class XMLDocumentCB {
+ // Initializes a new instance of `XMLDocumentCB`
+
+ // `options.keepNullNodes` whether nodes with null values will be kept
+ // or ignored: true or false
+ // `options.keepNullAttributes` whether attributes with null values will be
+ // kept or ignored: true or false
+ // `options.ignoreDecorators` whether decorator strings will be ignored when
+ // converting JS objects: true or false
+ // `options.separateArrayItems` whether array items are created as separate
+ // nodes when passed as an object value: true or false
+ // `options.noDoubleEncoding` whether existing html entities are encoded:
+ // true or false
+ // `options.stringify` a set of functions to use for converting values to
+ // strings
+ // `options.writer` the default XML writer to use for converting nodes to
+ // string. If the default writer is not set, the built-in XMLStringWriter
+ // will be used instead.
+
+ // `onData` the function to be called when a new chunk of XML is output. The
+ // string containing the XML chunk is passed to `onData` as its first
+ // argument, and the current indentation level as its second argument.
+ // `onEnd` the function to be called when the XML document is completed with
+ // `end`. `onEnd` does not receive any arguments.
+ constructor(options, onData, onEnd) {
+ var writerOptions;
+ this.name = "?xml";
+ this.type = NodeType.Document;
+ options || (options = {});
+ writerOptions = {};
+ if (!options.writer) {
+ options.writer = new XMLStringWriter();
+ } else if (isPlainObject(options.writer)) {
+ writerOptions = options.writer;
+ options.writer = new XMLStringWriter();
+ }
+ this.options = options;
+ this.writer = options.writer;
+ this.writerOptions = this.writer.filterOptions(writerOptions);
+ this.stringify = new XMLStringifier(options);
+ this.onDataCallback = onData || function() {};
+ this.onEndCallback = onEnd || function() {};
+ this.currentNode = null;
+ this.currentLevel = -1;
+ this.openTags = {};
+ this.documentStarted = false;
+ this.documentCompleted = false;
+ this.root = null;
+ }
+
+ // Creates a child element node from the given XMLNode
+
+ // `node` the child node
+ createChildNode(node) {
+ var att, attName, attributes, child, i, len, ref, ref1;
+ switch (node.type) {
+ case NodeType.CData:
+ this.cdata(node.value);
+ break;
+ case NodeType.Comment:
+ this.comment(node.value);
+ break;
+ case NodeType.Element:
+ attributes = {};
+ ref = node.attribs;
+ for (attName in ref) {
+ if (!hasProp.call(ref, attName)) continue;
+ att = ref[attName];
+ attributes[attName] = att.value;
+ }
+ this.node(node.name, attributes);
+ break;
+ case NodeType.Dummy:
+ this.dummy();
+ break;
+ case NodeType.Raw:
+ this.raw(node.value);
+ break;
+ case NodeType.Text:
+ this.text(node.value);
+ break;
+ case NodeType.ProcessingInstruction:
+ this.instruction(node.target, node.value);
+ break;
+ default:
+ throw new Error("This XML node type is not supported in a JS object: " + node.constructor.name);
+ }
+ ref1 = node.children;
+ // write child nodes recursively
+ for (i = 0, len = ref1.length; i < len; i++) {
+ child = ref1[i];
+ this.createChildNode(child);
+ if (child.type === NodeType.Element) {
+ this.up();
+ }
+ }
+ return this;
+ }
+
+ // Creates a dummy node
+
+ dummy() {
+ // no-op, just return this
+ return this;
+ }
+
+ // Creates a node
+
+ // `name` name of the node
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ node(name, attributes, text) {
+ if (name == null) {
+ throw new Error("Missing node name.");
+ }
+ if (this.root && this.currentLevel === -1) {
+ throw new Error("Document can only have one root node. " + this.debugInfo(name));
+ }
+ this.openCurrent();
+ name = getValue(name);
+ if (attributes == null) {
+ attributes = {};
+ }
+ attributes = getValue(attributes);
+ // swap argument order: text <-> attributes
+ if (!isObject(attributes)) {
+ [text, attributes] = [attributes, text];
+ }
+ this.currentNode = new XMLElement(this, name, attributes);
+ this.currentNode.children = false;
+ this.currentLevel++;
+ this.openTags[this.currentLevel] = this.currentNode;
+ if (text != null) {
+ this.text(text);
+ }
+ return this;
+ }
+
+ // Creates a child element node or an element type declaration when called
+ // inside the DTD
+
+ // `name` name of the node
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ element(name, attributes, text) {
+ var child, i, len, oldValidationFlag, ref, root;
+ if (this.currentNode && this.currentNode.type === NodeType.DocType) {
+ this.dtdElement(...arguments);
+ } else {
+ if (Array.isArray(name) || isObject(name) || isFunction(name)) {
+ oldValidationFlag = this.options.noValidation;
+ this.options.noValidation = true;
+ root = new XMLDocument(this.options).element('TEMP_ROOT');
+ root.element(name);
+ this.options.noValidation = oldValidationFlag;
+ ref = root.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ this.createChildNode(child);
+ if (child.type === NodeType.Element) {
+ this.up();
+ }
+ }
+ } else {
+ this.node(name, attributes, text);
+ }
+ }
+ return this;
+ }
+
+ // Adds or modifies an attribute
+
+ // `name` attribute name
+ // `value` attribute value
+ attribute(name, value) {
+ var attName, attValue;
+ if (!this.currentNode || this.currentNode.children) {
+ throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(name));
+ }
+ if (name != null) {
+ name = getValue(name);
+ }
+ if (isObject(name)) { // expand if object
+ for (attName in name) {
+ if (!hasProp.call(name, attName)) continue;
+ attValue = name[attName];
+ this.attribute(attName, attValue);
+ }
+ } else {
+ if (isFunction(value)) {
+ value = value.apply();
+ }
+ if (this.options.keepNullAttributes && (value == null)) {
+ this.currentNode.attribs[name] = new XMLAttribute(this, name, "");
+ } else if (value != null) {
+ this.currentNode.attribs[name] = new XMLAttribute(this, name, value);
+ }
+ }
+ return this;
+ }
+
+ // Creates a text node
+
+ // `value` element text
+ text(value) {
+ var node;
+ this.openCurrent();
+ node = new XMLText(this, value);
+ this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a CDATA node
+
+ // `value` element text without CDATA delimiters
+ cdata(value) {
+ var node;
+ this.openCurrent();
+ node = new XMLCData(this, value);
+ this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a comment node
+
+ // `value` comment text
+ comment(value) {
+ var node;
+ this.openCurrent();
+ node = new XMLComment(this, value);
+ this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Adds unescaped raw text
+
+ // `value` text
+ raw(value) {
+ var node;
+ this.openCurrent();
+ node = new XMLRaw(this, value);
+ this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Adds a processing instruction
+
+ // `target` instruction target
+ // `value` instruction value
+ instruction(target, value) {
+ var i, insTarget, insValue, len, node;
+ this.openCurrent();
+ if (target != null) {
+ target = getValue(target);
+ }
+ if (value != null) {
+ value = getValue(value);
+ }
+ if (Array.isArray(target)) { // expand if array
+ for (i = 0, len = target.length; i < len; i++) {
+ insTarget = target[i];
+ this.instruction(insTarget);
+ }
+ } else if (isObject(target)) { // expand if object
+ for (insTarget in target) {
+ if (!hasProp.call(target, insTarget)) continue;
+ insValue = target[insTarget];
+ this.instruction(insTarget, insValue);
+ }
+ } else {
+ if (isFunction(value)) {
+ value = value.apply();
+ }
+ node = new XMLProcessingInstruction(this, target, value);
+ this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ }
+ return this;
+ }
+
+ // Creates the xml declaration
+
+ // `version` A version number string, e.g. 1.0
+ // `encoding` Encoding declaration, e.g. UTF-8
+ // `standalone` standalone document declaration: true or false
+ declaration(version, encoding, standalone) {
+ var node;
+ this.openCurrent();
+ if (this.documentStarted) {
+ throw new Error("declaration() must be the first node.");
+ }
+ node = new XMLDeclaration(this, version, encoding, standalone);
+ this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates the document type declaration
+
+ // `root` the name of the root node
+ // `pubID` the public identifier of the external subset
+ // `sysID` the system identifier of the external subset
+ doctype(root, pubID, sysID) {
+ this.openCurrent();
+ if (root == null) {
+ throw new Error("Missing root node name.");
+ }
+ if (this.root) {
+ throw new Error("dtd() must come before the root node.");
+ }
+ this.currentNode = new XMLDocType(this, pubID, sysID);
+ this.currentNode.rootNodeName = root;
+ this.currentNode.children = false;
+ this.currentLevel++;
+ this.openTags[this.currentLevel] = this.currentNode;
+ return this;
+ }
+
+ // Creates an element type declaration
+
+ // `name` element name
+ // `value` element content (defaults to #PCDATA)
+ dtdElement(name, value) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDElement(this, name, value);
+ this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates an attribute declaration
+
+ // `elementName` the name of the element containing this attribute
+ // `attributeName` attribute name
+ // `attributeType` type of the attribute (defaults to CDATA)
+ // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
+ // #DEFAULT) (defaults to #IMPLIED)
+ // `defaultValue` default value of the attribute
+ // (only used for #FIXED or #DEFAULT)
+ attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);
+ this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a general entity declaration
+
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ // `value.nData` notation declaration
+ entity(name, value) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDEntity(this, false, name, value);
+ this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a parameter entity declaration
+
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ pEntity(name, value) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDEntity(this, true, name, value);
+ this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a NOTATION declaration
+
+ // `name` the name of the notation
+ // `value` an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ notation(name, value) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDNotation(this, name, value);
+ this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Gets the parent node
+ up() {
+ if (this.currentLevel < 0) {
+ throw new Error("The document node has no parent.");
+ }
+ if (this.currentNode) {
+ if (this.currentNode.children) {
+ this.closeNode(this.currentNode);
+ } else {
+ this.openNode(this.currentNode);
+ }
+ this.currentNode = null;
+ } else {
+ this.closeNode(this.openTags[this.currentLevel]);
+ }
+ delete this.openTags[this.currentLevel];
+ this.currentLevel--;
+ return this;
+ }
+
+ // Ends the document
+ end() {
+ while (this.currentLevel >= 0) {
+ this.up();
+ }
+ return this.onEnd();
+ }
+
+ // Opens the current parent node
+ openCurrent() {
+ if (this.currentNode) {
+ this.currentNode.children = true;
+ return this.openNode(this.currentNode);
+ }
+ }
+
+ // Writes the opening tag of the current node or the entire node if it has
+ // no child nodes
+ openNode(node) {
+ var att, chunk, name, ref;
+ if (!node.isOpen) {
+ if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) {
+ this.root = node;
+ }
+ chunk = '';
+ if (node.type === NodeType.Element) {
+ this.writerOptions.state = WriterState.OpenTag;
+ chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<' + node.name;
+ ref = node.attribs;
+ for (name in ref) {
+ if (!hasProp.call(ref, name)) continue;
+ att = ref[name];
+ chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel);
+ }
+ chunk += (node.children ? '>' : '/>') + this.writer.endline(node, this.writerOptions, this.currentLevel);
+ this.writerOptions.state = WriterState.InsideTag; // if node.type is NodeType.DocType
+ } else {
+ this.writerOptions.state = WriterState.OpenTag;
+ chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<!DOCTYPE ' + node.rootNodeName;
+
+ // external identifier
+ if (node.pubID && node.sysID) {
+ chunk += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
+ } else if (node.sysID) {
+ chunk += ' SYSTEM "' + node.sysID + '"';
+ }
+
+ // internal subset
+ if (node.children) {
+ chunk += ' [';
+ this.writerOptions.state = WriterState.InsideTag;
+ } else {
+ this.writerOptions.state = WriterState.CloseTag;
+ chunk += '>';
+ }
+ chunk += this.writer.endline(node, this.writerOptions, this.currentLevel);
+ }
+ this.onData(chunk, this.currentLevel);
+ return node.isOpen = true;
+ }
+ }
+
+ // Writes the closing tag of the current node
+ closeNode(node) {
+ var chunk;
+ if (!node.isClosed) {
+ chunk = '';
+ this.writerOptions.state = WriterState.CloseTag;
+ if (node.type === NodeType.Element) {
+ chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '</' + node.name + '>' + this.writer.endline(node, this.writerOptions, this.currentLevel); // if node.type is NodeType.DocType
+ } else {
+ chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ']>' + this.writer.endline(node, this.writerOptions, this.currentLevel);
+ }
+ this.writerOptions.state = WriterState.None;
+ this.onData(chunk, this.currentLevel);
+ return node.isClosed = true;
+ }
+ }
+
+ // Called when a new chunk of XML is output
+
+ // `chunk` a string containing the XML chunk
+ // `level` current indentation level
+ onData(chunk, level) {
+ this.documentStarted = true;
+ return this.onDataCallback(chunk, level + 1);
+ }
+
+ // Called when the XML document is completed
+ onEnd() {
+ this.documentCompleted = true;
+ return this.onEndCallback();
+ }
+
+ // Returns debug string
+ debugInfo(name) {
+ if (name == null) {
+ return "";
+ } else {
+ return "node: <" + name + ">";
+ }
+ }
+
+ // Node aliases
+ ele() {
+ return this.element(...arguments);
+ }
+
+ nod(name, attributes, text) {
+ return this.node(name, attributes, text);
+ }
+
+ txt(value) {
+ return this.text(value);
+ }
+
+ dat(value) {
+ return this.cdata(value);
+ }
+
+ com(value) {
+ return this.comment(value);
+ }
+
+ ins(target, value) {
+ return this.instruction(target, value);
+ }
+
+ dec(version, encoding, standalone) {
+ return this.declaration(version, encoding, standalone);
+ }
+
+ dtd(root, pubID, sysID) {
+ return this.doctype(root, pubID, sysID);
+ }
+
+ e(name, attributes, text) {
+ return this.element(name, attributes, text);
+ }
+
+ n(name, attributes, text) {
+ return this.node(name, attributes, text);
+ }
+
+ t(value) {
+ return this.text(value);
+ }
+
+ d(value) {
+ return this.cdata(value);
+ }
+
+ c(value) {
+ return this.comment(value);
+ }
+
+ r(value) {
+ return this.raw(value);
+ }
+
+ i(target, value) {
+ return this.instruction(target, value);
+ }
+
+ // Attribute aliases
+ att() {
+ if (this.currentNode && this.currentNode.type === NodeType.DocType) {
+ return this.attList(...arguments);
+ } else {
+ return this.attribute(...arguments);
+ }
+ }
+
+ a() {
+ if (this.currentNode && this.currentNode.type === NodeType.DocType) {
+ return this.attList(...arguments);
+ } else {
+ return this.attribute(...arguments);
+ }
+ }
+
+ // DTD aliases
+ // att() and ele() are defined above
+ ent(name, value) {
+ return this.entity(name, value);
+ }
+
+ pent(name, value) {
+ return this.pEntity(name, value);
+ }
+
+ not(name, value) {
+ return this.notation(name, value);
+ }
+
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLDocumentFragment.js b/generator/node_modules/xmlbuilder/lib/XMLDocumentFragment.js
new file mode 100644
index 0000000..fbd42ba
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLDocumentFragment.js
@@ -0,0 +1,21 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDocumentFragment, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents a CDATA node
+ module.exports = XMLDocumentFragment = class XMLDocumentFragment extends XMLNode {
+ // Initializes a new instance of `XMLDocumentFragment`
+
+ constructor() {
+ super(null);
+ this.name = "#document-fragment";
+ this.type = NodeType.DocumentFragment;
+ }
+
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLDummy.js b/generator/node_modules/xmlbuilder/lib/XMLDummy.js
new file mode 100644
index 0000000..06ab8af
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLDummy.js
@@ -0,0 +1,39 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDummy, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents a raw node
+ module.exports = XMLDummy = class XMLDummy extends XMLNode {
+ // Initializes a new instance of `XMLDummy`
+
+ // `XMLDummy` is a special node representing a node with
+ // a null value. Dummy nodes are created while recursively
+ // building the XML tree. Simply skipping null values doesn't
+ // work because that would break the recursive chain.
+ constructor(parent) {
+ super(parent);
+ this.type = NodeType.Dummy;
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return '';
+ }
+
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLElement.js b/generator/node_modules/xmlbuilder/lib/XMLElement.js
new file mode 100644
index 0000000..3e9da57
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLElement.js
@@ -0,0 +1,334 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject,
+ hasProp = {}.hasOwnProperty;
+
+ ({isObject, isFunction, getValue} = require('./Utility'));
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ XMLAttribute = require('./XMLAttribute');
+
+ XMLNamedNodeMap = require('./XMLNamedNodeMap');
+
+ // Represents an element of the XML document
+ module.exports = XMLElement = (function() {
+ class XMLElement extends XMLNode {
+ // Initializes a new instance of `XMLElement`
+
+ // `parent` the parent node
+ // `name` element name
+ // `attributes` an object containing name/value pairs of attributes
+ constructor(parent, name, attributes) {
+ var child, j, len, ref;
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing element name. " + this.debugInfo());
+ }
+ this.name = this.stringify.name(name);
+ this.type = NodeType.Element;
+ this.attribs = {};
+ this.schemaTypeInfo = null;
+ if (attributes != null) {
+ this.attribute(attributes);
+ }
+ // set properties if this is the root node
+ if (parent.type === NodeType.Document) {
+ this.isRoot = true;
+ this.documentObject = parent;
+ parent.rootObject = this;
+ // set dtd name
+ if (parent.children) {
+ ref = parent.children;
+ for (j = 0, len = ref.length; j < len; j++) {
+ child = ref[j];
+ if (child.type === NodeType.DocType) {
+ child.name = this.name;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // Creates and returns a deep clone of `this`
+
+ clone() {
+ var att, attName, clonedSelf, ref;
+ clonedSelf = Object.create(this);
+ // remove document element
+ if (clonedSelf.isRoot) {
+ clonedSelf.documentObject = null;
+ }
+ // clone attributes
+ clonedSelf.attribs = {};
+ ref = this.attribs;
+ for (attName in ref) {
+ if (!hasProp.call(ref, attName)) continue;
+ att = ref[attName];
+ clonedSelf.attribs[attName] = att.clone();
+ }
+ // clone child nodes
+ clonedSelf.children = [];
+ this.children.forEach(function(child) {
+ var clonedChild;
+ clonedChild = child.clone();
+ clonedChild.parent = clonedSelf;
+ return clonedSelf.children.push(clonedChild);
+ });
+ return clonedSelf;
+ }
+
+ // Adds or modifies an attribute
+
+ // `name` attribute name
+ // `value` attribute value
+ attribute(name, value) {
+ var attName, attValue;
+ if (name != null) {
+ name = getValue(name);
+ }
+ if (isObject(name)) { // expand if object
+ for (attName in name) {
+ if (!hasProp.call(name, attName)) continue;
+ attValue = name[attName];
+ this.attribute(attName, attValue);
+ }
+ } else {
+ if (isFunction(value)) {
+ value = value.apply();
+ }
+ if (this.options.keepNullAttributes && (value == null)) {
+ this.attribs[name] = new XMLAttribute(this, name, "");
+ } else if (value != null) {
+ this.attribs[name] = new XMLAttribute(this, name, value);
+ }
+ }
+ return this;
+ }
+
+ // Removes an attribute
+
+ // `name` attribute name
+ removeAttribute(name) {
+ var attName, j, len;
+ // Also defined in DOM level 1
+ // removeAttribute(name) removes an attribute by name.
+ if (name == null) {
+ throw new Error("Missing attribute name. " + this.debugInfo());
+ }
+ name = getValue(name);
+ if (Array.isArray(name)) { // expand if array
+ for (j = 0, len = name.length; j < len; j++) {
+ attName = name[j];
+ delete this.attribs[attName];
+ }
+ } else {
+ delete this.attribs[name];
+ }
+ return this;
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ // `options.allowEmpty` do not self close empty element tags
+ toString(options) {
+ return this.options.writer.element(this, this.options.writer.filterOptions(options));
+ }
+
+ // Aliases
+ att(name, value) {
+ return this.attribute(name, value);
+ }
+
+ a(name, value) {
+ return this.attribute(name, value);
+ }
+
+ // DOM Level 1
+ getAttribute(name) {
+ if (this.attribs.hasOwnProperty(name)) {
+ return this.attribs[name].value;
+ } else {
+ return null;
+ }
+ }
+
+ setAttribute(name, value) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getAttributeNode(name) {
+ if (this.attribs.hasOwnProperty(name)) {
+ return this.attribs[name];
+ } else {
+ return null;
+ }
+ }
+
+ setAttributeNode(newAttr) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ removeAttributeNode(oldAttr) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagName(name) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM Level 2
+ getAttributeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ setAttributeNS(namespaceURI, qualifiedName, value) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ removeAttributeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getAttributeNodeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ setAttributeNodeNS(newAttr) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagNameNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ hasAttribute(name) {
+ return this.attribs.hasOwnProperty(name);
+ }
+
+ hasAttributeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM Level 3
+ setIdAttribute(name, isId) {
+ if (this.attribs.hasOwnProperty(name)) {
+ return this.attribs[name].isId;
+ } else {
+ return isId;
+ }
+ }
+
+ setIdAttributeNS(namespaceURI, localName, isId) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ setIdAttributeNode(idAttr, isId) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM Level 4
+ getElementsByTagName(tagname) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagNameNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByClassName(classNames) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ isEqualNode(node) {
+ var i, j, ref;
+ if (!super.isEqualNode(node)) {
+ return false;
+ }
+ if (node.namespaceURI !== this.namespaceURI) {
+ return false;
+ }
+ if (node.prefix !== this.prefix) {
+ return false;
+ }
+ if (node.localName !== this.localName) {
+ return false;
+ }
+ if (node.attribs.length !== this.attribs.length) {
+ return false;
+ }
+ for (i = j = 0, ref = this.attribs.length - 1; (0 <= ref ? j <= ref : j >= ref); i = 0 <= ref ? ++j : --j) {
+ if (!this.attribs[i].isEqualNode(node.attribs[i])) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLElement.prototype, 'tagName', {
+ get: function() {
+ return this.name;
+ }
+ });
+
+ // DOM level 4
+ Object.defineProperty(XMLElement.prototype, 'namespaceURI', {
+ get: function() {
+ return '';
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'prefix', {
+ get: function() {
+ return '';
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'localName', {
+ get: function() {
+ return this.name;
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'id', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'className', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'classList', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'attributes', {
+ get: function() {
+ if (!this.attributeMap || !this.attributeMap.nodes) {
+ this.attributeMap = new XMLNamedNodeMap(this.attribs);
+ }
+ return this.attributeMap;
+ }
+ });
+
+ return XMLElement;
+
+ }).call(this);
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js b/generator/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js
new file mode 100644
index 0000000..8c91969
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js
@@ -0,0 +1,77 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents a map of nodes accessed by a string key
+ var XMLNamedNodeMap;
+
+ module.exports = XMLNamedNodeMap = (function() {
+ class XMLNamedNodeMap {
+ // Initializes a new instance of `XMLNamedNodeMap`
+ // This is just a wrapper around an ordinary
+ // JS object.
+
+ // `nodes` the object containing nodes.
+ constructor(nodes) {
+ this.nodes = nodes;
+ }
+
+ // Creates and returns a deep clone of `this`
+
+ clone() {
+ // this class should not be cloned since it wraps
+ // around a given object. The calling function should check
+ // whether the wrapped object is null and supply a new object
+ // (from the clone).
+ return this.nodes = null;
+ }
+
+ // DOM Level 1
+ getNamedItem(name) {
+ return this.nodes[name];
+ }
+
+ setNamedItem(node) {
+ var oldNode;
+ oldNode = this.nodes[node.nodeName];
+ this.nodes[node.nodeName] = node;
+ return oldNode || null;
+ }
+
+ removeNamedItem(name) {
+ var oldNode;
+ oldNode = this.nodes[name];
+ delete this.nodes[name];
+ return oldNode || null;
+ }
+
+ item(index) {
+ return this.nodes[Object.keys(this.nodes)[index]] || null;
+ }
+
+ // DOM level 2 functions to be implemented later
+ getNamedItemNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ setNamedItemNS(node) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ removeNamedItemNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ };
+
+
+ // DOM level 1
+ Object.defineProperty(XMLNamedNodeMap.prototype, 'length', {
+ get: function() {
+ return Object.keys(this.nodes).length || 0;
+ }
+ });
+
+ return XMLNamedNodeMap;
+
+ }).call(this);
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLNode.js b/generator/node_modules/xmlbuilder/lib/XMLNode.js
new file mode 100644
index 0000000..0ade97b
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLNode.js
@@ -0,0 +1,999 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject,
+ hasProp = {}.hasOwnProperty,
+ splice = [].splice;
+
+ ({isObject, isFunction, isEmpty, getValue} = require('./Utility'));
+
+ XMLElement = null;
+
+ XMLCData = null;
+
+ XMLComment = null;
+
+ XMLDeclaration = null;
+
+ XMLDocType = null;
+
+ XMLRaw = null;
+
+ XMLText = null;
+
+ XMLProcessingInstruction = null;
+
+ XMLDummy = null;
+
+ NodeType = null;
+
+ XMLNodeList = null;
+
+ XMLNamedNodeMap = null;
+
+ DocumentPosition = null;
+
+ // Represents a generic XMl element
+ module.exports = XMLNode = (function() {
+ class XMLNode {
+ // Initializes a new instance of `XMLNode`
+
+ // `parent` the parent node
+ constructor(parent1) {
+ this.parent = parent1;
+ if (this.parent) {
+ this.options = this.parent.options;
+ this.stringify = this.parent.stringify;
+ }
+ this.value = null;
+ this.children = [];
+ this.baseURI = null;
+ // first execution, load dependencies that are otherwise
+ // circular (so we can't load them at the top)
+ if (!XMLElement) {
+ XMLElement = require('./XMLElement');
+ XMLCData = require('./XMLCData');
+ XMLComment = require('./XMLComment');
+ XMLDeclaration = require('./XMLDeclaration');
+ XMLDocType = require('./XMLDocType');
+ XMLRaw = require('./XMLRaw');
+ XMLText = require('./XMLText');
+ XMLProcessingInstruction = require('./XMLProcessingInstruction');
+ XMLDummy = require('./XMLDummy');
+ NodeType = require('./NodeType');
+ XMLNodeList = require('./XMLNodeList');
+ XMLNamedNodeMap = require('./XMLNamedNodeMap');
+ DocumentPosition = require('./DocumentPosition');
+ }
+ }
+
+
+ // Sets the parent node of this node and its children recursively
+
+ // `parent` the parent node
+ setParent(parent) {
+ var child, j, len, ref1, results;
+ this.parent = parent;
+ if (parent) {
+ this.options = parent.options;
+ this.stringify = parent.stringify;
+ }
+ ref1 = this.children;
+ results = [];
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ results.push(child.setParent(this));
+ }
+ return results;
+ }
+
+ // Creates a child element node
+
+ // `name` node name or an object describing the XML tree
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ element(name, attributes, text) {
+ var childNode, item, j, k, key, lastChild, len, len1, val;
+ lastChild = null;
+ if (attributes === null && (text == null)) {
+ [attributes, text] = [{}, null];
+ }
+ if (attributes == null) {
+ attributes = {};
+ }
+ attributes = getValue(attributes);
+ // swap argument order: text <-> attributes
+ if (!isObject(attributes)) {
+ [text, attributes] = [attributes, text];
+ }
+ if (name != null) {
+ name = getValue(name);
+ }
+ // expand if array
+ if (Array.isArray(name)) {
+ for (j = 0, len = name.length; j < len; j++) {
+ item = name[j];
+ lastChild = this.element(item);
+ }
+ // evaluate if function
+ } else if (isFunction(name)) {
+ lastChild = this.element(name.apply());
+ // expand if object
+ } else if (isObject(name)) {
+ for (key in name) {
+ if (!hasProp.call(name, key)) continue;
+ val = name[key];
+ if (isFunction(val)) {
+ // evaluate if function
+ val = val.apply();
+ }
+ // assign attributes
+ if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) {
+ lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val);
+ // skip empty arrays
+ } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) {
+ lastChild = this.dummy();
+ // empty objects produce one node
+ } else if (isObject(val) && isEmpty(val)) {
+ lastChild = this.element(key);
+ // skip null and undefined nodes
+ } else if (!this.options.keepNullNodes && (val == null)) {
+ lastChild = this.dummy();
+
+ // expand list by creating child nodes
+ } else if (!this.options.separateArrayItems && Array.isArray(val)) {
+ for (k = 0, len1 = val.length; k < len1; k++) {
+ item = val[k];
+ childNode = {};
+ childNode[key] = item;
+ lastChild = this.element(childNode);
+ }
+
+ // expand child nodes under parent
+ } else if (isObject(val)) {
+ // if the key is #text expand child nodes under this node to support mixed content
+ if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) {
+ lastChild = this.element(val);
+ } else {
+ lastChild = this.element(key);
+ lastChild.element(val);
+ }
+ } else {
+
+ // text node
+ lastChild = this.element(key, val);
+ }
+ }
+ // skip null nodes
+ } else if (!this.options.keepNullNodes && text === null) {
+ lastChild = this.dummy();
+ } else {
+ // text node
+ if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) {
+ lastChild = this.text(text);
+ // cdata node
+ } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) {
+ lastChild = this.cdata(text);
+ // comment node
+ } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) {
+ lastChild = this.comment(text);
+ // raw text node
+ } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) {
+ lastChild = this.raw(text);
+ // processing instruction
+ } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) {
+ lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text);
+ } else {
+ // element node
+ lastChild = this.node(name, attributes, text);
+ }
+ }
+ if (lastChild == null) {
+ throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo());
+ }
+ return lastChild;
+ }
+
+ // Creates a child element node before the current node
+
+ // `name` node name or an object describing the XML tree
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ insertBefore(name, attributes, text) {
+ var child, i, newChild, refChild, removed;
+ // DOM level 1
+ // insertBefore(newChild, refChild) inserts the child node newChild before refChild
+ if (name != null ? name.type : void 0) {
+ newChild = name;
+ refChild = attributes;
+ newChild.setParent(this);
+ if (refChild) {
+ // temporarily remove children starting *with* refChild
+ i = children.indexOf(refChild);
+ removed = children.splice(i);
+
+ // add the new child
+ children.push(newChild);
+
+ // add back removed children after new child
+ Array.prototype.push.apply(children, removed);
+ } else {
+ children.push(newChild);
+ }
+ return newChild;
+ } else {
+ if (this.isRoot) {
+ throw new Error("Cannot insert elements at root level. " + this.debugInfo(name));
+ }
+
+ // temporarily remove children starting *with* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i);
+
+ // add the new child
+ child = this.parent.element(name, attributes, text);
+
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return child;
+ }
+ }
+
+ // Creates a child element node after the current node
+
+ // `name` node name or an object describing the XML tree
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ insertAfter(name, attributes, text) {
+ var child, i, removed;
+ if (this.isRoot) {
+ throw new Error("Cannot insert elements at root level. " + this.debugInfo(name));
+ }
+
+ // temporarily remove children starting *after* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i + 1);
+
+ // add the new child
+ child = this.parent.element(name, attributes, text);
+
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return child;
+ }
+
+ // Deletes a child element node
+
+ remove() {
+ var i, ref1;
+ if (this.isRoot) {
+ throw new Error("Cannot remove the root element. " + this.debugInfo());
+ }
+ i = this.parent.children.indexOf(this);
+ splice.apply(this.parent.children, [i, i - i + 1].concat(ref1 = [])), ref1;
+ return this.parent;
+ }
+
+ // Creates a node
+
+ // `name` name of the node
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ node(name, attributes, text) {
+ var child;
+ if (name != null) {
+ name = getValue(name);
+ }
+ attributes || (attributes = {});
+ attributes = getValue(attributes);
+ // swap argument order: text <-> attributes
+ if (!isObject(attributes)) {
+ [text, attributes] = [attributes, text];
+ }
+ child = new XMLElement(this, name, attributes);
+ if (text != null) {
+ child.text(text);
+ }
+ this.children.push(child);
+ return child;
+ }
+
+ // Creates a text node
+
+ // `value` element text
+ text(value) {
+ var child;
+ if (isObject(value)) {
+ this.element(value);
+ }
+ child = new XMLText(this, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a CDATA node
+
+ // `value` element text without CDATA delimiters
+ cdata(value) {
+ var child;
+ child = new XMLCData(this, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a comment node
+
+ // `value` comment text
+ comment(value) {
+ var child;
+ child = new XMLComment(this, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a comment node before the current node
+
+ // `value` comment text
+ commentBefore(value) {
+ var child, i, removed;
+ // temporarily remove children starting *with* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i);
+ // add the new child
+ child = this.parent.comment(value);
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return this;
+ }
+
+ // Creates a comment node after the current node
+
+ // `value` comment text
+ commentAfter(value) {
+ var child, i, removed;
+ // temporarily remove children starting *after* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i + 1);
+ // add the new child
+ child = this.parent.comment(value);
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return this;
+ }
+
+ // Adds unescaped raw text
+
+ // `value` text
+ raw(value) {
+ var child;
+ child = new XMLRaw(this, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Adds a dummy node
+ dummy() {
+ var child;
+ child = new XMLDummy(this);
+ // Normally when a new node is created it is added to the child node collection.
+ // However, dummy nodes are never added to the XML tree. They are created while
+ // converting JS objects to XML nodes in order not to break the recursive function
+ // chain. They can be thought of as invisible nodes. They can be traversed through
+ // by using prev(), next(), up(), etc. functions but they do not exists in the tree.
+
+ // @children.push child
+ return child;
+ }
+
+ // Adds a processing instruction
+
+ // `target` instruction target
+ // `value` instruction value
+ instruction(target, value) {
+ var insTarget, insValue, instruction, j, len;
+ if (target != null) {
+ target = getValue(target);
+ }
+ if (value != null) {
+ value = getValue(value);
+ }
+ if (Array.isArray(target)) { // expand if array
+ for (j = 0, len = target.length; j < len; j++) {
+ insTarget = target[j];
+ this.instruction(insTarget);
+ }
+ } else if (isObject(target)) { // expand if object
+ for (insTarget in target) {
+ if (!hasProp.call(target, insTarget)) continue;
+ insValue = target[insTarget];
+ this.instruction(insTarget, insValue);
+ }
+ } else {
+ if (isFunction(value)) {
+ value = value.apply();
+ }
+ instruction = new XMLProcessingInstruction(this, target, value);
+ this.children.push(instruction);
+ }
+ return this;
+ }
+
+ // Creates a processing instruction node before the current node
+
+ // `target` instruction target
+ // `value` instruction value
+ instructionBefore(target, value) {
+ var child, i, removed;
+ // temporarily remove children starting *with* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i);
+ // add the new child
+ child = this.parent.instruction(target, value);
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return this;
+ }
+
+ // Creates a processing instruction node after the current node
+
+ // `target` instruction target
+ // `value` instruction value
+ instructionAfter(target, value) {
+ var child, i, removed;
+ // temporarily remove children starting *after* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i + 1);
+ // add the new child
+ child = this.parent.instruction(target, value);
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return this;
+ }
+
+ // Creates the xml declaration
+
+ // `version` A version number string, e.g. 1.0
+ // `encoding` Encoding declaration, e.g. UTF-8
+ // `standalone` standalone document declaration: true or false
+ declaration(version, encoding, standalone) {
+ var doc, xmldec;
+ doc = this.document();
+ xmldec = new XMLDeclaration(doc, version, encoding, standalone);
+ // Replace XML declaration if exists, otherwise insert at top
+ if (doc.children.length === 0) {
+ doc.children.unshift(xmldec);
+ } else if (doc.children[0].type === NodeType.Declaration) {
+ doc.children[0] = xmldec;
+ } else {
+ doc.children.unshift(xmldec);
+ }
+ return doc.root() || doc;
+ }
+
+ // Creates the document type declaration
+
+ // `pubID` the public identifier of the external subset
+ // `sysID` the system identifier of the external subset
+ dtd(pubID, sysID) {
+ var child, doc, doctype, i, j, k, len, len1, ref1, ref2;
+ doc = this.document();
+ doctype = new XMLDocType(doc, pubID, sysID);
+ ref1 = doc.children;
+ // Replace DTD if exists
+ for (i = j = 0, len = ref1.length; j < len; i = ++j) {
+ child = ref1[i];
+ if (child.type === NodeType.DocType) {
+ doc.children[i] = doctype;
+ return doctype;
+ }
+ }
+ ref2 = doc.children;
+ // insert before root node if the root node exists
+ for (i = k = 0, len1 = ref2.length; k < len1; i = ++k) {
+ child = ref2[i];
+ if (child.isRoot) {
+ doc.children.splice(i, 0, doctype);
+ return doctype;
+ }
+ }
+ // otherwise append to end
+ doc.children.push(doctype);
+ return doctype;
+ }
+
+ // Gets the parent node
+ up() {
+ if (this.isRoot) {
+ throw new Error("The root node has no parent. Use doc() if you need to get the document object.");
+ }
+ return this.parent;
+ }
+
+ // Gets the root node
+ root() {
+ var node;
+ node = this;
+ while (node) {
+ if (node.type === NodeType.Document) {
+ return node.rootObject;
+ } else if (node.isRoot) {
+ return node;
+ } else {
+ node = node.parent;
+ }
+ }
+ }
+
+ // Gets the node representing the XML document
+ document() {
+ var node;
+ node = this;
+ while (node) {
+ if (node.type === NodeType.Document) {
+ return node;
+ } else {
+ node = node.parent;
+ }
+ }
+ }
+
+ // Ends the document and converts string
+ end(options) {
+ return this.document().end(options);
+ }
+
+ // Gets the previous node
+ prev() {
+ var i;
+ i = this.parent.children.indexOf(this);
+ if (i < 1) {
+ throw new Error("Already at the first node. " + this.debugInfo());
+ }
+ return this.parent.children[i - 1];
+ }
+
+ // Gets the next node
+ next() {
+ var i;
+ i = this.parent.children.indexOf(this);
+ if (i === -1 || i === this.parent.children.length - 1) {
+ throw new Error("Already at the last node. " + this.debugInfo());
+ }
+ return this.parent.children[i + 1];
+ }
+
+ // Imports cloned root from another XML document
+
+ // `doc` the XML document to insert nodes from
+ importDocument(doc) {
+ var child, clonedRoot, j, len, ref1;
+ clonedRoot = doc.root().clone();
+ clonedRoot.parent = this;
+ clonedRoot.isRoot = false;
+ this.children.push(clonedRoot);
+ // set properties if imported element becomes the root node
+ if (this.type === NodeType.Document) {
+ clonedRoot.isRoot = true;
+ clonedRoot.documentObject = this;
+ this.rootObject = clonedRoot;
+ // set dtd name
+ if (this.children) {
+ ref1 = this.children;
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ if (child.type === NodeType.DocType) {
+ child.name = clonedRoot.name;
+ break;
+ }
+ }
+ }
+ }
+ return this;
+ }
+
+
+ // Returns debug string for this node
+ debugInfo(name) {
+ var ref1, ref2;
+ name = name || this.name;
+ if ((name == null) && !((ref1 = this.parent) != null ? ref1.name : void 0)) {
+ return "";
+ } else if (name == null) {
+ return "parent: <" + this.parent.name + ">";
+ } else if (!((ref2 = this.parent) != null ? ref2.name : void 0)) {
+ return "node: <" + name + ">";
+ } else {
+ return "node: <" + name + ">, parent: <" + this.parent.name + ">";
+ }
+ }
+
+ // Aliases
+ ele(name, attributes, text) {
+ return this.element(name, attributes, text);
+ }
+
+ nod(name, attributes, text) {
+ return this.node(name, attributes, text);
+ }
+
+ txt(value) {
+ return this.text(value);
+ }
+
+ dat(value) {
+ return this.cdata(value);
+ }
+
+ com(value) {
+ return this.comment(value);
+ }
+
+ ins(target, value) {
+ return this.instruction(target, value);
+ }
+
+ doc() {
+ return this.document();
+ }
+
+ dec(version, encoding, standalone) {
+ return this.declaration(version, encoding, standalone);
+ }
+
+ e(name, attributes, text) {
+ return this.element(name, attributes, text);
+ }
+
+ n(name, attributes, text) {
+ return this.node(name, attributes, text);
+ }
+
+ t(value) {
+ return this.text(value);
+ }
+
+ d(value) {
+ return this.cdata(value);
+ }
+
+ c(value) {
+ return this.comment(value);
+ }
+
+ r(value) {
+ return this.raw(value);
+ }
+
+ i(target, value) {
+ return this.instruction(target, value);
+ }
+
+ u() {
+ return this.up();
+ }
+
+ // can be deprecated in a future release
+ importXMLBuilder(doc) {
+ return this.importDocument(doc);
+ }
+
+ // Adds or modifies an attribute.
+
+ // `name` attribute name
+ // `value` attribute value
+ attribute(name, value) {
+ throw new Error("attribute() applies to element nodes only.");
+ }
+
+ att(name, value) {
+ return this.attribute(name, value);
+ }
+
+ a(name, value) {
+ return this.attribute(name, value);
+ }
+
+ // Removes an attribute
+
+ // `name` attribute name
+ removeAttribute(name) {
+ throw new Error("attribute() applies to element nodes only.");
+ }
+
+ // DOM level 1 functions to be implemented later
+ replaceChild(newChild, oldChild) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ removeChild(oldChild) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ appendChild(newChild) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ hasChildNodes() {
+ return this.children.length !== 0;
+ }
+
+ cloneNode(deep) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ normalize() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 2
+ isSupported(feature, version) {
+ return true;
+ }
+
+ hasAttributes() {
+ return this.attribs.length !== 0;
+ }
+
+ // DOM level 3 functions to be implemented later
+ compareDocumentPosition(other) {
+ var ref, res;
+ ref = this;
+ if (ref === other) {
+ return 0;
+ } else if (this.document() !== other.document()) {
+ res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific;
+ if (Math.random() < 0.5) {
+ res |= DocumentPosition.Preceding;
+ } else {
+ res |= DocumentPosition.Following;
+ }
+ return res;
+ } else if (ref.isAncestor(other)) {
+ return DocumentPosition.Contains | DocumentPosition.Preceding;
+ } else if (ref.isDescendant(other)) {
+ return DocumentPosition.Contains | DocumentPosition.Following;
+ } else if (ref.isPreceding(other)) {
+ return DocumentPosition.Preceding;
+ } else {
+ return DocumentPosition.Following;
+ }
+ }
+
+ isSameNode(other) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ lookupPrefix(namespaceURI) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ isDefaultNamespace(namespaceURI) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ lookupNamespaceURI(prefix) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ isEqualNode(node) {
+ var i, j, ref1;
+ if (node.nodeType !== this.nodeType) {
+ return false;
+ }
+ if (node.children.length !== this.children.length) {
+ return false;
+ }
+ for (i = j = 0, ref1 = this.children.length - 1; (0 <= ref1 ? j <= ref1 : j >= ref1); i = 0 <= ref1 ? ++j : --j) {
+ if (!this.children[i].isEqualNode(node.children[i])) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ getFeature(feature, version) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ setUserData(key, data, handler) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getUserData(key) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // Returns true if other is an inclusive descendant of node,
+ // and false otherwise.
+ contains(other) {
+ if (!other) {
+ return false;
+ }
+ return other === this || this.isDescendant(other);
+ }
+
+ // An object A is called a descendant of an object B, if either A is
+ // a child of B or A is a child of an object C that is a descendant of B.
+ isDescendant(node) {
+ var child, isDescendantChild, j, len, ref1;
+ ref1 = this.children;
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ if (node === child) {
+ return true;
+ }
+ isDescendantChild = child.isDescendant(node);
+ if (isDescendantChild) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ // An object A is called an ancestor of an object B if and only if
+ // B is a descendant of A.
+ isAncestor(node) {
+ return node.isDescendant(this);
+ }
+
+ // An object A is preceding an object B if A and B are in the
+ // same tree and A comes before B in tree order.
+ isPreceding(node) {
+ var nodePos, thisPos;
+ nodePos = this.treePosition(node);
+ thisPos = this.treePosition(this);
+ if (nodePos === -1 || thisPos === -1) {
+ return false;
+ } else {
+ return nodePos < thisPos;
+ }
+ }
+
+ // An object A is folllowing an object B if A and B are in the
+ // same tree and A comes after B in tree order.
+ isFollowing(node) {
+ var nodePos, thisPos;
+ nodePos = this.treePosition(node);
+ thisPos = this.treePosition(this);
+ if (nodePos === -1 || thisPos === -1) {
+ return false;
+ } else {
+ return nodePos > thisPos;
+ }
+ }
+
+ // Returns the preorder position of the given node in the tree, or -1
+ // if the node is not in the tree.
+ treePosition(node) {
+ var found, pos;
+ pos = 0;
+ found = false;
+ this.foreachTreeNode(this.document(), function(childNode) {
+ pos++;
+ if (!found && childNode === node) {
+ return found = true;
+ }
+ });
+ if (found) {
+ return pos;
+ } else {
+ return -1;
+ }
+ }
+
+
+ // Depth-first preorder traversal through the XML tree
+ foreachTreeNode(node, func) {
+ var child, j, len, ref1, res;
+ node || (node = this.document());
+ ref1 = node.children;
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ if (res = func(child)) {
+ return res;
+ } else {
+ res = this.foreachTreeNode(child, func);
+ if (res) {
+ return res;
+ }
+ }
+ }
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLNode.prototype, 'nodeName', {
+ get: function() {
+ return this.name;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'nodeType', {
+ get: function() {
+ return this.type;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'nodeValue', {
+ get: function() {
+ return this.value;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'parentNode', {
+ get: function() {
+ return this.parent;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'childNodes', {
+ get: function() {
+ if (!this.childNodeList || !this.childNodeList.nodes) {
+ this.childNodeList = new XMLNodeList(this.children);
+ }
+ return this.childNodeList;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'firstChild', {
+ get: function() {
+ return this.children[0] || null;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'lastChild', {
+ get: function() {
+ return this.children[this.children.length - 1] || null;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'previousSibling', {
+ get: function() {
+ var i;
+ i = this.parent.children.indexOf(this);
+ return this.parent.children[i - 1] || null;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'nextSibling', {
+ get: function() {
+ var i;
+ i = this.parent.children.indexOf(this);
+ return this.parent.children[i + 1] || null;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'ownerDocument', {
+ get: function() {
+ return this.document() || null;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLNode.prototype, 'textContent', {
+ get: function() {
+ var child, j, len, ref1, str;
+ if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) {
+ str = '';
+ ref1 = this.children;
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ if (child.textContent) {
+ str += child.textContent;
+ }
+ }
+ return str;
+ } else {
+ return null;
+ }
+ },
+ set: function(value) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ return XMLNode;
+
+ }).call(this);
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLNodeFilter.js b/generator/node_modules/xmlbuilder/lib/XMLNodeFilter.js
new file mode 100644
index 0000000..3f33f45
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLNodeFilter.js
@@ -0,0 +1,51 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents a node filter
+ var XMLNodeFilter;
+
+ module.exports = XMLNodeFilter = (function() {
+ class XMLNodeFilter {
+ // DOM level 4 functions to be implemented later
+ acceptNode(node) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ };
+
+ XMLNodeFilter.prototype.FilterAccept = 1;
+
+ XMLNodeFilter.prototype.FilterReject = 2;
+
+ XMLNodeFilter.prototype.FilterSkip = 3;
+
+ XMLNodeFilter.prototype.ShowAll = 0xffffffff;
+
+ XMLNodeFilter.prototype.ShowElement = 0x1;
+
+ XMLNodeFilter.prototype.ShowAttribute = 0x2;
+
+ XMLNodeFilter.prototype.ShowText = 0x4;
+
+ XMLNodeFilter.prototype.ShowCDataSection = 0x8;
+
+ XMLNodeFilter.prototype.ShowEntityReference = 0x10;
+
+ XMLNodeFilter.prototype.ShowEntity = 0x20;
+
+ XMLNodeFilter.prototype.ShowProcessingInstruction = 0x40;
+
+ XMLNodeFilter.prototype.ShowComment = 0x80;
+
+ XMLNodeFilter.prototype.ShowDocument = 0x100;
+
+ XMLNodeFilter.prototype.ShowDocumentType = 0x200;
+
+ XMLNodeFilter.prototype.ShowDocumentFragment = 0x400;
+
+ XMLNodeFilter.prototype.ShowNotation = 0x800;
+
+ return XMLNodeFilter;
+
+ }).call(this);
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLNodeList.js b/generator/node_modules/xmlbuilder/lib/XMLNodeList.js
new file mode 100644
index 0000000..8570096
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLNodeList.js
@@ -0,0 +1,45 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents a list of nodes
+ var XMLNodeList;
+
+ module.exports = XMLNodeList = (function() {
+ class XMLNodeList {
+ // Initializes a new instance of `XMLNodeList`
+ // This is just a wrapper around an ordinary
+ // JS array.
+
+ // `nodes` the array containing nodes.
+ constructor(nodes) {
+ this.nodes = nodes;
+ }
+
+ // Creates and returns a deep clone of `this`
+
+ clone() {
+ // this class should not be cloned since it wraps
+ // around a given array. The calling function should check
+ // whether the wrapped array is null and supply a new array
+ // (from the clone).
+ return this.nodes = null;
+ }
+
+ // DOM Level 1
+ item(index) {
+ return this.nodes[index] || null;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLNodeList.prototype, 'length', {
+ get: function() {
+ return this.nodes.length || 0;
+ }
+ });
+
+ return XMLNodeList;
+
+ }).call(this);
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js b/generator/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
new file mode 100644
index 0000000..88b8fcd
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
@@ -0,0 +1,56 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLCharacterData, XMLProcessingInstruction;
+
+ NodeType = require('./NodeType');
+
+ XMLCharacterData = require('./XMLCharacterData');
+
+ // Represents a processing instruction
+ module.exports = XMLProcessingInstruction = class XMLProcessingInstruction extends XMLCharacterData {
+ // Initializes a new instance of `XMLProcessingInstruction`
+
+ // `parent` the parent node
+ // `target` instruction target
+ // `value` instruction value
+ constructor(parent, target, value) {
+ super(parent);
+ if (target == null) {
+ throw new Error("Missing instruction target. " + this.debugInfo());
+ }
+ this.type = NodeType.ProcessingInstruction;
+ this.target = this.stringify.insTarget(target);
+ this.name = this.target;
+ if (value) {
+ this.value = this.stringify.insValue(value);
+ }
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options));
+ }
+
+ isEqualNode(node) {
+ if (!super.isEqualNode(node)) {
+ return false;
+ }
+ if (node.target !== this.target) {
+ return false;
+ }
+ return true;
+ }
+
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLRaw.js b/generator/node_modules/xmlbuilder/lib/XMLRaw.js
new file mode 100644
index 0000000..4addc8b
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLRaw.js
@@ -0,0 +1,40 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLNode, XMLRaw;
+
+ NodeType = require('./NodeType');
+
+ XMLNode = require('./XMLNode');
+
+ // Represents a raw node
+ module.exports = XMLRaw = class XMLRaw extends XMLNode {
+ // Initializes a new instance of `XMLRaw`
+
+ // `text` raw text
+ constructor(parent, text) {
+ super(parent);
+ if (text == null) {
+ throw new Error("Missing raw text. " + this.debugInfo());
+ }
+ this.type = NodeType.Raw;
+ this.value = this.stringify.raw(text);
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.raw(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLStreamWriter.js b/generator/node_modules/xmlbuilder/lib/XMLStreamWriter.js
new file mode 100644
index 0000000..c0422a2
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLStreamWriter.js
@@ -0,0 +1,209 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, WriterState, XMLStreamWriter, XMLWriterBase,
+ hasProp = {}.hasOwnProperty;
+
+ NodeType = require('./NodeType');
+
+ XMLWriterBase = require('./XMLWriterBase');
+
+ WriterState = require('./WriterState');
+
+ // Prints XML nodes to a stream
+ module.exports = XMLStreamWriter = class XMLStreamWriter extends XMLWriterBase {
+ // Initializes a new instance of `XMLStreamWriter`
+
+ // `stream` output stream
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation string
+ // `options.newline` newline sequence
+ // `options.offset` a fixed number of indentations to add to every line
+ // `options.allowEmpty` do not self close empty element tags
+ // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF
+ // `options.spaceBeforeSlash` add a space before the closing slash of empty elements
+ constructor(stream, options) {
+ super(options);
+ this.stream = stream;
+ }
+
+ endline(node, options, level) {
+ if (node.isLastRootNode && options.state === WriterState.CloseTag) {
+ return '';
+ } else {
+ return super.endline(node, options, level);
+ }
+ }
+
+ document(doc, options) {
+ var child, i, j, k, len1, len2, ref, ref1, results;
+ ref = doc.children;
+ // set a flag so that we don't insert a newline after the last root level node
+ for (i = j = 0, len1 = ref.length; j < len1; i = ++j) {
+ child = ref[i];
+ child.isLastRootNode = i === doc.children.length - 1;
+ }
+ options = this.filterOptions(options);
+ ref1 = doc.children;
+ results = [];
+ for (k = 0, len2 = ref1.length; k < len2; k++) {
+ child = ref1[k];
+ results.push(this.writeChildNode(child, options, 0));
+ }
+ return results;
+ }
+
+ cdata(node, options, level) {
+ return this.stream.write(super.cdata(node, options, level));
+ }
+
+ comment(node, options, level) {
+ return this.stream.write(super.comment(node, options, level));
+ }
+
+ declaration(node, options, level) {
+ return this.stream.write(super.declaration(node, options, level));
+ }
+
+ docType(node, options, level) {
+ var child, j, len1, ref;
+ level || (level = 0);
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ this.stream.write(this.indent(node, options, level));
+ this.stream.write('<!DOCTYPE ' + node.root().name);
+ // external identifier
+ if (node.pubID && node.sysID) {
+ this.stream.write(' PUBLIC "' + node.pubID + '" "' + node.sysID + '"');
+ } else if (node.sysID) {
+ this.stream.write(' SYSTEM "' + node.sysID + '"');
+ }
+ // internal subset
+ if (node.children.length > 0) {
+ this.stream.write(' [');
+ this.stream.write(this.endline(node, options, level));
+ options.state = WriterState.InsideTag;
+ ref = node.children;
+ for (j = 0, len1 = ref.length; j < len1; j++) {
+ child = ref[j];
+ this.writeChildNode(child, options, level + 1);
+ }
+ options.state = WriterState.CloseTag;
+ this.stream.write(']');
+ }
+ // close tag
+ options.state = WriterState.CloseTag;
+ this.stream.write(options.spaceBeforeSlash + '>');
+ this.stream.write(this.endline(node, options, level));
+ options.state = WriterState.None;
+ return this.closeNode(node, options, level);
+ }
+
+ element(node, options, level) {
+ var att, attLen, child, childNodeCount, firstChildNode, j, len, len1, name, prettySuppressed, r, ratt, ref, ref1, ref2, rline;
+ level || (level = 0);
+ // open tag
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<' + node.name;
+ // attributes
+ if (options.pretty && options.width > 0) {
+ len = r.length;
+ ref = node.attribs;
+ for (name in ref) {
+ if (!hasProp.call(ref, name)) continue;
+ att = ref[name];
+ ratt = this.attribute(att, options, level);
+ attLen = ratt.length;
+ if (len + attLen > options.width) {
+ rline = this.indent(node, options, level + 1) + ratt;
+ r += this.endline(node, options, level) + rline;
+ len = rline.length;
+ } else {
+ rline = ' ' + ratt;
+ r += rline;
+ len += rline.length;
+ }
+ }
+ } else {
+ ref1 = node.attribs;
+ for (name in ref1) {
+ if (!hasProp.call(ref1, name)) continue;
+ att = ref1[name];
+ r += this.attribute(att, options, level);
+ }
+ }
+ this.stream.write(r);
+ childNodeCount = node.children.length;
+ firstChildNode = childNodeCount === 0 ? null : node.children[0];
+ if (childNodeCount === 0 || node.children.every(function(e) {
+ return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === '';
+ })) {
+ // empty element
+ if (options.allowEmpty) {
+ this.stream.write('>');
+ options.state = WriterState.CloseTag;
+ this.stream.write('</' + node.name + '>');
+ } else {
+ options.state = WriterState.CloseTag;
+ this.stream.write(options.spaceBeforeSlash + '/>');
+ }
+ } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) {
+ // do not indent text-only nodes
+ this.stream.write('>');
+ options.state = WriterState.InsideTag;
+ options.suppressPrettyCount++;
+ prettySuppressed = true;
+ this.writeChildNode(firstChildNode, options, level + 1);
+ options.suppressPrettyCount--;
+ prettySuppressed = false;
+ options.state = WriterState.CloseTag;
+ this.stream.write('</' + node.name + '>');
+ } else {
+ this.stream.write('>' + this.endline(node, options, level));
+ options.state = WriterState.InsideTag;
+ ref2 = node.children;
+ // inner tags
+ for (j = 0, len1 = ref2.length; j < len1; j++) {
+ child = ref2[j];
+ this.writeChildNode(child, options, level + 1);
+ }
+ // close tag
+ options.state = WriterState.CloseTag;
+ this.stream.write(this.indent(node, options, level) + '</' + node.name + '>');
+ }
+ this.stream.write(this.endline(node, options, level));
+ options.state = WriterState.None;
+ return this.closeNode(node, options, level);
+ }
+
+ processingInstruction(node, options, level) {
+ return this.stream.write(super.processingInstruction(node, options, level));
+ }
+
+ raw(node, options, level) {
+ return this.stream.write(super.raw(node, options, level));
+ }
+
+ text(node, options, level) {
+ return this.stream.write(super.text(node, options, level));
+ }
+
+ dtdAttList(node, options, level) {
+ return this.stream.write(super.dtdAttList(node, options, level));
+ }
+
+ dtdElement(node, options, level) {
+ return this.stream.write(super.dtdElement(node, options, level));
+ }
+
+ dtdEntity(node, options, level) {
+ return this.stream.write(super.dtdEntity(node, options, level));
+ }
+
+ dtdNotation(node, options, level) {
+ return this.stream.write(super.dtdNotation(node, options, level));
+ }
+
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLStringWriter.js b/generator/node_modules/xmlbuilder/lib/XMLStringWriter.js
new file mode 100644
index 0000000..969caf5
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLStringWriter.js
@@ -0,0 +1,40 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var XMLStringWriter, XMLWriterBase;
+
+ XMLWriterBase = require('./XMLWriterBase');
+
+ // Prints XML nodes as plain text
+ module.exports = XMLStringWriter = class XMLStringWriter extends XMLWriterBase {
+ // Initializes a new instance of `XMLStringWriter`
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation string
+ // `options.newline` newline sequence
+ // `options.offset` a fixed number of indentations to add to every line
+ // `options.allowEmpty` do not self close empty element tags
+ // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF
+ // `options.spaceBeforeSlash` add a space before the closing slash of empty elements
+ constructor(options) {
+ super(options);
+ }
+
+ document(doc, options) {
+ var child, i, len, r, ref;
+ options = this.filterOptions(options);
+ r = '';
+ ref = doc.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ r += this.writeChildNode(child, options, 0);
+ }
+ // remove trailing newline
+ if (options.pretty && r.slice(-options.newline.length) === options.newline) {
+ r = r.slice(0, -options.newline.length);
+ }
+ return r;
+ }
+
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLStringifier.js b/generator/node_modules/xmlbuilder/lib/XMLStringifier.js
new file mode 100644
index 0000000..1a7cbb0
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLStringifier.js
@@ -0,0 +1,291 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Converts values to strings
+ var XMLStringifier,
+ hasProp = {}.hasOwnProperty;
+
+ module.exports = XMLStringifier = (function() {
+ class XMLStringifier {
+ // Initializes a new instance of `XMLStringifier`
+
+ // `options.version` The version number string of the XML spec to validate against, e.g. 1.0
+ // `options.noDoubleEncoding` whether existing html entities are encoded: true or false
+ // `options.stringify` a set of functions to use for converting values to strings
+ // `options.noValidation` whether values will be validated and escaped or returned as is
+ // `options.invalidCharReplacement` a character to replace invalid characters and disable character validation
+ constructor(options) {
+ var key, ref, value;
+ // Checks whether the given string contains legal characters
+ // Fails with an exception on error
+
+ // `str` the string to check
+ this.assertLegalChar = this.assertLegalChar.bind(this);
+ // Checks whether the given string contains legal characters for a name
+ // Fails with an exception on error
+
+ // `str` the string to check
+ this.assertLegalName = this.assertLegalName.bind(this);
+ options || (options = {});
+ this.options = options;
+ if (!this.options.version) {
+ this.options.version = '1.0';
+ }
+ ref = options.stringify || {};
+ for (key in ref) {
+ if (!hasProp.call(ref, key)) continue;
+ value = ref[key];
+ this[key] = value;
+ }
+ }
+
+ // Defaults
+ name(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalName('' + val || '');
+ }
+
+ text(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar(this.textEscape('' + val || ''));
+ }
+
+ cdata(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ val = val.replace(']]>', ']]]]><![CDATA[>');
+ return this.assertLegalChar(val);
+ }
+
+ comment(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (val.match(/--/)) {
+ throw new Error("Comment text cannot contain double-hypen: " + val);
+ }
+ return this.assertLegalChar(val);
+ }
+
+ raw(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return '' + val || '';
+ }
+
+ attValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar(this.attEscape(val = '' + val || ''));
+ }
+
+ insTarget(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ insValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (val.match(/\?>/)) {
+ throw new Error("Invalid processing instruction value: " + val);
+ }
+ return this.assertLegalChar(val);
+ }
+
+ xmlVersion(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (!val.match(/1\.[0-9]+/)) {
+ throw new Error("Invalid version number: " + val);
+ }
+ return val;
+ }
+
+ xmlEncoding(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) {
+ throw new Error("Invalid encoding: " + val);
+ }
+ return this.assertLegalChar(val);
+ }
+
+ xmlStandalone(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ if (val) {
+ return "yes";
+ } else {
+ return "no";
+ }
+ }
+
+ dtdPubID(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdSysID(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdElementValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdAttType(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdAttDefault(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdEntityValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdNData(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ assertLegalChar(str) {
+ var regex, res;
+ if (this.options.noValidation) {
+ return str;
+ }
+ if (this.options.version === '1.0') {
+ // Valid characters from https://www.w3.org/TR/xml/#charsets
+ // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
+ // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
+ // This ES5 compatible Regexp has been generated using the "regenerate" NPM module:
+ // let xml_10_InvalidChars = regenerate()
+ // .addRange(0x0000, 0x0008)
+ // .add(0x000B, 0x000C)
+ // .addRange(0x000E, 0x001F)
+ // .addRange(0xD800, 0xDFFF)
+ // .addRange(0xFFFE, 0xFFFF)
+ regex = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g;
+ if (this.options.invalidCharReplacement !== void 0) {
+ str = str.replace(regex, this.options.invalidCharReplacement);
+ } else if (res = str.match(regex)) {
+ throw new Error(`Invalid character in string: ${str} at index ${res.index}`);
+ }
+ } else if (this.options.version === '1.1') {
+ // Valid characters from https://www.w3.org/TR/xml11/#charsets
+ // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
+ // [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
+ // This ES5 compatible Regexp has been generated using the "regenerate" NPM module:
+ // let xml_11_InvalidChars = regenerate()
+ // .add(0x0000)
+ // .addRange(0xD800, 0xDFFF)
+ // .addRange(0xFFFE, 0xFFFF)
+ regex = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g;
+ if (this.options.invalidCharReplacement !== void 0) {
+ str = str.replace(regex, this.options.invalidCharReplacement);
+ } else if (res = str.match(regex)) {
+ throw new Error(`Invalid character in string: ${str} at index ${res.index}`);
+ }
+ }
+ return str;
+ }
+
+ assertLegalName(str) {
+ var regex;
+ if (this.options.noValidation) {
+ return str;
+ }
+ str = this.assertLegalChar(str);
+ regex = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/;
+ if (!str.match(regex)) {
+ throw new Error(`Invalid character in name: ${str}`);
+ }
+ return str;
+ }
+
+ // Escapes special characters in text
+
+ // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping
+
+ // `str` the string to escape
+ textEscape(str) {
+ var ampregex;
+ if (this.options.noValidation) {
+ return str;
+ }
+ ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g;
+ return str.replace(ampregex, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\r/g, '&#xD;');
+ }
+
+ // Escapes special characters in attribute values
+
+ // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping
+
+ // `str` the string to escape
+ attEscape(str) {
+ var ampregex;
+ if (this.options.noValidation) {
+ return str;
+ }
+ ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g;
+ return str.replace(ampregex, '&amp;').replace(/</g, '&lt;').replace(/"/g, '&quot;').replace(/\t/g, '&#x9;').replace(/\n/g, '&#xA;').replace(/\r/g, '&#xD;');
+ }
+
+ };
+
+ // strings to match while converting from JS objects
+ XMLStringifier.prototype.convertAttKey = '@';
+
+ XMLStringifier.prototype.convertPIKey = '?';
+
+ XMLStringifier.prototype.convertTextKey = '#text';
+
+ XMLStringifier.prototype.convertCDataKey = '#cdata';
+
+ XMLStringifier.prototype.convertCommentKey = '#comment';
+
+ XMLStringifier.prototype.convertRawKey = '#raw';
+
+ return XMLStringifier;
+
+ }).call(this);
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLText.js b/generator/node_modules/xmlbuilder/lib/XMLText.js
new file mode 100644
index 0000000..24f9d4b
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLText.js
@@ -0,0 +1,82 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLCharacterData, XMLText;
+
+ NodeType = require('./NodeType');
+
+ XMLCharacterData = require('./XMLCharacterData');
+
+ // Represents a text node
+ module.exports = XMLText = (function() {
+ class XMLText extends XMLCharacterData {
+ // Initializes a new instance of `XMLText`
+
+ // `text` element text
+ constructor(parent, text) {
+ super(parent);
+ if (text == null) {
+ throw new Error("Missing element text. " + this.debugInfo());
+ }
+ this.name = "#text";
+ this.type = NodeType.Text;
+ this.value = this.stringify.text(text);
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.text(this, this.options.writer.filterOptions(options));
+ }
+
+ // DOM level 1 functions to be implemented later
+ splitText(offset) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 3 functions to be implemented later
+ replaceWholeText(content) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ };
+
+ // DOM level 3
+ Object.defineProperty(XMLText.prototype, 'isElementContentWhitespace', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ Object.defineProperty(XMLText.prototype, 'wholeText', {
+ get: function() {
+ var next, prev, str;
+ str = '';
+ prev = this.previousSibling;
+ while (prev) {
+ str = prev.data + str;
+ prev = prev.previousSibling;
+ }
+ str += this.data;
+ next = this.nextSibling;
+ while (next) {
+ str = str + next.data;
+ next = next.nextSibling;
+ }
+ return str;
+ }
+ });
+
+ return XMLText;
+
+ }).call(this);
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLTypeInfo.js b/generator/node_modules/xmlbuilder/lib/XMLTypeInfo.js
new file mode 100644
index 0000000..1de000a
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLTypeInfo.js
@@ -0,0 +1,23 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var Derivation, XMLTypeInfo;
+
+ Derivation = require('./Derivation');
+
+ // Represents a type referenced from element or attribute nodes.
+ module.exports = XMLTypeInfo = class XMLTypeInfo {
+ // Initializes a new instance of `XMLTypeInfo`
+
+ constructor(typeName, typeNamespace) {
+ this.typeName = typeName;
+ this.typeNamespace = typeNamespace;
+ }
+
+ // DOM level 3 functions to be implemented later
+ isDerivedFrom(typeNamespaceArg, typeNameArg, derivationMethod) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLUserDataHandler.js b/generator/node_modules/xmlbuilder/lib/XMLUserDataHandler.js
new file mode 100644
index 0000000..97ade4f
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLUserDataHandler.js
@@ -0,0 +1,27 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var OperationType, XMLUserDataHandler;
+
+ OperationType = require('./OperationType');
+
+ // Represents a handler that gets called when its associated
+ // node object is being cloned, imported, or renamed.
+ module.exports = XMLUserDataHandler = class XMLUserDataHandler {
+ // Initializes a new instance of `XMLUserDataHandler`
+
+ constructor() {}
+
+ // Called whenever the node for which this handler is
+ // registered is imported or cloned.
+
+ // `operation` type of operation that is being performed on the node
+ // `key` the key for which this handler is being called
+ // `data` the data for which this handler is being called
+ // `src` the node being cloned, adopted, imported, or renamed
+ // This is null when the node is being deleted.
+ // `dst` the node newly created if any, or null
+ handle(operation, key, data, src, dst) {}
+
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/XMLWriterBase.js b/generator/node_modules/xmlbuilder/lib/XMLWriterBase.js
new file mode 100644
index 0000000..42c0195
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/XMLWriterBase.js
@@ -0,0 +1,485 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, WriterState, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLProcessingInstruction, XMLRaw, XMLText, XMLWriterBase, assign,
+ hasProp = {}.hasOwnProperty;
+
+ ({assign} = require('./Utility'));
+
+ NodeType = require('./NodeType');
+
+ XMLDeclaration = require('./XMLDeclaration');
+
+ XMLDocType = require('./XMLDocType');
+
+ XMLCData = require('./XMLCData');
+
+ XMLComment = require('./XMLComment');
+
+ XMLElement = require('./XMLElement');
+
+ XMLRaw = require('./XMLRaw');
+
+ XMLText = require('./XMLText');
+
+ XMLProcessingInstruction = require('./XMLProcessingInstruction');
+
+ XMLDummy = require('./XMLDummy');
+
+ XMLDTDAttList = require('./XMLDTDAttList');
+
+ XMLDTDElement = require('./XMLDTDElement');
+
+ XMLDTDEntity = require('./XMLDTDEntity');
+
+ XMLDTDNotation = require('./XMLDTDNotation');
+
+ WriterState = require('./WriterState');
+
+ // Base class for XML writers
+ module.exports = XMLWriterBase = class XMLWriterBase {
+ // Initializes a new instance of `XMLWriterBase`
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation string
+ // `options.newline` newline sequence
+ // `options.offset` a fixed number of indentations to add to every line
+ // `options.width` maximum column width
+ // `options.allowEmpty` do not self close empty element tags
+ // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF
+ // `options.spaceBeforeSlash` add a space before the closing slash of empty elements
+ constructor(options) {
+ var key, ref, value;
+ options || (options = {});
+ this.options = options;
+ ref = options.writer || {};
+ for (key in ref) {
+ if (!hasProp.call(ref, key)) continue;
+ value = ref[key];
+ this["_" + key] = this[key];
+ this[key] = value;
+ }
+ }
+
+ // Filters writer options and provides defaults
+
+ // `options` writer options
+ filterOptions(options) {
+ var filteredOptions, ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7;
+ options || (options = {});
+ options = assign({}, this.options, options);
+ filteredOptions = {
+ writer: this
+ };
+ filteredOptions.pretty = options.pretty || false;
+ filteredOptions.allowEmpty = options.allowEmpty || false;
+ filteredOptions.indent = (ref = options.indent) != null ? ref : ' ';
+ filteredOptions.newline = (ref1 = options.newline) != null ? ref1 : '\n';
+ filteredOptions.offset = (ref2 = options.offset) != null ? ref2 : 0;
+ filteredOptions.width = (ref3 = options.width) != null ? ref3 : 0;
+ filteredOptions.dontPrettyTextNodes = (ref4 = (ref5 = options.dontPrettyTextNodes) != null ? ref5 : options.dontprettytextnodes) != null ? ref4 : 0;
+ filteredOptions.spaceBeforeSlash = (ref6 = (ref7 = options.spaceBeforeSlash) != null ? ref7 : options.spacebeforeslash) != null ? ref6 : '';
+ if (filteredOptions.spaceBeforeSlash === true) {
+ filteredOptions.spaceBeforeSlash = ' ';
+ }
+ filteredOptions.suppressPrettyCount = 0;
+ filteredOptions.user = {};
+ filteredOptions.state = WriterState.None;
+ return filteredOptions;
+ }
+
+ // Returns the indentation string for the current level
+
+ // `node` current node
+ // `options` writer options
+ // `level` current indentation level
+ indent(node, options, level) {
+ var indentLevel;
+ if (!options.pretty || options.suppressPrettyCount) {
+ return '';
+ } else if (options.pretty) {
+ indentLevel = (level || 0) + options.offset + 1;
+ if (indentLevel > 0) {
+ return new Array(indentLevel).join(options.indent);
+ }
+ }
+ return '';
+ }
+
+ // Returns the newline string
+
+ // `node` current node
+ // `options` writer options
+ // `level` current indentation level
+ endline(node, options, level) {
+ if (!options.pretty || options.suppressPrettyCount) {
+ return '';
+ } else {
+ return options.newline;
+ }
+ }
+
+ attribute(att, options, level) {
+ var r;
+ this.openAttribute(att, options, level);
+ if (options.pretty && options.width > 0) {
+ r = att.name + '="' + att.value + '"';
+ } else {
+ r = ' ' + att.name + '="' + att.value + '"';
+ }
+ this.closeAttribute(att, options, level);
+ return r;
+ }
+
+ cdata(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<![CDATA[';
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += ']]>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ comment(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!-- ';
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += ' -->' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ declaration(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<?xml';
+ options.state = WriterState.InsideTag;
+ r += ' version="' + node.version + '"';
+ if (node.encoding != null) {
+ r += ' encoding="' + node.encoding + '"';
+ }
+ if (node.standalone != null) {
+ r += ' standalone="' + node.standalone + '"';
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '?>';
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ docType(node, options, level) {
+ var child, i, len1, r, ref;
+ level || (level = 0);
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level);
+ r += '<!DOCTYPE ' + node.root().name;
+ // external identifier
+ if (node.pubID && node.sysID) {
+ r += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
+ } else if (node.sysID) {
+ r += ' SYSTEM "' + node.sysID + '"';
+ }
+ // internal subset
+ if (node.children.length > 0) {
+ r += ' [';
+ r += this.endline(node, options, level);
+ options.state = WriterState.InsideTag;
+ ref = node.children;
+ for (i = 0, len1 = ref.length; i < len1; i++) {
+ child = ref[i];
+ r += this.writeChildNode(child, options, level + 1);
+ }
+ options.state = WriterState.CloseTag;
+ r += ']';
+ }
+ // close tag
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>';
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ element(node, options, level) {
+ var att, attLen, child, childNodeCount, firstChildNode, i, j, len, len1, len2, name, prettySuppressed, r, ratt, ref, ref1, ref2, ref3, rline;
+ level || (level = 0);
+ prettySuppressed = false;
+ // open tag
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<' + node.name;
+ // attributes
+ if (options.pretty && options.width > 0) {
+ len = r.length;
+ ref = node.attribs;
+ for (name in ref) {
+ if (!hasProp.call(ref, name)) continue;
+ att = ref[name];
+ ratt = this.attribute(att, options, level);
+ attLen = ratt.length;
+ if (len + attLen > options.width) {
+ rline = this.indent(node, options, level + 1) + ratt;
+ r += this.endline(node, options, level) + rline;
+ len = rline.length;
+ } else {
+ rline = ' ' + ratt;
+ r += rline;
+ len += rline.length;
+ }
+ }
+ } else {
+ ref1 = node.attribs;
+ for (name in ref1) {
+ if (!hasProp.call(ref1, name)) continue;
+ att = ref1[name];
+ r += this.attribute(att, options, level);
+ }
+ }
+ childNodeCount = node.children.length;
+ firstChildNode = childNodeCount === 0 ? null : node.children[0];
+ if (childNodeCount === 0 || node.children.every(function(e) {
+ return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === '';
+ })) {
+ // empty element
+ if (options.allowEmpty) {
+ r += '>';
+ options.state = WriterState.CloseTag;
+ r += '</' + node.name + '>' + this.endline(node, options, level);
+ } else {
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level);
+ }
+ } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) {
+ // do not indent text-only nodes
+ r += '>';
+ options.state = WriterState.InsideTag;
+ options.suppressPrettyCount++;
+ prettySuppressed = true;
+ r += this.writeChildNode(firstChildNode, options, level + 1);
+ options.suppressPrettyCount--;
+ prettySuppressed = false;
+ options.state = WriterState.CloseTag;
+ r += '</' + node.name + '>' + this.endline(node, options, level);
+ } else {
+ // if ANY are a text node, then suppress pretty now
+ if (options.dontPrettyTextNodes) {
+ ref2 = node.children;
+ for (i = 0, len1 = ref2.length; i < len1; i++) {
+ child = ref2[i];
+ if ((child.type === NodeType.Text || child.type === NodeType.Raw || child.type === NodeType.CData) && (child.value != null)) {
+ options.suppressPrettyCount++;
+ prettySuppressed = true;
+ break;
+ }
+ }
+ }
+ // close the opening tag, after dealing with newline
+ r += '>' + this.endline(node, options, level);
+ options.state = WriterState.InsideTag;
+ ref3 = node.children;
+ // inner tags
+ for (j = 0, len2 = ref3.length; j < len2; j++) {
+ child = ref3[j];
+ r += this.writeChildNode(child, options, level + 1);
+ }
+ // close tag
+ options.state = WriterState.CloseTag;
+ r += this.indent(node, options, level) + '</' + node.name + '>';
+ if (prettySuppressed) {
+ options.suppressPrettyCount--;
+ }
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ }
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ writeChildNode(node, options, level) {
+ switch (node.type) {
+ case NodeType.CData:
+ return this.cdata(node, options, level);
+ case NodeType.Comment:
+ return this.comment(node, options, level);
+ case NodeType.Element:
+ return this.element(node, options, level);
+ case NodeType.Raw:
+ return this.raw(node, options, level);
+ case NodeType.Text:
+ return this.text(node, options, level);
+ case NodeType.ProcessingInstruction:
+ return this.processingInstruction(node, options, level);
+ case NodeType.Dummy:
+ return '';
+ case NodeType.Declaration:
+ return this.declaration(node, options, level);
+ case NodeType.DocType:
+ return this.docType(node, options, level);
+ case NodeType.AttributeDeclaration:
+ return this.dtdAttList(node, options, level);
+ case NodeType.ElementDeclaration:
+ return this.dtdElement(node, options, level);
+ case NodeType.EntityDeclaration:
+ return this.dtdEntity(node, options, level);
+ case NodeType.NotationDeclaration:
+ return this.dtdNotation(node, options, level);
+ default:
+ throw new Error("Unknown XML node type: " + node.constructor.name);
+ }
+ }
+
+ processingInstruction(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<?';
+ options.state = WriterState.InsideTag;
+ r += node.target;
+ if (node.value) {
+ r += ' ' + node.value;
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '?>';
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ raw(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level);
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ text(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level);
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ dtdAttList(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!ATTLIST';
+ options.state = WriterState.InsideTag;
+ r += ' ' + node.elementName + ' ' + node.attributeName + ' ' + node.attributeType;
+ if (node.defaultValueType !== '#DEFAULT') {
+ r += ' ' + node.defaultValueType;
+ }
+ if (node.defaultValue) {
+ r += ' "' + node.defaultValue + '"';
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ dtdElement(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!ELEMENT';
+ options.state = WriterState.InsideTag;
+ r += ' ' + node.name + ' ' + node.value;
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ dtdEntity(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!ENTITY';
+ options.state = WriterState.InsideTag;
+ if (node.pe) {
+ r += ' %';
+ }
+ r += ' ' + node.name;
+ if (node.value) {
+ r += ' "' + node.value + '"';
+ } else {
+ if (node.pubID && node.sysID) {
+ r += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
+ } else if (node.sysID) {
+ r += ' SYSTEM "' + node.sysID + '"';
+ }
+ if (node.nData) {
+ r += ' NDATA ' + node.nData;
+ }
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ dtdNotation(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!NOTATION';
+ options.state = WriterState.InsideTag;
+ r += ' ' + node.name;
+ if (node.pubID && node.sysID) {
+ r += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
+ } else if (node.pubID) {
+ r += ' PUBLIC "' + node.pubID + '"';
+ } else if (node.sysID) {
+ r += ' SYSTEM "' + node.sysID + '"';
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ openNode(node, options, level) {}
+
+ closeNode(node, options, level) {}
+
+ openAttribute(att, options, level) {}
+
+ closeAttribute(att, options, level) {}
+
+ };
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/lib/index.js b/generator/node_modules/xmlbuilder/lib/index.js
new file mode 100644
index 0000000..c9ff150
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/lib/index.js
@@ -0,0 +1,120 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction;
+
+ ({assign, isFunction} = require('./Utility'));
+
+ XMLDOMImplementation = require('./XMLDOMImplementation');
+
+ XMLDocument = require('./XMLDocument');
+
+ XMLDocumentCB = require('./XMLDocumentCB');
+
+ XMLStringWriter = require('./XMLStringWriter');
+
+ XMLStreamWriter = require('./XMLStreamWriter');
+
+ NodeType = require('./NodeType');
+
+ WriterState = require('./WriterState');
+
+ // Creates a new document and returns the root node for
+ // chain-building the document tree
+
+ // `name` name of the root element
+
+ // `xmldec.version` A version number string, e.g. 1.0
+ // `xmldec.encoding` Encoding declaration, e.g. UTF-8
+ // `xmldec.standalone` standalone document declaration: true or false
+
+ // `doctype.pubID` public identifier of the external subset
+ // `doctype.sysID` system identifier of the external subset
+
+ // `options.headless` whether XML declaration and doctype will be included:
+ // true or false
+ // `options.keepNullNodes` whether nodes with null values will be kept
+ // or ignored: true or false
+ // `options.keepNullAttributes` whether attributes with null values will be
+ // kept or ignored: true or false
+ // `options.ignoreDecorators` whether decorator strings will be ignored when
+ // converting JS objects: true or false
+ // `options.separateArrayItems` whether array items are created as separate
+ // nodes when passed as an object value: true or false
+ // `options.noDoubleEncoding` whether existing html entities are encoded:
+ // true or false
+ // `options.stringify` a set of functions to use for converting values to
+ // strings
+ // `options.writer` the default XML writer to use for converting nodes to
+ // string. If the default writer is not set, the built-in XMLStringWriter
+ // will be used instead.
+ module.exports.create = function(name, xmldec, doctype, options) {
+ var doc, root;
+ if (name == null) {
+ throw new Error("Root element needs a name.");
+ }
+ options = assign({}, xmldec, doctype, options);
+ // create the document node
+ doc = new XMLDocument(options);
+ // add the root node
+ root = doc.element(name);
+ // prolog
+ if (!options.headless) {
+ doc.declaration(options);
+ if ((options.pubID != null) || (options.sysID != null)) {
+ doc.dtd(options);
+ }
+ }
+ return root;
+ };
+
+ // Creates a new document and returns the document node for
+ // chain-building the document tree
+
+ // `options.keepNullNodes` whether nodes with null values will be kept
+ // or ignored: true or false
+ // `options.keepNullAttributes` whether attributes with null values will be
+ // kept or ignored: true or false
+ // `options.ignoreDecorators` whether decorator strings will be ignored when
+ // converting JS objects: true or false
+ // `options.separateArrayItems` whether array items are created as separate
+ // nodes when passed as an object value: true or false
+ // `options.noDoubleEncoding` whether existing html entities are encoded:
+ // true or false
+ // `options.stringify` a set of functions to use for converting values to
+ // strings
+ // `options.writer` the default XML writer to use for converting nodes to
+ // string. If the default writer is not set, the built-in XMLStringWriter
+ // will be used instead.
+
+ // `onData` the function to be called when a new chunk of XML is output. The
+ // string containing the XML chunk is passed to `onData` as its single
+ // argument.
+ // `onEnd` the function to be called when the XML document is completed with
+ // `end`. `onEnd` does not receive any arguments.
+ module.exports.begin = function(options, onData, onEnd) {
+ if (isFunction(options)) {
+ [onData, onEnd] = [options, onData];
+ options = {};
+ }
+ if (onData) {
+ return new XMLDocumentCB(options, onData, onEnd);
+ } else {
+ return new XMLDocument(options);
+ }
+ };
+
+ module.exports.stringWriter = function(options) {
+ return new XMLStringWriter(options);
+ };
+
+ module.exports.streamWriter = function(stream, options) {
+ return new XMLStreamWriter(stream, options);
+ };
+
+ module.exports.implementation = new XMLDOMImplementation();
+
+ module.exports.nodeType = NodeType;
+
+ module.exports.writerState = WriterState;
+
+}).call(this);
diff --git a/generator/node_modules/xmlbuilder/package.json b/generator/node_modules/xmlbuilder/package.json
new file mode 100644
index 0000000..8a06b18
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "xmlbuilder",
+ "version": "15.1.1",
+ "keywords": [
+ "xml",
+ "xmlbuilder"
+ ],
+ "homepage": "http://github.com/oozcitak/xmlbuilder-js",
+ "description": "An XML builder for node.js",
+ "author": "Ozgur Ozcitak <oozcitak@gmail.com>",
+ "contributors": [],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/oozcitak/xmlbuilder-js.git"
+ },
+ "bugs": {
+ "url": "http://github.com/oozcitak/xmlbuilder-js/issues"
+ },
+ "main": "./lib/index",
+ "typings": "./typings/index.d.ts",
+ "engines": {
+ "node": ">=8.0"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "coffee-coverage": "*",
+ "coffeescript": "2.4.1",
+ "coveralls": "*",
+ "istanbul": "*",
+ "mocha": "*",
+ "nyc": "*",
+ "xpath": "*",
+ "git-state": "*"
+ },
+ "mocha": {
+ "require": [
+ "coffeescript/register",
+ "coffee-coverage/register-istanbul",
+ "test/common.coffee"
+ ],
+ "recursive": true,
+ "ui": "tdd",
+ "reporter": "dot"
+ },
+ "scripts": {
+ "prepublishOnly": "coffee -co lib src",
+ "test": "nyc mocha \"test/**/*.coffee\"",
+ "perf": "coffee ./perf/index.coffee"
+ }
+}
diff --git a/generator/node_modules/xmlbuilder/perf/basic/escaping.coffee b/generator/node_modules/xmlbuilder/perf/basic/escaping.coffee
new file mode 100644
index 0000000..126825d
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/perf/basic/escaping.coffee
@@ -0,0 +1,244 @@
+XMLStringifier = require('../../src/XMLStringifier')
+stringify = new XMLStringifier()
+
+perf 'Text escaping', 100000, (run) ->
+ text = '&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r'
+ run () -> stringify.textEscape(text)
+
+perf 'Text escaping (no replacement)', 100000, (run) ->
+ text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque faucibus dui metus, quis mattis nibh sollicitudin ut.'
+ run () -> stringify.textEscape(text)
+
+perf 'Attribute value escaping', 100000, (run) ->
+ att = '&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r'
+ run () -> stringify.attEscape(att)
+
+perf 'Attribute value escaping (no replacement)', 100000, (run) ->
+ att = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque faucibus dui metus, quis mattis nibh sollicitudin ut.'
+ run () -> stringify.attEscape(att)
+
+perf 'Text escaping (long text)', 100000, (run) ->
+ text = """
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque faucibus dui metus, quis mattis nibh sollicitudin ut. Suspendisse efficitur vestibulum purus ut luctus. Maecenas mollis purus sit amet enim sollicitudin dapibus. Aenean eget enim maximus, semper lacus eget, posuere sapien. Maecenas iaculis ipsum in facilisis commodo. Integer tincidunt, mi ut interdum euismod, massa ligula tincidunt sem, in dapibus ipsum risus quis mauris. Nullam maximus mi quis mollis rhoncus. Donec sollicitudin, neque fringilla feugiat vulputate, risus elit luctus nisi, in varius magna enim sed lorem. Phasellus elementum lacus in nisi pharetra, nec semper arcu sodales. Suspendisse ac condimentum magna, vel pretium massa. Duis vehicula neque sapien, id cursus nulla vestibulum at. Sed vehicula consequat eros, in hendrerit risus dictum quis. Nunc nec sodales leo. Suspendisse ut lorem in ipsum bibendum imperdiet sit amet a orci. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
+
+Mauris elementum luctus nisi eget suscipit. Donec vel molestie est. Nam molestie libero ac magna varius mollis. Donec sem massa, luctus et metus sed, pellentesque porttitor lectus. Donec volutpat erat id efficitur tempus. Pellentesque mattis molestie erat nec cursus. Donec est arcu, hendrerit sit amet accumsan non, tincidunt dignissim massa. Suspendisse eget varius diam, faucibus porta odio. Vivamus auctor lectus orci, eget luctus dolor aliquet semper. Nam pulvinar tempus arcu, a semper lorem tincidunt quis. Nam dolor velit, dapibus sed augue ac, condimentum placerat ipsum. Suspendisse dapibus, sapien non ultricies convallis, sapien dolor viverra nibh, non hendrerit leo ipsum quis mi. Cras aliquet nec velit at scelerisque. Sed id commodo nunc, at dignissim nisi.
+
+In eget pretium nulla, vitae laoreet mauris. Mauris ac dui at purus dapibus iaculis et a neque. Pellentesque ut sapien nibh. Duis nulla erat, gravida eget dolor et, euismod blandit enim. Integer maximus facilisis purus, non posuere nulla commodo ut. Integer non facilisis mauris. Phasellus libero sapien, sollicitudin in massa vel, porttitor rhoncus lectus. Fusce interdum felis vel metus consequat, sed tempor urna imperdiet. Pellentesque sit amet ultricies nibh. In viverra tellus in sodales pellentesque. Nullam nisl leo, hendrerit vitae ipsum eget, ullamcorper dictum orci. Maecenas ac metus id lacus pellentesque vestibulum ac eget lacus. Nam congue eros sed dapibus auctor. Cras a purus ut urna viverra consequat. Fusce quis arcu condimentum, vestibulum eros eu, fermentum eros.
+
+In ut mauris at augue consectetur hendrerit at eget lorem. Fusce a lacus eget mi commodo molestie eu eu ante. Pellentesque congue feugiat varius. Suspendisse lacinia, mauris ac rutrum molestie, nulla ex aliquet urna, at vestibulum nunc turpis id justo. Suspendisse est leo, euismod consequat mollis id, varius eget velit. Suspendisse quis euismod orci. Vestibulum quis blandit risus. Donec eget sagittis mauris. Curabitur eu ligula nec ante suscipit congue. Fusce efficitur scelerisque varius. Integer pulvinar eros a volutpat bibendum. Vivamus vitae est id velit pharetra venenatis. In quis interdum mi.
+
+Pellentesque faucibus ultricies diam, id laoreet sem dignissim et. Ut elementum urna eget leo vestibulum, quis varius enim porttitor. Fusce vitae laoreet velit. Quisque at tempor quam, non mollis augue. Pellentesque pharetra consectetur erat id porttitor. Fusce feugiat erat purus. Morbi nec ultrices leo. Integer purus nunc, posuere ut nisi at, tempor ultricies tellus. Nullam eu accumsan magna. Cras vestibulum ipsum vitae dui commodo laoreet. Suspendisse non elementum metus, et ultricies dui.
+
+Mauris id lorem id mauris dictum iaculis. Phasellus molestie purus sit amet diam sollicitudin scelerisque. Suspendisse potenti. Vestibulum pharetra eu odio id ornare. Etiam fringilla, massa a finibus auctor, est leo posuere ante, vitae malesuada enim nisi condimentum nunc. Quisque blandit finibus molestie. Donec sed iaculis sapien. Vivamus suscipit nibh ut elit venenatis, lacinia eleifend nisi pulvinar. Nunc faucibus magna nec felis viverra dignissim. Sed maximus sem erat, vel accumsan erat dignissim ac. Pellentesque rutrum elit lectus, vel efficitur nisi tristique at. Vivamus non volutpat turpis, non fringilla nisl. Duis tincidunt faucibus massa a interdum. Ut ac nulla id nulla ornare dapibus. Interdum et malesuada fames ac ante ipsum primis in faucibus.
+
+In pretium neque vel mauris imperdiet, nec porta nunc tristique. Nullam id volutpat tortor. Nunc augue orci, vehicula in consectetur in, euismod sit amet lectus. Duis vehicula sagittis tortor, ut cursus ipsum finibus in. Sed vel dui eros. Fusce vehicula justo et lobortis suscipit. Nulla varius, arcu sit amet pulvinar consectetur, urna dolor suscipit nisi, feugiat interdum augue sem a justo. Proin vitae felis mattis, tempus justo ornare, pharetra sem. Nam dictum lorem et nisl lobortis mattis. Curabitur nibh nulla, pulvinar nec justo a, consectetur consectetur erat. Phasellus semper nisl est, et molestie nisl consectetur a. Maecenas ut placerat elit. Ut mattis tincidunt ex, semper hendrerit neque ultrices nec. Curabitur leo massa, dictum at libero eget, molestie luctus risus. In aliquet a erat sed accumsan. Vestibulum venenatis ante ligula, sit amet vestibulum est mollis vitae.
+
+Donec interdum augue eget feugiat venenatis. Mauris interdum tristique urna eu cursus. Donec sit amet diam volutpat massa posuere lacinia a quis lorem. Vivamus et condimentum eros. Sed eleifend dolor eros, laoreet lobortis risus elementum ac. Donec eget semper mauris. Etiam gravida arcu tortor, id egestas sapien vestibulum et. Curabitur tristique urna at nibh bibendum, et blandit turpis feugiat. Cras dignissim lectus rhoncus elit consectetur vestibulum. Ut finibus nisl in sapien mollis, eu faucibus nisi blandit. Ut velit felis, luctus condimentum quam vel, accumsan blandit sem.
+
+Nullam eros risus, ultrices vitae ipsum eget, cursus mollis turpis. Aenean sagittis nibh sit amet viverra lobortis. Quisque ut neque enim. In velit tortor, vulputate sit amet tristique eu, tempor eu tortor. Integer molestie ante vitae odio ultricies imperdiet. Nulla ut finibus lectus. Etiam ac metus malesuada, gravida neque sit amet, consequat nulla. Pellentesque eu arcu ut odio egestas vehicula sed a augue. Nulla egestas condimentum condimentum. Mauris ultrices viverra odio at egestas. Proin sem purus, sodales a tincidunt id, bibendum ut lacus. Aliquam eget laoreet lectus, eu varius sem. Mauris mattis vehicula sem, id egestas dui consectetur nec. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
+
+Etiam quis dolor ac ante luctus volutpat. Donec aliquam gravida auctor. Nulla suscipit arcu ut molestie sodales. Nunc convallis enim accumsan, porttitor augue sit amet, gravida orci. Donec mollis urna ligula, a sodales quam vulputate non. Pellentesque in suscipit orci. Fusce scelerisque metus sit amet nisl hendrerit, et viverra purus luctus. Phasellus ac imperdiet lacus, sit amet convallis nisl. Mauris vel massa pellentesque, mattis augue sit amet, posuere lectus. Proin ac sagittis ipsum. Nam ligula purus, consequat sed odio at, suscipit pulvinar augue. Donec hendrerit tempus felis accumsan lobortis.
+
+Donec id neque cursus, accumsan dui sed, dapibus lectus. In tempus felis odio. Vivamus dignissim commodo ante, nec egestas urna sagittis ut. Integer maximus malesuada pharetra. Praesent dui mauris, malesuada ac tempus eget, cursus lobortis arcu. Sed nec consectetur purus. Maecenas eget pellentesque nisl.
+
+Vestibulum a neque turpis. Aenean porta fermentum maximus. In at leo dignissim, laoreet metus at, condimentum augue. Pellentesque vitae enim efficitur, tristique ex vitae, commodo mi. Donec vehicula euismod sapien, at pulvinar tellus molestie a. Etiam ut leo consectetur, condimentum sapien scelerisque, tempor metus. Maecenas nisi risus, varius eget viverra rhoncus, mattis vel massa.
+
+Proin tempor lacinia augue et varius. Mauris a velit metus. Quisque a lorem est. Sed ex sapien, rutrum sit amet vestibulum non, efficitur ut ante. Sed quis arcu mollis, tempor est non, ultricies metus. Sed at rutrum risus. Proin efficitur, tellus vitae consequat condimentum, metus purus facilisis libero, sit amet venenatis sapien elit eu libero. Praesent eget elit nec nisl egestas maximus ac ut odio. Pellentesque a ligula arcu. Nunc nibh arcu, efficitur ut feugiat sed, aliquam sit amet ipsum. Phasellus pharetra ut est sit amet dignissim. In consequat ultricies pretium. Proin euismod, ex id condimentum tempus, nulla tortor faucibus dolor, et efficitur velit arcu sit amet sem. Fusce finibus congue volutpat. Morbi ornare lectus ornare ex sodales, ut rhoncus neque consectetur. Aliquam lobortis scelerisque arcu sit amet elementum.
+
+Nullam quis diam in mi varius fringilla. Phasellus nibh quam, vehicula et pellentesque a, pellentesque eu tellus. Nam ac auctor erat. Quisque laoreet, libero non ullamcorper vestibulum, risus nisl consectetur diam, quis porta erat sapien vitae dui. Aenean efficitur, libero a tincidunt commodo, sapien purus blandit sem, vel auctor ante augue ac metus. Pellentesque eu mi urna. Sed condimentum, lacus sit amet varius feugiat, neque ex rhoncus enim, in fermentum turpis metus a libero. Praesent risus purus, malesuada nec accumsan in, tempor ac tellus. Etiam posuere lacinia feugiat. Praesent sagittis, nulla sed scelerisque lacinia, ipsum mi laoreet elit, ut lacinia quam dui semper nibh.
+
+In eget purus placerat, euismod justo at, feugiat eros. Aliquam eget tristique erat. Praesent vehicula neque vitae ex pretium, at sagittis erat tincidunt. Duis nec facilisis lorem. Sed pharetra ut tellus a feugiat. Suspendisse luctus placerat laoreet. Pellentesque eu tempus quam. Quisque eu magna a velit ultricies ullamcorper ac in erat. Mauris ex purus, pellentesque eget congue nec, bibendum at arcu. Nam eros ipsum, pellentesque a massa eget, porta efficitur mi.
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse tempor ex a posuere ornare. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque faucibus convallis lectus, et ullamcorper nisl pharetra ac. Vivamus eu tortor at dui tempor vulputate. Suspendisse at magna quis ipsum fringilla sodales in vel tellus. Phasellus tellus dolor, sollicitudin ac odio vitae, pellentesque ullamcorper justo. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque volutpat convallis sem. Ut varius, sapien vitae tincidunt malesuada, orci ante tempus nisl, eget iaculis turpis mauris ac orci.
+
+Aliquam pretium hendrerit ligula, ut euismod est imperdiet id. Fusce leo massa, blandit sit amet sagittis ut, elementum quis odio. Sed sit amet urna a sem elementum tincidunt id eu libero. In convallis nisi et tellus mollis mollis. Nullam id pretium lorem. Phasellus vel sodales arcu. Integer nec erat vitae justo accumsan porttitor accumsan a eros. Nunc mattis sagittis velit, ut tempor neque maximus in. Nulla vulputate purus non metus venenatis ultrices a non tellus. Praesent sodales nisi quis efficitur imperdiet. Donec a quam id risus interdum sollicitudin eget et orci. Donec hendrerit vel sem in condimentum.
+
+Praesent vel ultricies lorem. Vestibulum tempus malesuada elit a gravida. Proin cursus nisl urna, et finibus nisl porttitor sed. Donec tristique leo vel sem pharetra maximus. Praesent eleifend felis eu imperdiet semper. Etiam pretium mauris diam. Nam quam nisl, laoreet eget scelerisque accumsan, luctus quis dui. Integer at ornare odio.
+
+Sed id tellus velit. Pellentesque vitae condimentum justo. Vestibulum fringilla mauris nec laoreet tincidunt. Maecenas arcu ligula, euismod ut convallis ac, tincidunt id nibh. Aliquam eu sollicitudin velit. Nulla nec sapien leo. Nullam venenatis vel justo vestibulum accumsan. Pellentesque sapien magna, dignissim eget lorem in, condimentum efficitur nisi. Sed quis turpis pellentesque metus aliquam sollicitudin eget vel orci. Sed ac orci nec libero posuere aliquam at quis velit. Quisque at pellentesque quam. Quisque venenatis felis est, eu scelerisque dui elementum non.
+
+Duis venenatis eleifend commodo. In hac habitasse platea dictumst. Proin elementum, mi sed suscipit blandit, purus quam lacinia lectus, ut venenatis felis elit at nulla. Aenean dignissim lacus ac lectus lacinia convallis. Donec fringilla leo purus. Suspendisse potenti. Curabitur aliquam sodales dui ut imperdiet.
+
+Nam in ex id augue facilisis ornare non nec lorem. Nam dolor ex, facilisis nec dignissim vel, mollis eget ex. Aliquam consectetur turpis eget quam pellentesque, at pretium dolor volutpat. Cras sed velit quis dolor scelerisque rhoncus sit amet vel lectus. Sed lacinia arcu convallis mattis aliquet. Proin faucibus vulputate varius. Nullam vel dictum libero. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla facilisi. Aliquam mauris ex, faucibus nec tempor quis, placerat maximus augue. Suspendisse commodo pretium sem quis laoreet. Vivamus porta, urna eu tincidunt semper, purus sem tempor sem, ut condimentum diam nibh vel mi. Donec sit amet tellus sit amet mauris vestibulum feugiat. Aliquam in orci quis est feugiat porttitor. Aliquam nec metus ac urna viverra tincidunt.
+
+Nunc ac orci cursus, faucibus justo nec, lobortis tortor. Nulla tincidunt scelerisque risus, at blandit arcu elementum sed. Maecenas non justo dapibus, tincidunt nibh in, porta neque. Sed non mi id leo vestibulum iaculis. Nam ultricies odio eget arcu vehicula tempus. Suspendisse maximus consectetur arcu, id dapibus lacus mollis et. Fusce nec vulputate nulla. Nam dictum eget sapien id interdum. Duis mi sem, gravida nec dolor vel, elementum facilisis tellus. Integer vel accumsan diam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed in commodo ex. Praesent commodo porttitor ipsum. Vestibulum volutpat diam at tellus feugiat, id sodales magna bibendum. Mauris odio eros, rutrum at scelerisque eget, porta sed turpis. Suspendisse porta dictum cursus.
+
+Mauris accumsan finibus mi sit amet auctor. Aliquam erat volutpat. Vestibulum at euismod sapien, euismod tincidunt lectus. Mauris aliquet sapien at erat vestibulum, a vestibulum dui bibendum. Etiam vel vulputate justo. Nam vitae ultrices nisl, eu dapibus ex. Quisque volutpat nibh vitae semper tristique. Mauris in nibh lectus. Maecenas elit leo, ultricies quis bibendum sed, rhoncus et neque. Sed elementum nec dui id lobortis. Vestibulum sollicitudin arcu nulla, sit amet lobortis urna ultrices a. Cras fermentum dolor id faucibus pretium. Pellentesque congue quam metus, quis consequat leo sollicitudin vitae.
+
+Integer congue, neque a scelerisque varius, purus nibh fringilla nunc, sit amet pretium felis sapien vel orci. Donec mattis ac orci in viverra. Suspendisse a justo sollicitudin lacus efficitur ullamcorper. Mauris faucibus nisl quis dolor volutpat aliquam. Aenean venenatis, odio et rhoncus lobortis, risus ligula finibus massa, non dignissim augue nisl vel arcu. Nullam fringilla odio at libero scelerisque, vitae placerat nisi fringilla. Etiam quis urna turpis. Quisque quis leo ante. Duis nec elit massa. Sed porttitor, nulla id efficitur blandit, purus ligula vulputate lectus, quis molestie metus orci ac tellus. Donec sapien massa, suscipit eu tristique ac, posuere sed lorem. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam erat volutpat. Duis bibendum erat eget felis tempor, eget imperdiet nibh vestibulum. In hac habitasse platea dictumst. Quisque vehicula pulvinar turpis, ac dictum risus auctor varius.
+
+Praesent ac ex vestibulum, dapibus lacus in, malesuada diam. Sed in turpis in justo venenatis pharetra. Fusce sed lobortis nisl. Phasellus faucibus magna ante, malesuada placerat justo faucibus tempus. Phasellus hendrerit fermentum felis. Proin malesuada, urna vel tincidunt pharetra, eros ante bibendum sem, nec viverra nunc arcu at mauris. Sed et lorem pharetra, feugiat tortor vitae, rutrum lacus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mauris leo, condimentum at risus eget, aliquam consequat mauris. Mauris id auctor purus.
+
+Aenean augue mauris, cursus quis elit eget, molestie pharetra sem. Mauris congue felis ut nibh facilisis, ut pharetra arcu pharetra. Curabitur semper mattis orci eu dictum. Phasellus hendrerit scelerisque dignissim. Sed aliquet nunc scelerisque, facilisis nulla at, posuere lorem. Maecenas blandit, lectus nec varius bibendum, nibh risus posuere turpis, id pretium justo elit vitae ligula. Sed risus ante, congue quis libero consequat, laoreet convallis diam.
+
+Aenean sagittis ex vel semper ullamcorper. Donec mattis, ipsum tincidunt aliquet vehicula, elit tellus porta mi, a convallis quam orci ac lectus. Proin aliquam nulla in erat mattis placerat. Aliquam ligula sem, egestas ac turpis vitae, facilisis iaculis mauris. Donec ac egestas urna, ac iaculis orci. Integer urna magna, eleifend sed nunc vitae, commodo lobortis massa. Aenean ultrices pulvinar dui, non blandit lorem pretium quis. Praesent in molestie purus, vestibulum interdum quam. Pellentesque auctor erat non mauris fringilla eleifend.
+
+Etiam blandit vel leo nec pulvinar. Phasellus elementum facilisis mi et egestas. Praesent finibus, elit vel venenatis sodales, turpis nibh tincidunt turpis, eu venenatis urna tortor at massa. Proin iaculis ipsum ut elit maximus tincidunt. Suspendisse justo turpis, sollicitudin ut eros quis, dictum placerat nibh. Sed mattis ornare pulvinar. Cras lacus purus, interdum vitae commodo sollicitudin, suscipit eu quam. Mauris luctus laoreet metus at posuere. Etiam faucibus diam quis purus vulputate, nec blandit lorem bibendum.
+
+Aliquam nisl neque, vulputate eu arcu id, elementum dictum sapien. Aliquam aliquam, mauris eget vestibulum accumsan, metus tellus vulputate urna, nec volutpat felis turpis ac nulla. Morbi pretium magna bibendum eros ultricies lobortis. Vestibulum euismod vitae nibh in posuere. Vivamus in iaculis mi. Pellentesque iaculis ex nec tellus pulvinar interdum. Integer a tincidunt risus, eu faucibus mi. Vivamus posuere sapien eu orci scelerisque rutrum at eu leo. Nullam consectetur est eu justo congue commodo. Vestibulum ac finibus velit. Donec faucibus nulla at risus rhoncus, a vulputate magna pulvinar. Aliquam condimentum rhoncus lacus sed hendrerit.
+
+Morbi non hendrerit nisl, eu fringilla erat. Praesent ac dolor sit amet libero tempus porttitor. Cras vel sem elementum, venenatis ipsum vel, molestie tellus. Aliquam erat volutpat. Maecenas malesuada urna nec diam sodales pharetra. Aliquam non lobortis metus. Donec eleifend mollis eros in condimentum. Suspendisse sagittis consequat justo, vitae tincidunt orci luctus vel. Ut lobortis tincidunt libero. Sed dignissim lorem sit amet nibh aliquam, pharetra pulvinar justo consequat. Suspendisse sed dictum massa. Ut fermentum, dolor a fringilla bibendum, lorem ligula scelerisque turpis, in porta justo neque non lectus. Suspendisse pellentesque risus sit amet ligula pretium condimentum. Fusce odio tortor, pulvinar in dapibus nec, pharetra eget nisi. Suspendisse luctus eros eget mauris pretium blandit.
+
+Nam vel fermentum nulla. Sed tincidunt tellus id mattis dapibus. Quisque ac congue libero, nec elementum nulla. Phasellus quam eros, congue eu lacinia a, interdum et eros. Aenean suscipit risus interdum mauris porttitor, vehicula auctor tellus molestie. Donec efficitur nisi eget ex interdum sollicitudin. Nunc ultricies maximus quam, at pulvinar eros volutpat quis. Nam venenatis mauris enim, sed malesuada tortor eleifend sit amet. Cras imperdiet convallis viverra. Proin purus nulla, bibendum in aliquam quis, sollicitudin a risus. Proin vehicula tincidunt tortor quis lacinia. Praesent tristique odio sed orci consequat, ut pulvinar mauris semper. Mauris felis mi, ultricies a dolor id, viverra laoreet orci. Nam ex mi, semper nec imperdiet sed, posuere et eros.
+
+Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec scelerisque ipsum sed libero tempor, in vulputate ante sodales. Sed vehicula nulla non ante blandit, quis porttitor diam auctor. Nulla sodales risus ut dui vulputate, nec elementum sem volutpat. Quisque id blandit quam. Proin interdum quis lacus ac suscipit. Etiam a scelerisque sapien. Praesent cursus, mi eget dapibus hendrerit, nibh eros elementum lacus, sit amet congue dui nunc at dui. Phasellus tristique nulla ut tincidunt faucibus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse efficitur congue purus, a viverra sapien tristique vel.
+
+Vestibulum elementum pellentesque turpis. Phasellus id quam sit amet ex sodales malesuada. Morbi iaculis quis nibh vitae finibus. Nullam vitae luctus nisl, ac varius leo. Fusce sed quam eu enim volutpat blandit. Etiam ornare aliquam mi, eget porttitor magna euismod non. Curabitur porta vel metus ut mollis.
+
+Aenean sit amet sagittis lacus. Quisque in dui commodo, rutrum massa tincidunt, hendrerit mauris. Maecenas sit amet nisl facilisis, interdum eros rhoncus, malesuada nisl. Aliquam condimentum erat dui, eget dignissim magna volutpat vitae. Mauris porttitor, risus ut auctor porttitor, sem nisl interdum nisi, ac tempus est enim in tortor. Sed rhoncus magna ac feugiat pharetra. Nulla scelerisque quis neque ut porttitor. Ut lacinia in ipsum sit amet lobortis. Aliquam eu justo vel leo facilisis tristique. Pellentesque cursus, lacus a rhoncus auctor, erat velit vehicula diam, et fermentum erat mauris fermentum turpis. Donec quam sapien, laoreet sodales sagittis ac, sodales vitae lectus. Donec vitae lorem rutrum, lobortis libero maximus, condimentum sapien. Pellentesque mi lorem, rhoncus vel lacinia a, venenatis et velit.
+
+Curabitur malesuada ante vel maximus luctus. Etiam dui lectus, condimentum eget lobortis eget, eleifend pellentesque ligula. Nam eu pharetra urna, sit amet facilisis turpis. Mauris tincidunt vestibulum turpis nec suscipit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Pellentesque egestas commodo finibus. Donec pellentesque nec libero et imperdiet. Cras cursus purus ut libero pretium vulputate. Mauris non arcu purus. Donec sollicitudin dignissim massa ac tincidunt. Donec non consectetur turpis, et venenatis dui.
+
+Nam mattis urna dolor, a varius sem tempor a. Vivamus porttitor dignissim metus vel ultrices. Integer ac justo vel nisl consequat efficitur. Maecenas sit amet hendrerit elit. Suspendisse lobortis semper mauris id convallis. Duis nibh dui, lacinia a turpis sed, interdum aliquam ex. Praesent tempor rhoncus nibh vel dictum. Quisque feugiat mi sit amet nunc fermentum pellentesque. Ut porta lacinia erat eu pulvinar. Nulla vestibulum fermentum felis, eu ultricies lectus. Ut eget lobortis sapien. Aenean consectetur in nisl interdum mattis. Sed a ipsum pharetra, congue augue a, accumsan ex. Quisque luctus sapien non tincidunt vulputate.
+
+Aenean auctor consectetur urna et rhoncus. Vivamus mattis tortor at massa porta, in auctor quam porttitor. Nulla facilisi. Sed auctor ipsum tortor, quis hendrerit risus convallis eget. Vivamus a mollis nulla, at fringilla risus. In a cursus dui, nec vehicula elit. Donec in sodales ante, quis gravida est. Sed interdum mi non ornare lacinia. Cras placerat cursus dolor nec euismod. Nulla vel velit quis nibh aliquam eleifend. Cras mattis vitae erat nec gravida. Vestibulum luctus sagittis nibh, a pretium neque dictum eget. Quisque vitae consequat dui. Donec libero eros, pharetra sit amet sapien id, euismod gravida mi.
+
+Duis tristique nisi id urna feugiat, sed aliquet nulla imperdiet. Ut quis felis finibus, lobortis nunc eu, sodales risus. Fusce at euismod risus. Nunc pulvinar libero volutpat, mattis eros facilisis, mollis nibh. Maecenas augue nunc, mollis sit amet volutpat et, interdum eu augue. Etiam porttitor tortor sem, vitae hendrerit nulla lobortis ut. In non sollicitudin eros. Cras bibendum lorem id odio sollicitudin euismod. Aliquam ullamcorper purus at turpis accumsan blandit. Donec at interdum arcu. Nam fermentum est lectus, vel tincidunt purus sollicitudin a. Aliquam vel orci massa.
+
+Fusce fringilla et justo et interdum. Fusce molestie, tellus vitae elementum lobortis, enim augue condimentum nulla, a semper enim quam in dui. Vestibulum a pharetra felis. Proin eu sollicitudin leo. In vestibulum rhoncus augue, non ultrices turpis. Donec maximus neque semper tellus condimentum, in aliquam dui posuere. Sed ultrices nisl purus, quis sollicitudin eros laoreet quis. Praesent nunc nisl, varius at suscipit sed, tristique at neque.
+
+Quisque aliquam tincidunt augue vitae rhoncus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Proin eu luctus erat. Nullam auctor, purus a eleifend efficitur, metus ligula accumsan quam, quis bibendum enim lacus quis neque. Maecenas lacinia ipsum molestie felis accumsan, in dignissim purus aliquet. Nunc turpis massa, ultricies in lacinia ut, luctus ut felis. Morbi magna nisi, sodales in arcu sit amet, efficitur mattis velit. Ut scelerisque enim nibh, vel pretium urna varius vel. Cras vitae accumsan nunc, ut iaculis tortor. Nam vitae laoreet orci, sit amet rutrum mi. Nunc blandit purus eu hendrerit tempor. Vestibulum tincidunt pharetra purus ut sodales. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla sed laoreet urna, sit amet commodo erat. Fusce euismod justo erat, et placerat odio accumsan finibus. Proin pellentesque ligula ut nibh condimentum, sed ornare justo faucibus. Fusce consectetur sapien nec dui varius, vel pharetra felis molestie. Duis accumsan odio metus, ut varius orci finibus nec. Sed non ipsum vitae est aliquet mollis. Pellentesque facilisis feugiat suscipit.
+
+Mauris ut enim sit amet metus bibendum finibus. Suspendisse iaculis, tellus maximus placerat elementum, libero turpis fermentum dolor, ut lacinia sapien ipsum a nulla. Etiam sollicitudin dictum dolor, ac congue sem pulvinar nec. Ut egestas urna non neque volutpat egestas. Integer porta vel orci volutpat tincidunt. In egestas fringilla ipsum ac pharetra. Fusce justo dui, dignissim sed leo at, tincidunt finibus magna. Pellentesque vel nunc risus. Praesent lacinia blandit convallis. Cras eget magna metus. Maecenas fringilla dolor eu quam dictum consequat. Donec pellentesque eleifend velit, a commodo dui faucibus eu. Phasellus pretium nulla ipsum, et interdum magna interdum et. Mauris a sem ullamcorper, consectetur quam accumsan, porttitor eros.
+
+Praesent facilisis, ipsum ac tincidunt auctor, tellus ipsum convallis magna, vel maximus sem lorem et tortor. Sed elit diam, faucibus sed turpis eget, commodo facilisis nunc. Vestibulum vitae arcu tristique, varius libero molestie, sollicitudin mi. In tincidunt nisl in eros imperdiet faucibus. Cras ex ipsum, vehicula eget neque eget, viverra pellentesque erat. Suspendisse vitae tristique dolor. Nulla ornare imperdiet metus id mollis. Fusce ligula ex, aliquam sed purus quis, venenatis volutpat lectus. Sed iaculis ante sit amet massa consequat interdum. Ut feugiat risus sit amet commodo euismod. Sed tristique quam sit amet lacinia cursus. Donec faucibus, erat a dapibus rhoncus, orci est interdum ex, sit amet semper massa quam et lectus.
+
+Suspendisse mollis turpis aliquam felis efficitur, eu ultrices tellus suscipit. Aenean at congue erat, vel ultricies eros. Quisque hendrerit arcu ut est aliquet, et vehicula lectus ullamcorper. Pellentesque posuere neque nec auctor scelerisque. Phasellus rhoncus odio ac nisl ornare condimentum. Nam nec arcu porttitor tellus faucibus malesuada id a est. Vivamus id facilisis ante. Proin quis risus ipsum. In sed nibh at nisl tempus interdum. Ut sit amet malesuada nisl, id pharetra metus. Nulla lorem velit, euismod nec dictum at, porttitor ac erat. Aliquam est leo, elementum nec ultricies nec, interdum sed libero. Quisque mattis placerat scelerisque. Praesent vulputate sit amet felis non tristique.
+
+Phasellus odio ex, ultricies et tincidunt sit amet, auctor id felis. Fusce facilisis nibh risus, eget placerat nunc pellentesque vel. Morbi cursus metus eu arcu viverra rutrum. Nulla eget dolor blandit, pulvinar sem aliquet, hendrerit purus. Fusce sodales venenatis posuere. Cras egestas placerat odio non scelerisque. Praesent tincidunt maximus semper. Vivamus eget libero massa. Cras auctor orci sed nibh sagittis ultrices. Curabitur leo lacus, suscipit ac pharetra vel, euismod eu turpis. Aenean quis justo efficitur, mattis nisl sed, mollis lacus. Integer feugiat non metus vitae faucibus. Morbi sem massa, pretium id risus a, congue volutpat mi. Vivamus lacinia enim lorem, id malesuada ante vehicula non. Praesent ac urna quis justo malesuada euismod.
+
+Integer sed ligula id purus dictum tempus eu non ex. Phasellus tincidunt lectus in imperdiet porttitor. Integer ligula dolor, porttitor et congue vitae, elementum eget sem. Proin a libero in enim efficitur mollis. Proin molestie metus dolor, in fermentum massa condimentum at. Cras eget auctor odio, a luctus sapien. Nulla in hendrerit leo, sed venenatis augue. Proin mollis vestibulum magna. Nulla dapibus lacus nec condimentum maximus. Phasellus id efficitur enim. Vivamus molestie mauris at condimentum elementum. Maecenas ultrices mauris quis tincidunt viverra. Ut eget ultricies ligula. Nulla id fermentum nisl, in ultrices velit.
+
+Nunc blandit tellus sed est auctor condimentum. Integer fringilla aliquam libero, id sagittis ipsum lacinia sit amet. Donec sit amet nunc felis. Vestibulum at commodo arcu, a malesuada est. Aenean ultrices, mauris in pellentesque posuere, mi orci fermentum justo, vitae rutrum neque erat a nisi. In sed urna quis sem egestas faucibus ut quis ipsum. Quisque porta lectus sit amet urna ultricies iaculis.
+
+Praesent ultrices odio nisl, eu consequat dolor sollicitudin nec. Suspendisse dignissim lobortis nulla nec molestie. Duis in diam sed est dignissim faucibus vitae in metus. Phasellus lacinia urna eros, vitae vulputate sem fermentum eget. Suspendisse et efficitur dolor. Mauris faucibus sodales felis eu luctus. Cras non mattis lacus. Proin in lobortis sapien. Nulla at augue sed est congue sollicitudin.
+
+Nunc nisi lorem, dapibus id tincidunt quis, sollicitudin sit amet justo. In mollis orci pretium aliquam fermentum. Fusce sodales mi eget tellus posuere ullamcorper. Sed varius sagittis elit, in feugiat odio maximus sed. Cras eleifend massa sit amet mi suscipit, vel laoreet leo pretium. Quisque neque erat, mollis eget elementum non, blandit in lectus. Sed dignissim felis ac felis convallis elementum molestie id lectus. Nullam fermentum lorem mi, in placerat quam mollis vitae. Pellentesque ultrices, nibh at sagittis molestie, augue mauris bibendum dui, ut ultricies lorem magna eu massa. Quisque quis purus eu nisi rhoncus tempor. Donec eget fringilla massa. Vivamus sed varius elit. Aenean egestas tellus eget magna dapibus hendrerit. Nunc vel leo eu purus tempus mollis.
+
+Praesent sagittis eget lectus non vestibulum. Fusce id elit nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec id malesuada justo, non ornare felis. Nulla ultricies lorem ex, et accumsan ex volutpat sodales. Pellentesque venenatis neque in hendrerit blandit. Donec dapibus est fermentum lacus fringilla, ut volutpat tellus consectetur. Maecenas id semper tortor. In pellentesque aliquet elit, non vulputate augue mollis fermentum. Nullam posuere eget elit a placerat. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+Phasellus vestibulum tristique quam a faucibus. Proin sit amet sem et leo posuere efficitur vitae et ante. Nullam congue nisl augue, in ultricies orci tempor quis. Aliquam erat volutpat. In luctus, sapien at venenatis fermentum, lorem urna ultrices elit, ac volutpat metus purus eu turpis. Phasellus semper cursus mi, vitae tempor est accumsan at. Integer accumsan nec augue vitae viverra. Sed tempus cursus enim non dapibus. In commodo neque in ultricies semper. Proin auctor lacinia eros, ut tempor lectus pulvinar quis. Ut fermentum vulputate pellentesque. Duis tempor ante quis metus consectetur maximus. Curabitur a tincidunt enim.
+
+Vestibulum dictum, urna a fringilla imperdiet, tortor arcu mattis odio, et efficitur dui neque ac mauris. Vestibulum auctor risus lacus. Integer elementum erat nisl, id vehicula enim mattis in. Vestibulum consequat neque ante, in sodales magna pulvinar in. Vivamus interdum eros non magna aliquam tristique. Ut aliquam congue ante in gravida. Sed eu turpis sollicitudin, suscipit ligula id, commodo tellus. Aliquam eu sapien vitae augue gravida egestas nec sit amet turpis. Curabitur vulputate vulputate dui, et facilisis lectus tincidunt nec. Integer tristique vitae quam condimentum maximus. Ut ultricies convallis nisl eu elementum.
+
+Curabitur non nisi lectus. Aliquam finibus lorem id dui molestie, sed ullamcorper quam lobortis. Maecenas in gravida urna. Pellentesque consequat risus vel nibh tempus facilisis. Etiam auctor lacinia lacus vitae vulputate. Etiam bibendum arcu at ipsum elementum, id sodales nunc convallis. Phasellus elementum mi non sapien blandit suscipit. Integer accumsan et justo nec mattis. Vestibulum quis erat viverra, condimentum enim eget, auctor tortor. Nunc ac mauris sit amet urna pellentesque malesuada. Fusce urna justo, finibus eget blandit eget, volutpat eu nisi. In nisi nunc, sodales sit amet tempor eu, feugiat feugiat tellus. Nulla felis purus, gravida eu iaculis in, interdum id purus. In hac habitasse platea dictumst. Aenean consequat, quam tincidunt sodales lacinia, ex dui faucibus massa, ut porta dolor justo et mi.
+
+Donec a massa porta, vehicula diam et, pulvinar tortor. Duis tincidunt, nibh ut pharetra hendrerit, est orci egestas urna, et sollicitudin massa lacus aliquam ex. Curabitur in quam sed elit scelerisque pretium nec rhoncus nulla. In a ligula.
+ """
+
+ run () -> stringify.textEscape(text)
+
+perf 'Attribute value escaping (long value)', 100000, (run) ->
+ text = """
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque faucibus dui metus, quis mattis nibh sollicitudin ut. Suspendisse efficitur vestibulum purus ut luctus. Maecenas mollis purus sit amet enim sollicitudin dapibus. Aenean eget enim maximus, semper lacus eget, posuere sapien. Maecenas iaculis ipsum in facilisis commodo. Integer tincidunt, mi ut interdum euismod, massa ligula tincidunt sem, in dapibus ipsum risus quis mauris. Nullam maximus mi quis mollis rhoncus. Donec sollicitudin, neque fringilla feugiat vulputate, risus elit luctus nisi, in varius magna enim sed lorem. Phasellus elementum lacus in nisi pharetra, nec semper arcu sodales. Suspendisse ac condimentum magna, vel pretium massa. Duis vehicula neque sapien, id cursus nulla vestibulum at. Sed vehicula consequat eros, in hendrerit risus dictum quis. Nunc nec sodales leo. Suspendisse ut lorem in ipsum bibendum imperdiet sit amet a orci. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
+
+Mauris elementum luctus nisi eget suscipit. Donec vel molestie est. Nam molestie libero ac magna varius mollis. Donec sem massa, luctus et metus sed, pellentesque porttitor lectus. Donec volutpat erat id efficitur tempus. Pellentesque mattis molestie erat nec cursus. Donec est arcu, hendrerit sit amet accumsan non, tincidunt dignissim massa. Suspendisse eget varius diam, faucibus porta odio. Vivamus auctor lectus orci, eget luctus dolor aliquet semper. Nam pulvinar tempus arcu, a semper lorem tincidunt quis. Nam dolor velit, dapibus sed augue ac, condimentum placerat ipsum. Suspendisse dapibus, sapien non ultricies convallis, sapien dolor viverra nibh, non hendrerit leo ipsum quis mi. Cras aliquet nec velit at scelerisque. Sed id commodo nunc, at dignissim nisi.
+
+In eget pretium nulla, vitae laoreet mauris. Mauris ac dui at purus dapibus iaculis et a neque. Pellentesque ut sapien nibh. Duis nulla erat, gravida eget dolor et, euismod blandit enim. Integer maximus facilisis purus, non posuere nulla commodo ut. Integer non facilisis mauris. Phasellus libero sapien, sollicitudin in massa vel, porttitor rhoncus lectus. Fusce interdum felis vel metus consequat, sed tempor urna imperdiet. Pellentesque sit amet ultricies nibh. In viverra tellus in sodales pellentesque. Nullam nisl leo, hendrerit vitae ipsum eget, ullamcorper dictum orci. Maecenas ac metus id lacus pellentesque vestibulum ac eget lacus. Nam congue eros sed dapibus auctor. Cras a purus ut urna viverra consequat. Fusce quis arcu condimentum, vestibulum eros eu, fermentum eros.
+
+In ut mauris at augue consectetur hendrerit at eget lorem. Fusce a lacus eget mi commodo molestie eu eu ante. Pellentesque congue feugiat varius. Suspendisse lacinia, mauris ac rutrum molestie, nulla ex aliquet urna, at vestibulum nunc turpis id justo. Suspendisse est leo, euismod consequat mollis id, varius eget velit. Suspendisse quis euismod orci. Vestibulum quis blandit risus. Donec eget sagittis mauris. Curabitur eu ligula nec ante suscipit congue. Fusce efficitur scelerisque varius. Integer pulvinar eros a volutpat bibendum. Vivamus vitae est id velit pharetra venenatis. In quis interdum mi.
+
+Pellentesque faucibus ultricies diam, id laoreet sem dignissim et. Ut elementum urna eget leo vestibulum, quis varius enim porttitor. Fusce vitae laoreet velit. Quisque at tempor quam, non mollis augue. Pellentesque pharetra consectetur erat id porttitor. Fusce feugiat erat purus. Morbi nec ultrices leo. Integer purus nunc, posuere ut nisi at, tempor ultricies tellus. Nullam eu accumsan magna. Cras vestibulum ipsum vitae dui commodo laoreet. Suspendisse non elementum metus, et ultricies dui.
+
+Mauris id lorem id mauris dictum iaculis. Phasellus molestie purus sit amet diam sollicitudin scelerisque. Suspendisse potenti. Vestibulum pharetra eu odio id ornare. Etiam fringilla, massa a finibus auctor, est leo posuere ante, vitae malesuada enim nisi condimentum nunc. Quisque blandit finibus molestie. Donec sed iaculis sapien. Vivamus suscipit nibh ut elit venenatis, lacinia eleifend nisi pulvinar. Nunc faucibus magna nec felis viverra dignissim. Sed maximus sem erat, vel accumsan erat dignissim ac. Pellentesque rutrum elit lectus, vel efficitur nisi tristique at. Vivamus non volutpat turpis, non fringilla nisl. Duis tincidunt faucibus massa a interdum. Ut ac nulla id nulla ornare dapibus. Interdum et malesuada fames ac ante ipsum primis in faucibus.
+
+In pretium neque vel mauris imperdiet, nec porta nunc tristique. Nullam id volutpat tortor. Nunc augue orci, vehicula in consectetur in, euismod sit amet lectus. Duis vehicula sagittis tortor, ut cursus ipsum finibus in. Sed vel dui eros. Fusce vehicula justo et lobortis suscipit. Nulla varius, arcu sit amet pulvinar consectetur, urna dolor suscipit nisi, feugiat interdum augue sem a justo. Proin vitae felis mattis, tempus justo ornare, pharetra sem. Nam dictum lorem et nisl lobortis mattis. Curabitur nibh nulla, pulvinar nec justo a, consectetur consectetur erat. Phasellus semper nisl est, et molestie nisl consectetur a. Maecenas ut placerat elit. Ut mattis tincidunt ex, semper hendrerit neque ultrices nec. Curabitur leo massa, dictum at libero eget, molestie luctus risus. In aliquet a erat sed accumsan. Vestibulum venenatis ante ligula, sit amet vestibulum est mollis vitae.
+
+Donec interdum augue eget feugiat venenatis. Mauris interdum tristique urna eu cursus. Donec sit amet diam volutpat massa posuere lacinia a quis lorem. Vivamus et condimentum eros. Sed eleifend dolor eros, laoreet lobortis risus elementum ac. Donec eget semper mauris. Etiam gravida arcu tortor, id egestas sapien vestibulum et. Curabitur tristique urna at nibh bibendum, et blandit turpis feugiat. Cras dignissim lectus rhoncus elit consectetur vestibulum. Ut finibus nisl in sapien mollis, eu faucibus nisi blandit. Ut velit felis, luctus condimentum quam vel, accumsan blandit sem.
+
+Nullam eros risus, ultrices vitae ipsum eget, cursus mollis turpis. Aenean sagittis nibh sit amet viverra lobortis. Quisque ut neque enim. In velit tortor, vulputate sit amet tristique eu, tempor eu tortor. Integer molestie ante vitae odio ultricies imperdiet. Nulla ut finibus lectus. Etiam ac metus malesuada, gravida neque sit amet, consequat nulla. Pellentesque eu arcu ut odio egestas vehicula sed a augue. Nulla egestas condimentum condimentum. Mauris ultrices viverra odio at egestas. Proin sem purus, sodales a tincidunt id, bibendum ut lacus. Aliquam eget laoreet lectus, eu varius sem. Mauris mattis vehicula sem, id egestas dui consectetur nec. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
+
+Etiam quis dolor ac ante luctus volutpat. Donec aliquam gravida auctor. Nulla suscipit arcu ut molestie sodales. Nunc convallis enim accumsan, porttitor augue sit amet, gravida orci. Donec mollis urna ligula, a sodales quam vulputate non. Pellentesque in suscipit orci. Fusce scelerisque metus sit amet nisl hendrerit, et viverra purus luctus. Phasellus ac imperdiet lacus, sit amet convallis nisl. Mauris vel massa pellentesque, mattis augue sit amet, posuere lectus. Proin ac sagittis ipsum. Nam ligula purus, consequat sed odio at, suscipit pulvinar augue. Donec hendrerit tempus felis accumsan lobortis.
+
+Donec id neque cursus, accumsan dui sed, dapibus lectus. In tempus felis odio. Vivamus dignissim commodo ante, nec egestas urna sagittis ut. Integer maximus malesuada pharetra. Praesent dui mauris, malesuada ac tempus eget, cursus lobortis arcu. Sed nec consectetur purus. Maecenas eget pellentesque nisl.
+
+Vestibulum a neque turpis. Aenean porta fermentum maximus. In at leo dignissim, laoreet metus at, condimentum augue. Pellentesque vitae enim efficitur, tristique ex vitae, commodo mi. Donec vehicula euismod sapien, at pulvinar tellus molestie a. Etiam ut leo consectetur, condimentum sapien scelerisque, tempor metus. Maecenas nisi risus, varius eget viverra rhoncus, mattis vel massa.
+
+Proin tempor lacinia augue et varius. Mauris a velit metus. Quisque a lorem est. Sed ex sapien, rutrum sit amet vestibulum non, efficitur ut ante. Sed quis arcu mollis, tempor est non, ultricies metus. Sed at rutrum risus. Proin efficitur, tellus vitae consequat condimentum, metus purus facilisis libero, sit amet venenatis sapien elit eu libero. Praesent eget elit nec nisl egestas maximus ac ut odio. Pellentesque a ligula arcu. Nunc nibh arcu, efficitur ut feugiat sed, aliquam sit amet ipsum. Phasellus pharetra ut est sit amet dignissim. In consequat ultricies pretium. Proin euismod, ex id condimentum tempus, nulla tortor faucibus dolor, et efficitur velit arcu sit amet sem. Fusce finibus congue volutpat. Morbi ornare lectus ornare ex sodales, ut rhoncus neque consectetur. Aliquam lobortis scelerisque arcu sit amet elementum.
+
+Nullam quis diam in mi varius fringilla. Phasellus nibh quam, vehicula et pellentesque a, pellentesque eu tellus. Nam ac auctor erat. Quisque laoreet, libero non ullamcorper vestibulum, risus nisl consectetur diam, quis porta erat sapien vitae dui. Aenean efficitur, libero a tincidunt commodo, sapien purus blandit sem, vel auctor ante augue ac metus. Pellentesque eu mi urna. Sed condimentum, lacus sit amet varius feugiat, neque ex rhoncus enim, in fermentum turpis metus a libero. Praesent risus purus, malesuada nec accumsan in, tempor ac tellus. Etiam posuere lacinia feugiat. Praesent sagittis, nulla sed scelerisque lacinia, ipsum mi laoreet elit, ut lacinia quam dui semper nibh.
+
+In eget purus placerat, euismod justo at, feugiat eros. Aliquam eget tristique erat. Praesent vehicula neque vitae ex pretium, at sagittis erat tincidunt. Duis nec facilisis lorem. Sed pharetra ut tellus a feugiat. Suspendisse luctus placerat laoreet. Pellentesque eu tempus quam. Quisque eu magna a velit ultricies ullamcorper ac in erat. Mauris ex purus, pellentesque eget congue nec, bibendum at arcu. Nam eros ipsum, pellentesque a massa eget, porta efficitur mi.
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse tempor ex a posuere ornare. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque faucibus convallis lectus, et ullamcorper nisl pharetra ac. Vivamus eu tortor at dui tempor vulputate. Suspendisse at magna quis ipsum fringilla sodales in vel tellus. Phasellus tellus dolor, sollicitudin ac odio vitae, pellentesque ullamcorper justo. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque volutpat convallis sem. Ut varius, sapien vitae tincidunt malesuada, orci ante tempus nisl, eget iaculis turpis mauris ac orci.
+
+Aliquam pretium hendrerit ligula, ut euismod est imperdiet id. Fusce leo massa, blandit sit amet sagittis ut, elementum quis odio. Sed sit amet urna a sem elementum tincidunt id eu libero. In convallis nisi et tellus mollis mollis. Nullam id pretium lorem. Phasellus vel sodales arcu. Integer nec erat vitae justo accumsan porttitor accumsan a eros. Nunc mattis sagittis velit, ut tempor neque maximus in. Nulla vulputate purus non metus venenatis ultrices a non tellus. Praesent sodales nisi quis efficitur imperdiet. Donec a quam id risus interdum sollicitudin eget et orci. Donec hendrerit vel sem in condimentum.
+
+Praesent vel ultricies lorem. Vestibulum tempus malesuada elit a gravida. Proin cursus nisl urna, et finibus nisl porttitor sed. Donec tristique leo vel sem pharetra maximus. Praesent eleifend felis eu imperdiet semper. Etiam pretium mauris diam. Nam quam nisl, laoreet eget scelerisque accumsan, luctus quis dui. Integer at ornare odio.
+
+Sed id tellus velit. Pellentesque vitae condimentum justo. Vestibulum fringilla mauris nec laoreet tincidunt. Maecenas arcu ligula, euismod ut convallis ac, tincidunt id nibh. Aliquam eu sollicitudin velit. Nulla nec sapien leo. Nullam venenatis vel justo vestibulum accumsan. Pellentesque sapien magna, dignissim eget lorem in, condimentum efficitur nisi. Sed quis turpis pellentesque metus aliquam sollicitudin eget vel orci. Sed ac orci nec libero posuere aliquam at quis velit. Quisque at pellentesque quam. Quisque venenatis felis est, eu scelerisque dui elementum non.
+
+Duis venenatis eleifend commodo. In hac habitasse platea dictumst. Proin elementum, mi sed suscipit blandit, purus quam lacinia lectus, ut venenatis felis elit at nulla. Aenean dignissim lacus ac lectus lacinia convallis. Donec fringilla leo purus. Suspendisse potenti. Curabitur aliquam sodales dui ut imperdiet.
+
+Nam in ex id augue facilisis ornare non nec lorem. Nam dolor ex, facilisis nec dignissim vel, mollis eget ex. Aliquam consectetur turpis eget quam pellentesque, at pretium dolor volutpat. Cras sed velit quis dolor scelerisque rhoncus sit amet vel lectus. Sed lacinia arcu convallis mattis aliquet. Proin faucibus vulputate varius. Nullam vel dictum libero. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla facilisi. Aliquam mauris ex, faucibus nec tempor quis, placerat maximus augue. Suspendisse commodo pretium sem quis laoreet. Vivamus porta, urna eu tincidunt semper, purus sem tempor sem, ut condimentum diam nibh vel mi. Donec sit amet tellus sit amet mauris vestibulum feugiat. Aliquam in orci quis est feugiat porttitor. Aliquam nec metus ac urna viverra tincidunt.
+
+Nunc ac orci cursus, faucibus justo nec, lobortis tortor. Nulla tincidunt scelerisque risus, at blandit arcu elementum sed. Maecenas non justo dapibus, tincidunt nibh in, porta neque. Sed non mi id leo vestibulum iaculis. Nam ultricies odio eget arcu vehicula tempus. Suspendisse maximus consectetur arcu, id dapibus lacus mollis et. Fusce nec vulputate nulla. Nam dictum eget sapien id interdum. Duis mi sem, gravida nec dolor vel, elementum facilisis tellus. Integer vel accumsan diam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed in commodo ex. Praesent commodo porttitor ipsum. Vestibulum volutpat diam at tellus feugiat, id sodales magna bibendum. Mauris odio eros, rutrum at scelerisque eget, porta sed turpis. Suspendisse porta dictum cursus.
+
+Mauris accumsan finibus mi sit amet auctor. Aliquam erat volutpat. Vestibulum at euismod sapien, euismod tincidunt lectus. Mauris aliquet sapien at erat vestibulum, a vestibulum dui bibendum. Etiam vel vulputate justo. Nam vitae ultrices nisl, eu dapibus ex. Quisque volutpat nibh vitae semper tristique. Mauris in nibh lectus. Maecenas elit leo, ultricies quis bibendum sed, rhoncus et neque. Sed elementum nec dui id lobortis. Vestibulum sollicitudin arcu nulla, sit amet lobortis urna ultrices a. Cras fermentum dolor id faucibus pretium. Pellentesque congue quam metus, quis consequat leo sollicitudin vitae.
+
+Integer congue, neque a scelerisque varius, purus nibh fringilla nunc, sit amet pretium felis sapien vel orci. Donec mattis ac orci in viverra. Suspendisse a justo sollicitudin lacus efficitur ullamcorper. Mauris faucibus nisl quis dolor volutpat aliquam. Aenean venenatis, odio et rhoncus lobortis, risus ligula finibus massa, non dignissim augue nisl vel arcu. Nullam fringilla odio at libero scelerisque, vitae placerat nisi fringilla. Etiam quis urna turpis. Quisque quis leo ante. Duis nec elit massa. Sed porttitor, nulla id efficitur blandit, purus ligula vulputate lectus, quis molestie metus orci ac tellus. Donec sapien massa, suscipit eu tristique ac, posuere sed lorem. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam erat volutpat. Duis bibendum erat eget felis tempor, eget imperdiet nibh vestibulum. In hac habitasse platea dictumst. Quisque vehicula pulvinar turpis, ac dictum risus auctor varius.
+
+Praesent ac ex vestibulum, dapibus lacus in, malesuada diam. Sed in turpis in justo venenatis pharetra. Fusce sed lobortis nisl. Phasellus faucibus magna ante, malesuada placerat justo faucibus tempus. Phasellus hendrerit fermentum felis. Proin malesuada, urna vel tincidunt pharetra, eros ante bibendum sem, nec viverra nunc arcu at mauris. Sed et lorem pharetra, feugiat tortor vitae, rutrum lacus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mauris leo, condimentum at risus eget, aliquam consequat mauris. Mauris id auctor purus.
+
+Aenean augue mauris, cursus quis elit eget, molestie pharetra sem. Mauris congue felis ut nibh facilisis, ut pharetra arcu pharetra. Curabitur semper mattis orci eu dictum. Phasellus hendrerit scelerisque dignissim. Sed aliquet nunc scelerisque, facilisis nulla at, posuere lorem. Maecenas blandit, lectus nec varius bibendum, nibh risus posuere turpis, id pretium justo elit vitae ligula. Sed risus ante, congue quis libero consequat, laoreet convallis diam.
+
+Aenean sagittis ex vel semper ullamcorper. Donec mattis, ipsum tincidunt aliquet vehicula, elit tellus porta mi, a convallis quam orci ac lectus. Proin aliquam nulla in erat mattis placerat. Aliquam ligula sem, egestas ac turpis vitae, facilisis iaculis mauris. Donec ac egestas urna, ac iaculis orci. Integer urna magna, eleifend sed nunc vitae, commodo lobortis massa. Aenean ultrices pulvinar dui, non blandit lorem pretium quis. Praesent in molestie purus, vestibulum interdum quam. Pellentesque auctor erat non mauris fringilla eleifend.
+
+Etiam blandit vel leo nec pulvinar. Phasellus elementum facilisis mi et egestas. Praesent finibus, elit vel venenatis sodales, turpis nibh tincidunt turpis, eu venenatis urna tortor at massa. Proin iaculis ipsum ut elit maximus tincidunt. Suspendisse justo turpis, sollicitudin ut eros quis, dictum placerat nibh. Sed mattis ornare pulvinar. Cras lacus purus, interdum vitae commodo sollicitudin, suscipit eu quam. Mauris luctus laoreet metus at posuere. Etiam faucibus diam quis purus vulputate, nec blandit lorem bibendum.
+
+Aliquam nisl neque, vulputate eu arcu id, elementum dictum sapien. Aliquam aliquam, mauris eget vestibulum accumsan, metus tellus vulputate urna, nec volutpat felis turpis ac nulla. Morbi pretium magna bibendum eros ultricies lobortis. Vestibulum euismod vitae nibh in posuere. Vivamus in iaculis mi. Pellentesque iaculis ex nec tellus pulvinar interdum. Integer a tincidunt risus, eu faucibus mi. Vivamus posuere sapien eu orci scelerisque rutrum at eu leo. Nullam consectetur est eu justo congue commodo. Vestibulum ac finibus velit. Donec faucibus nulla at risus rhoncus, a vulputate magna pulvinar. Aliquam condimentum rhoncus lacus sed hendrerit.
+
+Morbi non hendrerit nisl, eu fringilla erat. Praesent ac dolor sit amet libero tempus porttitor. Cras vel sem elementum, venenatis ipsum vel, molestie tellus. Aliquam erat volutpat. Maecenas malesuada urna nec diam sodales pharetra. Aliquam non lobortis metus. Donec eleifend mollis eros in condimentum. Suspendisse sagittis consequat justo, vitae tincidunt orci luctus vel. Ut lobortis tincidunt libero. Sed dignissim lorem sit amet nibh aliquam, pharetra pulvinar justo consequat. Suspendisse sed dictum massa. Ut fermentum, dolor a fringilla bibendum, lorem ligula scelerisque turpis, in porta justo neque non lectus. Suspendisse pellentesque risus sit amet ligula pretium condimentum. Fusce odio tortor, pulvinar in dapibus nec, pharetra eget nisi. Suspendisse luctus eros eget mauris pretium blandit.
+
+Nam vel fermentum nulla. Sed tincidunt tellus id mattis dapibus. Quisque ac congue libero, nec elementum nulla. Phasellus quam eros, congue eu lacinia a, interdum et eros. Aenean suscipit risus interdum mauris porttitor, vehicula auctor tellus molestie. Donec efficitur nisi eget ex interdum sollicitudin. Nunc ultricies maximus quam, at pulvinar eros volutpat quis. Nam venenatis mauris enim, sed malesuada tortor eleifend sit amet. Cras imperdiet convallis viverra. Proin purus nulla, bibendum in aliquam quis, sollicitudin a risus. Proin vehicula tincidunt tortor quis lacinia. Praesent tristique odio sed orci consequat, ut pulvinar mauris semper. Mauris felis mi, ultricies a dolor id, viverra laoreet orci. Nam ex mi, semper nec imperdiet sed, posuere et eros.
+
+Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec scelerisque ipsum sed libero tempor, in vulputate ante sodales. Sed vehicula nulla non ante blandit, quis porttitor diam auctor. Nulla sodales risus ut dui vulputate, nec elementum sem volutpat. Quisque id blandit quam. Proin interdum quis lacus ac suscipit. Etiam a scelerisque sapien. Praesent cursus, mi eget dapibus hendrerit, nibh eros elementum lacus, sit amet congue dui nunc at dui. Phasellus tristique nulla ut tincidunt faucibus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse efficitur congue purus, a viverra sapien tristique vel.
+
+Vestibulum elementum pellentesque turpis. Phasellus id quam sit amet ex sodales malesuada. Morbi iaculis quis nibh vitae finibus. Nullam vitae luctus nisl, ac varius leo. Fusce sed quam eu enim volutpat blandit. Etiam ornare aliquam mi, eget porttitor magna euismod non. Curabitur porta vel metus ut mollis.
+
+Aenean sit amet sagittis lacus. Quisque in dui commodo, rutrum massa tincidunt, hendrerit mauris. Maecenas sit amet nisl facilisis, interdum eros rhoncus, malesuada nisl. Aliquam condimentum erat dui, eget dignissim magna volutpat vitae. Mauris porttitor, risus ut auctor porttitor, sem nisl interdum nisi, ac tempus est enim in tortor. Sed rhoncus magna ac feugiat pharetra. Nulla scelerisque quis neque ut porttitor. Ut lacinia in ipsum sit amet lobortis. Aliquam eu justo vel leo facilisis tristique. Pellentesque cursus, lacus a rhoncus auctor, erat velit vehicula diam, et fermentum erat mauris fermentum turpis. Donec quam sapien, laoreet sodales sagittis ac, sodales vitae lectus. Donec vitae lorem rutrum, lobortis libero maximus, condimentum sapien. Pellentesque mi lorem, rhoncus vel lacinia a, venenatis et velit.
+
+Curabitur malesuada ante vel maximus luctus. Etiam dui lectus, condimentum eget lobortis eget, eleifend pellentesque ligula. Nam eu pharetra urna, sit amet facilisis turpis. Mauris tincidunt vestibulum turpis nec suscipit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Pellentesque egestas commodo finibus. Donec pellentesque nec libero et imperdiet. Cras cursus purus ut libero pretium vulputate. Mauris non arcu purus. Donec sollicitudin dignissim massa ac tincidunt. Donec non consectetur turpis, et venenatis dui.
+
+Nam mattis urna dolor, a varius sem tempor a. Vivamus porttitor dignissim metus vel ultrices. Integer ac justo vel nisl consequat efficitur. Maecenas sit amet hendrerit elit. Suspendisse lobortis semper mauris id convallis. Duis nibh dui, lacinia a turpis sed, interdum aliquam ex. Praesent tempor rhoncus nibh vel dictum. Quisque feugiat mi sit amet nunc fermentum pellentesque. Ut porta lacinia erat eu pulvinar. Nulla vestibulum fermentum felis, eu ultricies lectus. Ut eget lobortis sapien. Aenean consectetur in nisl interdum mattis. Sed a ipsum pharetra, congue augue a, accumsan ex. Quisque luctus sapien non tincidunt vulputate.
+
+Aenean auctor consectetur urna et rhoncus. Vivamus mattis tortor at massa porta, in auctor quam porttitor. Nulla facilisi. Sed auctor ipsum tortor, quis hendrerit risus convallis eget. Vivamus a mollis nulla, at fringilla risus. In a cursus dui, nec vehicula elit. Donec in sodales ante, quis gravida est. Sed interdum mi non ornare lacinia. Cras placerat cursus dolor nec euismod. Nulla vel velit quis nibh aliquam eleifend. Cras mattis vitae erat nec gravida. Vestibulum luctus sagittis nibh, a pretium neque dictum eget. Quisque vitae consequat dui. Donec libero eros, pharetra sit amet sapien id, euismod gravida mi.
+
+Duis tristique nisi id urna feugiat, sed aliquet nulla imperdiet. Ut quis felis finibus, lobortis nunc eu, sodales risus. Fusce at euismod risus. Nunc pulvinar libero volutpat, mattis eros facilisis, mollis nibh. Maecenas augue nunc, mollis sit amet volutpat et, interdum eu augue. Etiam porttitor tortor sem, vitae hendrerit nulla lobortis ut. In non sollicitudin eros. Cras bibendum lorem id odio sollicitudin euismod. Aliquam ullamcorper purus at turpis accumsan blandit. Donec at interdum arcu. Nam fermentum est lectus, vel tincidunt purus sollicitudin a. Aliquam vel orci massa.
+
+Fusce fringilla et justo et interdum. Fusce molestie, tellus vitae elementum lobortis, enim augue condimentum nulla, a semper enim quam in dui. Vestibulum a pharetra felis. Proin eu sollicitudin leo. In vestibulum rhoncus augue, non ultrices turpis. Donec maximus neque semper tellus condimentum, in aliquam dui posuere. Sed ultrices nisl purus, quis sollicitudin eros laoreet quis. Praesent nunc nisl, varius at suscipit sed, tristique at neque.
+
+Quisque aliquam tincidunt augue vitae rhoncus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Proin eu luctus erat. Nullam auctor, purus a eleifend efficitur, metus ligula accumsan quam, quis bibendum enim lacus quis neque. Maecenas lacinia ipsum molestie felis accumsan, in dignissim purus aliquet. Nunc turpis massa, ultricies in lacinia ut, luctus ut felis. Morbi magna nisi, sodales in arcu sit amet, efficitur mattis velit. Ut scelerisque enim nibh, vel pretium urna varius vel. Cras vitae accumsan nunc, ut iaculis tortor. Nam vitae laoreet orci, sit amet rutrum mi. Nunc blandit purus eu hendrerit tempor. Vestibulum tincidunt pharetra purus ut sodales. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla sed laoreet urna, sit amet commodo erat. Fusce euismod justo erat, et placerat odio accumsan finibus. Proin pellentesque ligula ut nibh condimentum, sed ornare justo faucibus. Fusce consectetur sapien nec dui varius, vel pharetra felis molestie. Duis accumsan odio metus, ut varius orci finibus nec. Sed non ipsum vitae est aliquet mollis. Pellentesque facilisis feugiat suscipit.
+
+Mauris ut enim sit amet metus bibendum finibus. Suspendisse iaculis, tellus maximus placerat elementum, libero turpis fermentum dolor, ut lacinia sapien ipsum a nulla. Etiam sollicitudin dictum dolor, ac congue sem pulvinar nec. Ut egestas urna non neque volutpat egestas. Integer porta vel orci volutpat tincidunt. In egestas fringilla ipsum ac pharetra. Fusce justo dui, dignissim sed leo at, tincidunt finibus magna. Pellentesque vel nunc risus. Praesent lacinia blandit convallis. Cras eget magna metus. Maecenas fringilla dolor eu quam dictum consequat. Donec pellentesque eleifend velit, a commodo dui faucibus eu. Phasellus pretium nulla ipsum, et interdum magna interdum et. Mauris a sem ullamcorper, consectetur quam accumsan, porttitor eros.
+
+Praesent facilisis, ipsum ac tincidunt auctor, tellus ipsum convallis magna, vel maximus sem lorem et tortor. Sed elit diam, faucibus sed turpis eget, commodo facilisis nunc. Vestibulum vitae arcu tristique, varius libero molestie, sollicitudin mi. In tincidunt nisl in eros imperdiet faucibus. Cras ex ipsum, vehicula eget neque eget, viverra pellentesque erat. Suspendisse vitae tristique dolor. Nulla ornare imperdiet metus id mollis. Fusce ligula ex, aliquam sed purus quis, venenatis volutpat lectus. Sed iaculis ante sit amet massa consequat interdum. Ut feugiat risus sit amet commodo euismod. Sed tristique quam sit amet lacinia cursus. Donec faucibus, erat a dapibus rhoncus, orci est interdum ex, sit amet semper massa quam et lectus.
+
+Suspendisse mollis turpis aliquam felis efficitur, eu ultrices tellus suscipit. Aenean at congue erat, vel ultricies eros. Quisque hendrerit arcu ut est aliquet, et vehicula lectus ullamcorper. Pellentesque posuere neque nec auctor scelerisque. Phasellus rhoncus odio ac nisl ornare condimentum. Nam nec arcu porttitor tellus faucibus malesuada id a est. Vivamus id facilisis ante. Proin quis risus ipsum. In sed nibh at nisl tempus interdum. Ut sit amet malesuada nisl, id pharetra metus. Nulla lorem velit, euismod nec dictum at, porttitor ac erat. Aliquam est leo, elementum nec ultricies nec, interdum sed libero. Quisque mattis placerat scelerisque. Praesent vulputate sit amet felis non tristique.
+
+Phasellus odio ex, ultricies et tincidunt sit amet, auctor id felis. Fusce facilisis nibh risus, eget placerat nunc pellentesque vel. Morbi cursus metus eu arcu viverra rutrum. Nulla eget dolor blandit, pulvinar sem aliquet, hendrerit purus. Fusce sodales venenatis posuere. Cras egestas placerat odio non scelerisque. Praesent tincidunt maximus semper. Vivamus eget libero massa. Cras auctor orci sed nibh sagittis ultrices. Curabitur leo lacus, suscipit ac pharetra vel, euismod eu turpis. Aenean quis justo efficitur, mattis nisl sed, mollis lacus. Integer feugiat non metus vitae faucibus. Morbi sem massa, pretium id risus a, congue volutpat mi. Vivamus lacinia enim lorem, id malesuada ante vehicula non. Praesent ac urna quis justo malesuada euismod.
+
+Integer sed ligula id purus dictum tempus eu non ex. Phasellus tincidunt lectus in imperdiet porttitor. Integer ligula dolor, porttitor et congue vitae, elementum eget sem. Proin a libero in enim efficitur mollis. Proin molestie metus dolor, in fermentum massa condimentum at. Cras eget auctor odio, a luctus sapien. Nulla in hendrerit leo, sed venenatis augue. Proin mollis vestibulum magna. Nulla dapibus lacus nec condimentum maximus. Phasellus id efficitur enim. Vivamus molestie mauris at condimentum elementum. Maecenas ultrices mauris quis tincidunt viverra. Ut eget ultricies ligula. Nulla id fermentum nisl, in ultrices velit.
+
+Nunc blandit tellus sed est auctor condimentum. Integer fringilla aliquam libero, id sagittis ipsum lacinia sit amet. Donec sit amet nunc felis. Vestibulum at commodo arcu, a malesuada est. Aenean ultrices, mauris in pellentesque posuere, mi orci fermentum justo, vitae rutrum neque erat a nisi. In sed urna quis sem egestas faucibus ut quis ipsum. Quisque porta lectus sit amet urna ultricies iaculis.
+
+Praesent ultrices odio nisl, eu consequat dolor sollicitudin nec. Suspendisse dignissim lobortis nulla nec molestie. Duis in diam sed est dignissim faucibus vitae in metus. Phasellus lacinia urna eros, vitae vulputate sem fermentum eget. Suspendisse et efficitur dolor. Mauris faucibus sodales felis eu luctus. Cras non mattis lacus. Proin in lobortis sapien. Nulla at augue sed est congue sollicitudin.
+
+Nunc nisi lorem, dapibus id tincidunt quis, sollicitudin sit amet justo. In mollis orci pretium aliquam fermentum. Fusce sodales mi eget tellus posuere ullamcorper. Sed varius sagittis elit, in feugiat odio maximus sed. Cras eleifend massa sit amet mi suscipit, vel laoreet leo pretium. Quisque neque erat, mollis eget elementum non, blandit in lectus. Sed dignissim felis ac felis convallis elementum molestie id lectus. Nullam fermentum lorem mi, in placerat quam mollis vitae. Pellentesque ultrices, nibh at sagittis molestie, augue mauris bibendum dui, ut ultricies lorem magna eu massa. Quisque quis purus eu nisi rhoncus tempor. Donec eget fringilla massa. Vivamus sed varius elit. Aenean egestas tellus eget magna dapibus hendrerit. Nunc vel leo eu purus tempus mollis.
+
+Praesent sagittis eget lectus non vestibulum. Fusce id elit nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec id malesuada justo, non ornare felis. Nulla ultricies lorem ex, et accumsan ex volutpat sodales. Pellentesque venenatis neque in hendrerit blandit. Donec dapibus est fermentum lacus fringilla, ut volutpat tellus consectetur. Maecenas id semper tortor. In pellentesque aliquet elit, non vulputate augue mollis fermentum. Nullam posuere eget elit a placerat. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+Phasellus vestibulum tristique quam a faucibus. Proin sit amet sem et leo posuere efficitur vitae et ante. Nullam congue nisl augue, in ultricies orci tempor quis. Aliquam erat volutpat. In luctus, sapien at venenatis fermentum, lorem urna ultrices elit, ac volutpat metus purus eu turpis. Phasellus semper cursus mi, vitae tempor est accumsan at. Integer accumsan nec augue vitae viverra. Sed tempus cursus enim non dapibus. In commodo neque in ultricies semper. Proin auctor lacinia eros, ut tempor lectus pulvinar quis. Ut fermentum vulputate pellentesque. Duis tempor ante quis metus consectetur maximus. Curabitur a tincidunt enim.
+
+Vestibulum dictum, urna a fringilla imperdiet, tortor arcu mattis odio, et efficitur dui neque ac mauris. Vestibulum auctor risus lacus. Integer elementum erat nisl, id vehicula enim mattis in. Vestibulum consequat neque ante, in sodales magna pulvinar in. Vivamus interdum eros non magna aliquam tristique. Ut aliquam congue ante in gravida. Sed eu turpis sollicitudin, suscipit ligula id, commodo tellus. Aliquam eu sapien vitae augue gravida egestas nec sit amet turpis. Curabitur vulputate vulputate dui, et facilisis lectus tincidunt nec. Integer tristique vitae quam condimentum maximus. Ut ultricies convallis nisl eu elementum.
+
+Curabitur non nisi lectus. Aliquam finibus lorem id dui molestie, sed ullamcorper quam lobortis. Maecenas in gravida urna. Pellentesque consequat risus vel nibh tempus facilisis. Etiam auctor lacinia lacus vitae vulputate. Etiam bibendum arcu at ipsum elementum, id sodales nunc convallis. Phasellus elementum mi non sapien blandit suscipit. Integer accumsan et justo nec mattis. Vestibulum quis erat viverra, condimentum enim eget, auctor tortor. Nunc ac mauris sit amet urna pellentesque malesuada. Fusce urna justo, finibus eget blandit eget, volutpat eu nisi. In nisi nunc, sodales sit amet tempor eu, feugiat feugiat tellus. Nulla felis purus, gravida eu iaculis in, interdum id purus. In hac habitasse platea dictumst. Aenean consequat, quam tincidunt sodales lacinia, ex dui faucibus massa, ut porta dolor justo et mi.
+
+Donec a massa porta, vehicula diam et, pulvinar tortor. Duis tincidunt, nibh ut pharetra hendrerit, est orci egestas urna, et sollicitudin massa lacus aliquam ex. Curabitur in quam sed elit scelerisque pretium nec rhoncus nulla. In a ligula.
+ """
+
+ run () -> stringify.attEscape(text)
diff --git a/generator/node_modules/xmlbuilder/perf/basic/object.coffee b/generator/node_modules/xmlbuilder/perf/basic/object.coffee
new file mode 100644
index 0000000..ac7df51
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/perf/basic/object.coffee
@@ -0,0 +1,21 @@
+perf 'Create simple object', 100000, (run) ->
+ obj =
+ ele: "simple element"
+ person:
+ name: "John"
+ '@age': 35
+ '?pi': 'mypi'
+ '#comment': 'Good guy'
+ '#cdata': 'well formed!'
+ unescaped:
+ '#raw': '&<>&'
+ address:
+ city: "Istanbul"
+ street: "End of long and winding road"
+ contact:
+ phone: [ "555-1234", "555-1235" ]
+ id: () -> return 42
+ details:
+ '#text': 'classified'
+
+ run () -> xml(obj)
diff --git a/generator/node_modules/xmlbuilder/perf/index.coffee b/generator/node_modules/xmlbuilder/perf/index.coffee
new file mode 100644
index 0000000..3bd0f93
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/perf/index.coffee
@@ -0,0 +1,161 @@
+builder = require('../src/index')
+git = require('git-state')
+fs = require('fs')
+path = require('path')
+{ performance, PerformanceObserver } = require('perf_hooks')
+
+global.xml = builder.create
+global.doc = builder.begin
+
+global.perf = (description, count, func) ->
+
+ totalTime = 0
+
+ callback = (userFunction) ->
+ startTime = performance.now()
+ for i in [1..count]
+ userFunction()
+ endTime = performance.now()
+ totalTime += endTime - startTime
+ func(callback)
+
+ averageTime = totalTime / count
+
+ version = require('../package.json').version
+ working = gitWorking(gitDir)
+ if working then version = version + "*"
+ if not perfObj[version] then perfObj[version] = { }
+
+ perfObj[version][description] = averageTime.toFixed(4)
+
+readPerf = (filename) ->
+ if not fs.existsSync(filename) then fs.closeSync(fs.openSync(filename, 'w'))
+ str = fs.readFileSync(filename, 'utf8')
+ if str then JSON.parse(str) else { }
+
+runPerf = (dirPath) ->
+ for file from walkDir(dirPath)
+ filename = path.basename(file)
+ if filename is "index.coffee" or filename is "perf.list" then continue
+ require(file)
+
+walkDir = (dirPath) ->
+ for file in fs.readdirSync(dirPath)
+ filePath = path.join(dirPath, file)
+ stat = fs.statSync(filePath)
+ if stat.isFile() then yield filePath else if stat.isDirectory() then yield from walkDir(filePath)
+ return undefined
+
+gitWorking = (dirPath) ->
+ return git.isGitSync(dirPath) and git.dirtySync(dirPath)
+
+printPerf = (perfObj) ->
+ sorted = sortByVersion(perfObj)
+
+ for sortedItems in sorted
+ version = sortedItems.version
+ items = sortedItems.item
+ sortedItem = sortByDesc(items)
+
+ if parseVersion(version)[3]
+ console.log "\x1b[4mv%s (Working Tree):\x1b[0m", version
+ else
+ console.log "\x1b[4mv%s:\x1b[0m", version
+
+ longestDescription = 0
+ for item in sortedItem
+ descriptionLength = item.description.length
+ if descriptionLength > longestDescription
+ longestDescription = descriptionLength
+
+ for item in sortedItem
+ description = item.description
+ averageTime = item.averageTime
+ prevItem = findPrevPerf(sorted, version, description)
+ if prevItem
+ if averageTime < prevItem.item[description]
+ console.log " - \x1b[36m%s\x1b[0m \x1b[1m\x1b[32m%s\x1b[0m ms (v%s was \x1b[1m%s\x1b[0m ms, -\x1b[1m%s\x1b[0m%)", padRight(description, longestDescription), averageTime, prevItem.version, prevItem.item[description], (-100*(averageTime - prevItem.item[description]) / prevItem.item[description]).toFixed(0)
+ else if averageTime > prevItem.item[description]
+ console.log " - \x1b[36m%s\x1b[0m \x1b[1m\x1b[31m%s\x1b[0m ms (v%s was \x1b[1m%s\x1b[0m ms, +\x1b[1m%s\x1b[0m%)", padRight(description, longestDescription), averageTime, prevItem.version, prevItem.item[description], (100*(averageTime - prevItem.item[description]) / prevItem.item[description]).toFixed(0)
+ else
+ console.log " - \x1b[36m%s\x1b[0m \x1b[1m%s\x1b[0m ms (v%s was \x1b[1m%s\x1b[0m ms, \x1b[1m%s\x1b[0m%)", padRight(description, longestDescription), averageTime, prevItem.version, prevItem.item[description], (100*(averageTime - prevItem.item[description]) / prevItem.item[description]).toFixed(0)
+ else
+ console.log " - \x1b[36m%s\x1b[0m \x1b[1m%s\x1b[0m ms (no previous result)", padRight(description, longestDescription), averageTime
+
+padRight = (str, len) ->
+ str + " ".repeat(len - str.length)
+
+writePerf = (filename, perfObj) ->
+ writePerfObj = { }
+ for version, items of perfObj
+ if not parseVersion(version)[3]
+ writePerfObj[version] = items
+ fs.writeFileSync(filename, JSON.stringify(writePerfObj, null, 2) , 'utf-8')
+
+findPrevPerf = (sorted, version, description) ->
+ prev = undefined
+ for item in sorted
+ if compareVersion(item.version, version) is -1
+ if item.item[description]
+ prev = item
+ return prev
+
+sortByVersion = (perfObj) ->
+ sorted = []
+ for version, items of perfObj
+ sorted.push
+ version: version
+ item: items
+ sorted.sort (item1, item2) ->
+ compareVersion(item1.version, item2.version)
+
+sortByDesc = (item) ->
+ sorted = []
+ for description, averageTime of item
+ sorted.push
+ description: description
+ averageTime: averageTime
+ sorted.sort (item1, item2) ->
+ if item1.description < item2.description then -1 else 1
+
+parseVersion = (version) ->
+ isDirty = version[version.length - 1] is "*"
+ if isDirty then version = version.substr(0, version.length - 1)
+ v = version.split('.')
+ v.push(isDirty)
+ return v
+
+compareVersion = (v1, v2) ->
+ v1 = parseVersion(v1)
+ v2 = parseVersion(v2)
+
+ if v1[0] < v2[0]
+ -1
+ else if v1[0] > v2[0]
+ 1
+ else # v1[0] = v2[0]
+ if v1[1] < v2[1]
+ -1
+ else if v1[1] > v2[1]
+ 1
+ else # v1[1] = v2[1]
+ if v1[2] < v2[2]
+ -1
+ else if v1[2] > v2[2]
+ 1
+ else # v1[2] = v2[2]
+ if v1[3] and not v2[3]
+ 1
+ else if v2[3] and not v1[3]
+ -1
+ else
+ 0
+
+
+perfDir = __dirname
+gitDir = path.resolve(__dirname, '..')
+perfFile = path.join(perfDir, './perf.list')
+perfObj = readPerf(perfFile)
+runPerf(perfDir)
+printPerf(perfObj)
+writePerf(perfFile, perfObj)
diff --git a/generator/node_modules/xmlbuilder/perf/perf.list b/generator/node_modules/xmlbuilder/perf/perf.list
new file mode 100644
index 0000000..711b077
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/perf/perf.list
@@ -0,0 +1,11 @@
+{
+ "13.0.2": {
+ "Attribute value escaping": "0.0058",
+ "Attribute value escaping (long value)": "0.0159",
+ "Attribute value escaping (no replacement)": "0.0002",
+ "Create simple object": "0.0218",
+ "Text escaping": "0.0061",
+ "Text escaping (long text)": "0.0046",
+ "Text escaping (no replacement)": "0.0002"
+ }
+} \ No newline at end of file
diff --git a/generator/node_modules/xmlbuilder/typings/index.d.ts b/generator/node_modules/xmlbuilder/typings/index.d.ts
new file mode 100644
index 0000000..27bf269
--- /dev/null
+++ b/generator/node_modules/xmlbuilder/typings/index.d.ts
@@ -0,0 +1,1771 @@
+
+import { Writable } from 'stream';
+
+export = xmlbuilder;
+
+/**
+ * Type definitions for [xmlbuilder](https://github.com/oozcitak/xmlbuilder-js)
+ *
+ * Original definitions on [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) by:
+ * - Wallymathieu <https://github.com/wallymathieu>
+ * - GaikwadPratik <https://github.com/GaikwadPratik>
+ */
+declare namespace xmlbuilder {
+ /**
+ * Creates a new XML document and returns the root element node.
+ *
+ * @param nameOrObject - name of the root element or a JS object to be
+ * converted to an XML tree
+ * @param xmldecOrOptions - XML declaration or create options
+ * @param doctypeOrOptions - Doctype declaration or create options
+ * @param options - create options
+ */
+ function create(nameOrObject: string | { [name: string]: Object },
+ xmldecOrOptions?: CreateOptions, doctypeOrOptions?: CreateOptions,
+ options?: CreateOptions): XMLElement;
+
+ /**
+ * Defines the options used while creating an XML document with the `create`
+ * function.
+ */
+ interface CreateOptions {
+ /**
+ * A version number string, e.g. `1.0`
+ */
+ version?: string;
+ /**
+ * Encoding declaration, e.g. `UTF-8`
+ */
+ encoding?: string;
+ /**
+ * Standalone document declaration: `true` or `false`
+ */
+ standalone?: boolean;
+
+ /**
+ * Public identifier of the DTD
+ */
+ pubID?: string;
+ /**
+ * System identifier of the DTD
+ */
+ sysID?: string;
+
+ /**
+ * Whether XML declaration and doctype will be included
+ */
+ headless?: boolean;
+ /**
+ * Whether nodes with `null` values will be kept or ignored
+ */
+ keepNullNodes?: boolean;
+ /**
+ * Whether attributes with `null` values will be kept or ignored
+ */
+ keepNullAttributes?: boolean;
+ /**
+ * Whether decorator strings will be ignored when converting JS
+ * objects
+ */
+ ignoreDecorators?: boolean;
+ /**
+ * Whether array items are created as separate nodes when passed
+ * as an object value
+ */
+ separateArrayItems?: boolean;
+ /**
+ * Whether existing html entities are encoded
+ */
+ noDoubleEncoding?: boolean;
+ /**
+ * Whether values will be validated and escaped or returned as is
+ */
+ noValidation?: boolean;
+ /**
+ * A character to replace invalid characters in all values. This also
+ * disables character validation.
+ */
+ invalidCharReplacement?: string;
+ /**
+ * A set of functions to use for converting values to strings
+ */
+ stringify?: XMLStringifier;
+ /**
+ * The default XML writer to use for converting nodes to string.
+ * If the default writer is not set, the built-in `XMLStringWriter`
+ * will be used instead.
+ */
+ writer?: XMLWriter;
+ }
+
+ /**
+ * Defines the functions used for converting values to strings.
+ */
+ interface XMLStringifier {
+ /**
+ * Converts an element or attribute name to string
+ */
+ name?: (v: any) => string;
+ /**
+ * Converts the contents of a text node to string
+ */
+ text?: (v: any) => string;
+ /**
+ * Converts the contents of a CDATA node to string
+ */
+ cdata?: (v: any) => string;
+ /**
+ * Converts the contents of a comment node to string
+ */
+ comment?: (v: any) => string;
+ /**
+ * Converts the contents of a raw text node to string
+ */
+ raw?: (v: any) => string;
+ /**
+ * Converts attribute value to string
+ */
+ attValue?: (v: any) => string;
+ /**
+ * Converts processing instruction target to string
+ */
+ insTarget?: (v: any) => string;
+ /**
+ * Converts processing instruction value to string
+ */
+ insValue?: (v: any) => string;
+ /**
+ * Converts XML version to string
+ */
+ xmlVersion?: (v: any) => string;
+ /**
+ * Converts XML encoding to string
+ */
+ xmlEncoding?: (v: any) => string;
+ /**
+ * Converts standalone document declaration to string
+ */
+ xmlStandalone?: (v: any) => string;
+ /**
+ * Converts DocType public identifier to string
+ */
+ dtdPubID?: (v: any) => string;
+ /**
+ * Converts DocType system identifier to string
+ */
+ dtdSysID?: (v: any) => string;
+ /**
+ * Converts `!ELEMENT` node content inside Doctype to string
+ */
+ dtdElementValue?: (v: any) => string;
+ /**
+ * Converts `!ATTLIST` node type inside DocType to string
+ */
+ dtdAttType?: (v: any) => string;
+ /**
+ * Converts `!ATTLIST` node default value inside DocType to string
+ */
+ dtdAttDefault?: (v: any) => string;
+ /**
+ * Converts `!ENTITY` node content inside Doctype to string
+ */
+ dtdEntityValue?: (v: any) => string;
+ /**
+ * Converts `!NOTATION` node content inside Doctype to string
+ */
+ dtdNData?: (v: any) => string;
+
+ /**
+ * When prepended to a JS object key, converts the key-value pair
+ * to an attribute.
+ */
+ convertAttKey?: string;
+ /**
+ * When prepended to a JS object key, converts the key-value pair
+ * to a processing instruction node.
+ */
+ convertPIKey?: string;
+ /**
+ * When prepended to a JS object key, converts its value to a text node.
+ *
+ * _Note:_ Since JS objects cannot contain duplicate keys, multiple text
+ * nodes can be created by adding some unique text after each object
+ * key. For example: `{ '#text1': 'some text', '#text2': 'more text' };`
+ */
+ convertTextKey?: string;
+ /**
+ * When prepended to a JS object key, converts its value to a CDATA
+ * node.
+ */
+ convertCDataKey?: string;
+ /**
+ * When prepended to a JS object key, converts its value to a
+ * comment node.
+ */
+ convertCommentKey?: string;
+ /**
+ * When prepended to a JS object key, converts its value to a raw
+ * text node.
+ */
+ convertRawKey?: string;
+
+ /**
+ * Escapes special characters in text.
+ */
+ textEscape?: (v: string) => string;
+
+ /**
+ * Escapes special characters in attribute values.
+ */
+ attEscape?: (v: string) => string;
+ }
+
+ /**
+ * Represents a writer which outputs an XML document.
+ */
+ interface XMLWriter {
+ /**
+ * Writes the indentation string for the given level.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ indent?: (node: XMLNode, options: WriterOptions, level: number) => any
+
+ /**
+ * Writes the newline string.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ endline?: (node: XMLNode, options: WriterOptions, level: number) => any
+
+ /**
+ * Writes an attribute.
+ *
+ * @param att - current attribute
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ attribute?: (att: XMLAttribute, options: WriterOptions,
+ level: number) => any
+
+ /**
+ * Writes a CDATA node.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ cdata?: (node: XMLCData, options: WriterOptions, level: number) => any
+
+ /**
+ * Writes a comment node.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ comment?: (node: XMLComment, options: WriterOptions,
+ level: number) => any
+
+ /**
+ * Writes the XML declaration (e.g. `<?xml version="1.0"?>`).
+ *
+ * @param node - XML declaration node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ declaration?: (node: XMLDeclaration, options: WriterOptions,
+ level: number) => any
+
+ /**
+ * Writes the DocType node and its children.
+ *
+ * _Note:_ Be careful when overriding this function as this function
+ * is also responsible for writing the internal subset of the DTD.
+ *
+ * @param node - DOCTYPE node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ docType?: (node: XMLDocType, options: WriterOptions,
+ level: number) => any
+
+ /**
+ * Writes an element node.
+ *
+ * _Note:_ Be careful when overriding this function as this function
+ * is also responsible for writing the element attributes and child
+ * nodes.
+ *
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ element?: (node: XMLElement, options: WriterOptions,
+ level: number) => any
+
+ /**
+ * Writes a processing instruction node.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ processingInstruction?: (node: XMLProcessingInstruction,
+ options: WriterOptions, level: number) => any
+
+ /**
+ * Writes a raw text node.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ raw?: (node: XMLRaw, options: WriterOptions, level: number) => any
+
+ /**
+ * Writes a text node.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ text?: (node: XMLText, options: WriterOptions, level: number) => any
+
+ /**
+ * Writes an attribute node (`!ATTLIST`) inside the DTD.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ dtdAttList?: (node: XMLDTDAttList, options: WriterOptions,
+ level: number) => any
+
+ /**
+ * Writes an element node (`!ELEMENT`) inside the DTD.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ dtdElement?: (node: XMLDTDElement, options: WriterOptions,
+ level: number) => any
+
+ /**
+ * Writes an entity node (`!ENTITY`) inside the DTD.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ dtdEntity?: (node: XMLDTDEntity, options: WriterOptions,
+ level: number) => any
+
+ /**
+ * Writes a notation node (`!NOTATION`) inside the DTD.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ dtdNotation?: (node: XMLDTDNotation, options: WriterOptions,
+ level: number) => any
+
+ /**
+ * Called right after starting writing a node. This function does not
+ * produce any output, but can be used to alter the state of the writer.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ openNode?: (node: XMLNode, options: WriterOptions,
+ level: number) => void
+
+ /**
+ * Called right before completing writing a node. This function does not
+ * produce any output, but can be used to alter the state of the writer.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ closeNode?: (node: XMLNode, options: WriterOptions,
+ level: number) => void
+
+ /**
+ * Called right after starting writing an attribute. This function does
+ * not produce any output, but can be used to alter the state of the
+ * writer.
+ *
+ * @param node - current attribute
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ openAttribute?: (att: XMLAttribute, options: WriterOptions,
+ level: number) => void
+
+ /**
+ * Called right before completing writing an attribute. This function
+ * does not produce any output, but can be used to alter the state of
+ * the writer.
+ *
+ * @param node - current attribute
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ closeAttribute?: (att: XMLAttribute, options: WriterOptions,
+ level: number) => void
+ }
+
+ /**
+ * Defines the options passed to the XML writer.
+ */
+ interface WriterOptions {
+ /**
+ * Pretty print the XML tree
+ */
+ pretty?: boolean;
+ /**
+ * Indentation string for pretty printing
+ */
+ indent?: string;
+ /**
+ * Newline string for pretty printing
+ */
+ newline?: string;
+ /**
+ * A fixed number of indents to offset strings
+ */
+ offset?: number;
+ /**
+ * Maximum column width
+ */
+ width?: number;
+ /**
+ * Whether to output closing tags for empty element nodes
+ */
+ allowEmpty?: boolean;
+ /**
+ * Whether to pretty print text nodes
+ */
+ dontPrettyTextNodes?: boolean;
+ /**
+ * A string to insert before closing slash character
+ */
+ spaceBeforeSlash?: string | boolean;
+ /**
+ * User state object that is saved between writer functions
+ */
+ user?: any;
+ /**
+ * The current state of the writer
+ */
+ state?: WriterState;
+ /**
+ * Writer function overrides
+ */
+ writer?: XMLWriter;
+ }
+
+ /**
+ * Defines the state of the writer.
+ */
+ enum WriterState {
+ /**
+ * Writer state is unknown
+ */
+ None = 0,
+ /**
+ * Writer is at an opening tag, e.g. `<node>`
+ */
+ OpenTag = 1,
+ /**
+ * Writer is inside an element
+ */
+ InsideTag = 2,
+ /**
+ * Writer is at a closing tag, e.g. `</node>`
+ */
+ CloseTag = 3
+ }
+
+ /**
+ * Creates a new XML document and returns the document node.
+ * This function creates an empty document without the XML prolog or
+ * a root element.
+ *
+ * @param options - create options
+ */
+ function begin(options?: BeginOptions): XMLDocument;
+
+ /**
+ * Defines the options used while creating an XML document with the `begin`
+ * function.
+ */
+ interface BeginOptions {
+ /**
+ * Whether nodes with null values will be kept or ignored
+ */
+ keepNullNodes?: boolean;
+ /**
+ * Whether attributes with null values will be kept or ignored
+ */
+ keepNullAttributes?: boolean;
+ /**
+ * Whether decorator strings will be ignored when converting JS
+ * objects
+ */
+ ignoreDecorators?: boolean;
+ /**
+ * Whether array items are created as separate nodes when passed
+ * as an object value
+ */
+ separateArrayItems?: boolean;
+ /**
+ * Whether existing html entities are encoded
+ */
+ noDoubleEncoding?: boolean;
+ /**
+ * Whether values will be validated and escaped or returned as is
+ */
+ noValidation?: boolean;
+ /**
+ * A character to replace invalid characters in all values. This also
+ * disables character validation.
+ */
+ invalidCharReplacement?: string;
+ /**
+ * A set of functions to use for converting values to strings
+ */
+ stringify?: XMLStringifier;
+ /**
+ * The default XML writer to use for converting nodes to string.
+ * If the default writer is not set, the built-in XMLStringWriter
+ * will be used instead.
+ */
+ writer?: XMLWriter | WriterOptions;
+ }
+
+ /**
+ * A function to be called when a chunk of XML is written.
+ *
+ * @param chunk - a chunk of string that was written
+ * @param level - current depth of the XML tree
+ */
+ type OnDataCallback = (chunk: string, level: number) => void;
+
+ /**
+ * A function to be called when the XML doucment is completed.
+ */
+ type OnEndCallback = () => void;
+
+ /**
+ * Creates a new XML document in callback mode and returns the document
+ * node.
+ *
+ * @param options - create options
+ * @param onData - the function to be called when a new chunk of XML is
+ * output. The string containing the XML chunk is passed to `onData` as
+ * its first argument and the current depth of the tree is passed as its
+ * second argument.
+ * @param onEnd - the function to be called when the XML document is
+ * completed with `end`. `onEnd` does not receive any arguments.
+ */
+ function begin(options?: BeginOptions | OnDataCallback,
+ onData?: OnDataCallback | OnEndCallback,
+ onEnd?: OnEndCallback): XMLDocumentCB;
+
+ /**
+ * Creates and returns a default string writer.
+ *
+ * @param options - writer options
+ */
+ function stringWriter(options?: WriterOptions): XMLWriter
+
+ /**
+ * Creates and returns a default stream writer.
+ *
+ * @param stream - a writeable stream
+ * @param options - writer options
+ */
+ function streamWriter(stream: Writable, options?: WriterOptions): XMLWriter
+
+ /**
+ * Defines the type of a node in the XML document.
+ */
+ enum NodeType {
+ /**
+ * An element node
+ */
+ Element = 1,
+ /**
+ * An attribute node
+ */
+ Attribute = 2,
+ /**
+ * A text node
+ */
+ Text = 3,
+ /**
+ * A CDATA node
+ */
+ CData = 4,
+ /**
+ * An entity reference node inside DocType
+ */
+ EntityReference = 5,
+ /**
+ * An entity declaration node inside DocType
+ */
+ EntityDeclaration = 6,
+ /**
+ * A processing instruction node
+ */
+ ProcessingInstruction = 7,
+ /**
+ * A comment node
+ */
+ Comment = 8,
+ /**
+ * A document node
+ */
+ Document = 9,
+ /**
+ * A Doctype node
+ */
+ DocType = 10,
+ /**
+ * A document fragment node
+ */
+ DocumentFragment = 11,
+ /**
+ * A notation declaration node inside DocType
+ */
+ NotationDeclaration = 12,
+ /**
+ * An XML declaration node
+ */
+ Declaration = 201,
+ /**
+ * A raw text node
+ */
+ Raw = 202,
+ /**
+ * An attribute declaraiton node inside DocType
+ */
+ AttributeDeclaration = 203,
+ /**
+ * An element declaration node inside DocType
+ */
+ ElementDeclaration = 204
+ }
+
+ /**
+ * Defines the type of a node in the XML document.
+ */
+ export import nodeType = NodeType;
+
+ /**
+ * Defines the state of the writer.
+ */
+ export import writerState = WriterState;
+
+ /**
+ * Defines the settings used when converting the XML document to string.
+ */
+ interface XMLToStringOptions {
+ /**
+ * Pretty print the XML tree
+ */
+ pretty?: boolean;
+ /**
+ * Indentation string for pretty printing
+ */
+ indent?: string;
+ /**
+ * Newline string for pretty printing
+ */
+ newline?: string;
+ /**
+ * A fixed number of indents to offset strings
+ */
+ offset?: number;
+ /**
+ * Maximum column width
+ */
+ width?: number;
+ /**
+ * Whether to output closing tags for empty element nodes
+ */
+ allowEmpty?: boolean;
+ /**
+ * Whether to pretty print text nodes
+ */
+ dontPrettyTextNodes?: boolean;
+ /**
+ * A string to insert before closing slash character
+ */
+ spaceBeforeSlash?: string | boolean;
+ /**
+ * The default XML writer to use for converting nodes to string.
+ * If the default writer is not set, the built-in `XMLStringWriter`
+ * will be used instead.
+ */
+ writer?: XMLWriter;
+ }
+
+ /**
+ * Represents the XML document.
+ */
+ class XMLDocument extends XMLNode {
+ /**
+ * Converts the node to string
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+ }
+
+ /**
+ * Represents an XML attribute.
+ */
+ class XMLAttribute {
+ /**
+ * Type of the node
+ */
+ type: NodeType;
+ /**
+ * Parent element node
+ */
+ parent: XMLElement;
+ /**
+ * Attribute name
+ */
+ name: string;
+ /**
+ * Attribute value
+ */
+ value: string;
+
+ /**
+ * Creates a clone of this node
+ */
+ clone(): XMLAttribute;
+
+ /**
+ * Converts the node to string
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+ }
+
+ /**
+ * Represents the base class of XML nodes.
+ */
+ abstract class XMLNode {
+ /**
+ * Type of the node
+ */
+ type: NodeType;
+ /**
+ * Parent element node
+ */
+ parent: XMLElement;
+ /**
+ * Child nodes
+ */
+ children: XMLNode[]
+
+ /**
+ * Creates a new child node and appends it to the list of child nodes.
+ *
+ * _Aliases:_ `ele` and `e`
+ *
+ * @param name - node name or a JS object defining the nodes to insert
+ * @param attributes - node attributes
+ * @param text - node text
+ *
+ * @returns the last top level node created
+ */
+ element(name: any, attributes?: Object, text?: any): XMLElement;
+ ele(name: any, attributes?: Object, text?: any): XMLElement;
+ e(name: any, attributes?: Object, text?: any): XMLElement;
+
+ /**
+ * Adds or modifies an attribute.
+ *
+ * _Aliases:_ `att`, `a`
+ *
+ * @param name - attribute name
+ * @param value - attribute value
+ *
+ * @returns the parent element node
+ */
+ attribute(name: any, value?: any): XMLElement;
+ att(name: any, value?: any): XMLElement;
+ a(name: any, value?: any): XMLElement;
+
+ /**
+ * Creates a new sibling node and inserts it before this node.
+ *
+ * @param name - node name or a JS object defining the nodes to insert
+ * @param attributes - node attributes
+ * @param text - node text
+ *
+ * @returns the new node
+ */
+ insertBefore(name: any, attributes?: Object, text?: any): XMLElement;
+ /**
+ * Creates a new sibling node and inserts it after this node.
+ *
+ * @param name - node name or a JS object defining the nodes to insert
+ * @param attributes - node attributes
+ * @param text - node text
+ *
+ * @returns the new node
+ */
+ insertAfter(name: any, attributes?: Object, text?: any): XMLElement;
+ /**
+ * Removes this node from the tree.
+ *
+ * @returns the parent node
+ */
+ remove(): XMLElement;
+
+ /**
+ * Creates a new element node and appends it to the list of child nodes.
+ *
+ * _Aliases:_ `nod` and `n`
+ *
+ * @param name - element node name
+ * @param attributes - node attributes
+ * @param text - node text
+ *
+ * @returns the node created
+ */
+ node(name: string, attributes?: Object, text?: any): XMLElement;
+ nod(name: string, attributes?: Object, text?: any): XMLElement;
+ n(name: string, attributes?: Object, text?: any): XMLElement;
+
+ /**
+ * Creates a new text node and appends it to the list of child nodes.
+ *
+ * _Aliases:_ `txt` and `t`
+ *
+ * @param value - node value
+ *
+ * @returns the parent node
+ */
+ text(value: string): XMLElement;
+ txt(value: string): XMLElement;
+ t(value: string): XMLElement;
+
+ /**
+ * Creates a new CDATA node and appends it to the list of child nodes.
+ *
+ * _Aliases:_ `dat` and `d`
+ *
+ * @param value - node value
+ *
+ * @returns the parent node
+ */
+ cdata(value: string): XMLElement;
+ dat(value: string): XMLElement;
+ d(value: string): XMLElement;
+
+ /**
+ * Creates a new comment node and appends it to the list of child nodes.
+ *
+ * _Aliases:_ `com` and `c`
+ *
+ * @param value - node value
+ *
+ * @returns the parent node
+ */
+ comment(value: string): XMLElement;
+ com(value: string): XMLElement;
+ c(value: string): XMLElement;
+
+ /**
+ * Creates a comment node before the current node
+ *
+ * @param value - node value
+ *
+ * @returns the parent node
+ */
+ commentBefore(value: string): XMLElement;
+
+ /**
+ * Creates a comment node after the current node
+ *
+ * @param value - node value
+ *
+ * @returns the parent node
+ */
+ commentAfter(value: string): XMLElement;
+
+ /**
+ * Creates a new raw text node and appends it to the list of child
+ * nodes.
+ *
+ * _Alias:_ `r`
+ *
+ * @param value - node value
+ *
+ * @returns the parent node
+ */
+ raw(value: string): XMLElement;
+ r(value: string): XMLElement;
+
+ /**
+ * Creates a new processing instruction node and appends it to the list
+ * of child nodes.
+ *
+ * _Aliases:_ `ins` and `i`
+ *
+ * @param target - node target
+ * @param value - node value
+ *
+ * @returns the parent node
+ */
+ instruction(target: string, value: any): XMLElement;
+ instruction(array: Array<any>): XMLElement;
+ instruction(obj: Object): XMLElement;
+ ins(target: string, value: any): XMLElement;
+ ins(array: Array<any>): XMLElement;
+ ins(obj: Object): XMLElement;
+ i(target: string, value: any): XMLElement;
+ i(array: Array<any>): XMLElement;
+ i(obj: Object): XMLElement;
+
+ /**
+ * Creates a processing instruction node before the current node.
+ *
+ * @param target - node target
+ * @param value - node value
+ *
+ * @returns the parent node
+ */
+ instructionBefore(target: string, value: any): XMLElement;
+
+ /**
+ * Creates a processing instruction node after the current node.
+ *
+ * @param target - node target
+ * @param value - node value
+ *
+ * @returns the parent node
+ */
+ instructionAfter(target: string, value: any): XMLElement;
+
+ /**
+ * Creates the XML declaration.
+ *
+ * _Alias:_ `dec`
+ *
+ * @param version - version number string, e.g. `1.0`
+ * @param encoding - encoding declaration, e.g. `UTF-8`
+ * @param standalone - standalone document declaration: `true` or `false`
+ *
+ * @returns the root element node
+ */
+ declaration(version?: string |
+ { version?: string, encoding?: string, standalone?: boolean },
+ encoding?: string, standalone?: boolean): XMLElement;
+ dec(version?: string |
+ { version?: string, encoding?: string, standalone?: boolean },
+ encoding?: string, standalone?: boolean): XMLElement;
+
+ /**
+ * Creates the document type definition.
+ *
+ * _Alias:_ `dtd`
+ *
+ * @param pubID - public identifier of the DTD
+ * @param sysID - system identifier of the DTD
+ *
+ * @returns the DOCTYPE node
+ */
+ doctype(pubID?: string | { pubID?: string, sysID?: string },
+ sysID?: string): XMLDocType;
+ dtd(pubID?: string | { pubID?: string, sysID?: string },
+ sysID?: string): XMLDocType;
+
+ /**
+ * Takes the root node of the given XML document and appends it
+ * to child nodes.
+ *
+ * @param doc - the document whose root node to import
+ *
+ * @returns the current node
+ */
+ importDocument(doc: XMLNode): XMLElement;
+
+ /**
+ * Converts the XML document to string.
+ *
+ * @param options - conversion options
+ */
+ end(options?: XMLWriter | XMLToStringOptions): string;
+
+ /**
+ * Returns the previous sibling node.
+ */
+ prev(): XMLNode;
+ /**
+ * Returns the next sibling node.
+ */
+ next(): XMLNode;
+ /**
+ * Returns the parent node.
+ *
+ * _Alias:_ `u`
+ */
+ up(): XMLElement;
+ u(): XMLElement;
+ /**
+ * Returns the document node.
+ *
+ * _Alias:_ `doc`
+ */
+ document(): XMLDocument;
+ doc(): XMLDocument;
+
+ /**
+ * Returns the root element node.
+ */
+ root(): XMLElement;
+ }
+
+ /**
+ * Represents the base class of character data nodes.
+ */
+ abstract class XMLCharacterData extends XMLNode {
+ /**
+ * Node value
+ */
+ value: string;
+ }
+
+ /**
+ * Represents a CDATA node.
+ */
+ class XMLCData extends XMLCharacterData {
+ /**
+ * Converts the node to string
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+
+ /**
+ * Creates a clone of this node
+ */
+ clone(): XMLCData;
+ }
+
+ /**
+ * Represents a comment node.
+ */
+ class XMLComment extends XMLCharacterData {
+ /**
+ * Converts the node to string
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+
+ /**
+ * Creates a clone of this node
+ */
+ clone(): XMLComment;
+ }
+
+ /**
+ * Represents a processing instruction node.
+ */
+ class XMLProcessingInstruction extends XMLCharacterData {
+ /** Instruction target
+ */
+ target: string;
+
+ /**
+ * Converts the node to string
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+
+ /**
+ * Creates a clone of this node
+ */
+ clone(): XMLProcessingInstruction;
+ }
+
+ /**
+ * Represents a raw text node.
+ */
+ class XMLRaw extends XMLCharacterData {
+ /**
+ * Converts the node to string
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+
+ /**
+ * Creates a clone of this node
+ */
+ clone(): XMLRaw;
+ }
+
+ /**
+ * Represents a text node.
+ */
+ class XMLText extends XMLCharacterData {
+ /**
+ * Converts the node to string
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+
+ /**
+ * Creates a clone of this node
+ */
+ clone(): XMLText;
+ }
+
+ /**
+ * Represents the XML declaration.
+ */
+ class XMLDeclaration {
+ /**
+ * A version number string, e.g. `1.0`
+ */
+ version: string;
+ /**
+ * Encoding declaration, e.g. `UTF-8`
+ */
+ encoding: string;
+ /**
+ * Standalone document declaration: `true` or `false`
+ */
+ standalone: boolean;
+
+ /**
+ * Converts the node to string.
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+ }
+
+ /**
+ * Represents the document type definition.
+ */
+ class XMLDocType {
+ /**
+ * Type of the node
+ */
+ type: NodeType;
+ /**
+ * Parent element node
+ */
+ parent: XMLElement;
+ /**
+ * Child nodes
+ */
+ children: XMLNode[]
+
+ /**
+ * Public identifier of the DTD
+ */
+ pubID: string;
+ /**
+ * System identifier of the DTD
+ */
+ sysID: string;
+
+ /**
+ * Creates an element type declaration.
+ *
+ * _Alias:_ `ele`
+ *
+ * @param name - element name
+ * @param value - element content (defaults to `#PCDATA`)
+ *
+ * @returns the DOCTYPE node
+ */
+ element(name: string, value?: Object): XMLDocType;
+ ele(name: string, value?: Object): XMLDocType;
+
+ /**
+ * Creates an attribute declaration.
+ *
+ * _Alias:_ `att`
+ *
+ * @param elementName - the name of the element containing this attribute
+ * @param attributeName - attribute name
+ * @param attributeType - type of the attribute
+ * @param defaultValueType - default value type (either `#REQUIRED`,
+ * `#IMPLIED`, `#FIXED` or `#DEFAULT`)
+ * @param defaultValue - default value of the attribute (only used
+ * for `#FIXED` or `#DEFAULT`)
+ *
+ * @returns the DOCTYPE node
+ */
+ attList(elementName: string, attributeName: string, attributeType: string,
+ defaultValueType: string, defaultValue?: any): XMLDocType;
+ att(elementName: string, attributeName: string, attributeType: string,
+ defaultValueType: string, defaultValue?: any): XMLDocType;
+
+ /**
+ * Creates a general entity declaration.
+ *
+ * _Alias:_ `ent`
+ *
+ * @param name - the name of the entity
+ * @param value - entity parameters
+ *
+ * @returns the DOCTYPE node
+ */
+ entity(name: string, value: string |
+ { pubID?: string, sysID?: string, nData?: string }): XMLDocType;
+ ent(name: string, value: string |
+ { pubID?: string, sysID?: string, nData?: string }): XMLDocType;
+
+ /**
+ * Creates a parameter entity declaration.
+ *
+ * _Alias:_ `pent`
+ *
+ * @param name - the name of the entity
+ * @param value - entity parameters
+ *
+ * @returns the DOCTYPE node
+ */
+ pEntity(name: string, value: string |
+ { pubID?: string, sysID?: string }): XMLDocType;
+ pent(name: string, value: string |
+ { pubID?: string, sysID?: string }): XMLDocType;
+
+ /**
+ * Creates a notation declaration.
+ *
+ * _Alias:_ `not`
+ *
+ * @param name - the name of the entity
+ * @param value - entity parameters
+ *
+ * @returns the DOCTYPE node
+ */
+ notation(name: string,
+ value: { pubID?: string, sysID?: string }): XMLDocType;
+ not(name: string,
+ value: { pubID?: string, sysID?: string }): XMLDocType;
+
+ /**
+ * Creates a new CDATA node and appends it to the list of child nodes.
+ *
+ * _Alias:_ `dat`
+ *
+ * @param value - node value
+ *
+ * @returns the DOCTYPE node
+ */
+ cdata(value: string): XMLDocType;
+ dat(value: string): XMLDocType;
+
+ /**
+ * Creates a new comment child and appends it to the list of child
+ * nodes.
+ *
+ * _Alias:_ `com`
+ *
+ * @param value - node value
+ *
+ * @returns the DOCTYPE node
+ */
+ comment(value: string): XMLDocType;
+ com(value: string): XMLDocType;
+
+ /**
+ * Creates a new processing instruction node and appends it to the list
+ * of child nodes.
+ *
+ * _Alias:_ `ins`
+ *
+ * @param target - node target
+ * @param value - node value
+ *
+ * @returns the DOCTYPE node
+ */
+ instruction(target: string, value: any): XMLDocType;
+ instruction(array: Array<any>): XMLDocType;
+ instruction(obj: Object): XMLDocType;
+ ins(target: string, value: any): XMLDocType;
+ ins(array: Array<any>): XMLDocType;
+ ins(obj: Object): XMLDocType;
+
+ /**
+ * Returns the root element node.
+ *
+ * _Alias:_ `up`
+ */
+ root(): XMLElement;
+ up(): XMLElement;
+
+ /**
+ * Converts the node to string.
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+
+ /**
+ * Creates a clone of this node.
+ */
+ clone(): XMLDocType;
+
+ /**
+ * Returns the document node.
+ *
+ * _Alias:_ `doc`
+ */
+ document(): XMLDocument;
+ doc(): XMLDocument;
+
+ /**
+ * Converts the XML document to string.
+ *
+ * @param options - conversion options
+ */
+ end(options?: XMLWriter | XMLToStringOptions): string;
+ }
+
+ /**
+ * Represents an attribute list in the DTD.
+ */
+ class XMLDTDAttList {
+ /**
+ * The name of the element containing this attribute
+ */
+ elementName: string;
+ /**
+ * Attribute name
+ */
+ attributeName: string;
+ /**
+ * Type of the attribute
+ */
+ attributeType: string;
+ /**
+ * Default value type (either `#REQUIRED`, `#IMPLIED`, `#FIXED`
+ * or `#DEFAULT`)
+ */
+ defaultValueType: string;
+ /**
+ * Default value of the attribute (only used for `#FIXED` or
+ * `#DEFAULT`)
+ */
+ defaultValue: string;
+
+ /**
+ * Converts the node to string.
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+ }
+
+ /**
+ * Represents an element in the DTD.
+ */
+ class XMLDTDElement {
+ /**
+ * The name of the element
+ */
+ name: string;
+ /**
+ * Element content
+ */
+ value: string;
+
+ /**
+ * Converts the node to string.
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+ }
+
+ /**
+ * Represents an entity in the DTD.
+ */
+ class XMLDTDEntity {
+ /**
+ * Determines whether this is a parameter entity (`true`) or a
+ * general entity (`false`).
+ */
+ pe: boolean;
+ /**
+ * The name of the entity
+ */
+ name: string;
+ /**
+ * Public identifier
+ */
+ pubID: string;
+ /**
+ * System identifier
+ */
+ sysID: string;
+ /**
+ * Notation declaration
+ */
+ nData: string;
+
+ /**
+ * Converts the node to string.
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+ }
+
+ /**
+ * Represents a notation in the DTD.
+ */
+ class XMLDTDNotation {
+ /**
+ * The name of the notation
+ */
+ name: string;
+ /**
+ * Public identifier
+ */
+ pubID: string;
+ /**
+ * System identifier
+ */
+ sysID: string;
+
+ /**
+ * Converts the node to string.
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+ }
+
+ /**
+ * Represents an element node.
+ */
+ class XMLElement extends XMLNode {
+ /**
+ * Element node name
+ */
+ name: string;
+ /**
+ * Element attributes
+ */
+ attribs: { string: XMLAttribute };
+
+ /**
+ * Creates a clone of this node
+ */
+ clone(): XMLElement;
+
+ /**
+ * Adds or modifies an attribute.
+ *
+ * _Aliases:_ `att`, `a`
+ *
+ * @param name - attribute name
+ * @param value - attribute value
+ *
+ * @returns the parent element node
+ */
+ attribute(name: any, value?: any): XMLElement;
+ att(name: any, value?: any): XMLElement;
+ a(name: any, value?: any): XMLElement;
+
+ /**
+ * Removes an attribute.
+ *
+ * @param name - attribute name
+ *
+ * @returns the parent element node
+ */
+ removeAttribute(name: string | string[]): XMLElement;
+
+ /**
+ * Converts the node to string.
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+ }
+
+ /**
+ * Represents an XML document builder used in callback mode with the
+ * `begin` function.
+ */
+ class XMLDocumentCB {
+
+ /**
+ * Creates a new child node and appends it to the list of child nodes.
+ *
+ * _Aliases:_ `nod` and `n`
+ *
+ * @param name - element node name
+ * @param attributes - node attributes
+ * @param text - node text
+ *
+ * @returns the document builder object
+ */
+ node(name: string, attributes?: Object, text?: any): XMLDocumentCB;
+ nod(name: string, attributes?: Object, text?: any): XMLDocumentCB;
+ n(name: string, attributes?: Object, text?: any): XMLDocumentCB;
+
+ /**
+ * Creates a child element node.
+ *
+ * _Aliases:_ `ele` and `e`
+ *
+ * @param name - element node name or a JS object defining the nodes
+ * to insert
+ * @param attributes - node attributes
+ * @param text - node text
+ *
+ * @returns the document builder object
+ */
+ element(name: any, attributes?: Object, text?: any): XMLDocumentCB;
+ ele(name: any, attributes?: Object, text?: any): XMLDocumentCB;
+ e(name: any, attributes?: Object, text?: any): XMLDocumentCB;
+
+ /**
+ * Adds or modifies an attribute.
+ *
+ * _Aliases:_ `att` and `a`
+ *
+ * @param name - attribute name
+ * @param value - attribute value
+ *
+ * @returns the document builder object
+ */
+ attribute(name: any, value?: any): XMLDocumentCB;
+ att(name: any, value?: any): XMLDocumentCB;
+ a(name: any, value?: any): XMLDocumentCB;
+
+ /**
+ * Creates a new text node and appends it to the list of child nodes.
+ *
+ * _Aliases:_ `txt` and `t`
+ *
+ * @param value - node value
+ *
+ * @returns the document builder object
+ */
+ text(value: string): XMLDocumentCB;
+ txt(value: string): XMLDocumentCB;
+ t(value: string): XMLDocumentCB;
+
+ /**
+ * Creates a new CDATA node and appends it to the list of child nodes.
+ *
+ * _Aliases:_ `dat` and `d`
+ *
+ * @param value - node value
+ *
+ * @returns the document builder object
+ */
+ cdata(value: string): XMLDocumentCB;
+ dat(value: string): XMLDocumentCB;
+ d(value: string): XMLDocumentCB;
+
+ /**
+ * Creates a new comment node and appends it to the list of child nodes.
+ *
+ * _Aliases:_ `com` and `c`
+ *
+ * @param value - node value
+ *
+ * @returns the document builder object
+ */
+ comment(value: string): XMLDocumentCB;
+ com(value: string): XMLDocumentCB;
+ c(value: string): XMLDocumentCB;
+
+ /**
+ * Creates a new raw text node and appends it to the list of child
+ * nodes.
+ *
+ * _Alias:_ `r`
+ *
+ * @param value - node value
+ *
+ * @returns the document builder object
+ */
+ raw(value: string): XMLDocumentCB;
+ r(value: string): XMLDocumentCB;
+
+ /**
+ * Creates a new processing instruction node and appends it to the list
+ * of child nodes.
+ *
+ * _Aliases:_ `ins` and `i`
+ *
+ * @param target - node target
+ * @param value - node value
+ *
+ * @returns the document builder object
+ */
+ instruction(target: string, value: any): XMLDocumentCB;
+ instruction(array: Array<any>): XMLDocumentCB;
+ instruction(obj: Object): XMLDocumentCB;
+ ins(target: string, value: any): XMLDocumentCB;
+ ins(array: Array<any>): XMLDocumentCB;
+ ins(obj: Object): XMLDocumentCB;
+ i(target: string, value: any): XMLDocumentCB;
+ i(array: Array<any>): XMLDocumentCB;
+ i(obj: Object): XMLDocumentCB;
+
+ /**
+ * Creates the XML declaration.
+ *
+ * _Alias:_ `dec`
+ *
+ * @param version - version number string, e.g. `1.0`
+ * @param encoding - encoding declaration, e.g. `UTF-8`
+ * @param standalone - standalone document declaration: `true` or `false`
+ *
+ * @returns the document builder object
+ */
+ declaration(version?: string, encoding?: string,
+ standalone?: boolean): XMLDocumentCB;
+ dec(version?: string, encoding?: string,
+ standalone?: boolean): XMLDocumentCB;
+
+ /**
+ * Creates the document type definition.
+ *
+ * _Alias:_ `dtd`
+ *
+ * @param root - the name of the root node
+ * @param pubID - public identifier of the DTD
+ * @param sysID - system identifier of the DTD
+ *
+ * @returns the document builder object
+ */
+ doctype(root: string, pubID?: string, sysID?: string): XMLDocumentCB;
+ dtd(root: string, pubID?: string, sysID?: string): XMLDocumentCB;
+
+ /**
+ * Creates an element type declaration.
+ *
+ * _Aliases:_ `element` and `ele`
+ *
+ * @param name - element name
+ * @param value - element content (defaults to `#PCDATA`)
+ *
+ * @returns the document builder object
+ */
+ dtdElement(name: string, value?: Object): XMLDocumentCB;
+ element(name: string, value?: Object): XMLDocumentCB;
+ ele(name: string, value?: Object): XMLDocumentCB;
+
+ /**
+ * Creates an attribute declaration.
+ *
+ * _Alias:_ `att`
+ *
+ * @param elementName - the name of the element containing this attribute
+ * @param attributeName - attribute name
+ * @param attributeType - type of the attribute (defaults to `CDATA`)
+ * @param defaultValueType - default value type (either `#REQUIRED`,
+ * `#IMPLIED`, `#FIXED` or `#DEFAULT`) (defaults to `#IMPLIED`)
+ * @param defaultValue - default value of the attribute (only used
+ * for `#FIXED` or `#DEFAULT`)
+ *
+ * @returns the document builder object
+ */
+ attList(elementName: string, attributeName: string,
+ attributeType: string, defaultValueType?:
+ string, defaultValue?: any): XMLDocumentCB;
+ att(elementName: string, attributeName: string, attributeType: string,
+ defaultValueType?: string, defaultValue?: any): XMLDocumentCB;
+ a(elementName: string, attributeName: string, attributeType: string,
+ defaultValueType?: string, defaultValue?: any): XMLDocumentCB;
+
+ /**
+ * Creates a general entity declaration.
+ *
+ * _Alias:_ `ent`
+ *
+ * @param name - the name of the entity
+ * @param value - entity parameters
+ *
+ * @returns the document builder object
+ */
+ entity(name: string, value: string |
+ { pubID?: string, sysID?: string, nData?: string }): XMLDocumentCB;
+ ent(name: string, value: string |
+ { pubID?: string, sysID?: string, nData?: string }): XMLDocumentCB;
+
+ /**
+ * Creates a parameter entity declaration.
+ *
+ * _Alias:_ `pent`
+ *
+ * @param name - the name of the entity
+ * @param value - entity parameters
+ *
+ * @returns the document builder object
+ */
+ pEntity(name: string, value: string |
+ { pubID?: string, sysID?: string }): XMLDocumentCB;
+ pent(name: string, value: string |
+ { pubID?: string, sysID?: string }): XMLDocumentCB;
+
+ /**
+ * Creates a notation declaration.
+ *
+ * _Alias:_ `not`
+ *
+ * @param name - the name of the entity
+ * @param value - entity parameters
+ *
+ * @returns the document builder object
+ */
+ notation(name: string,
+ value: { pubID?: string, sysID?: string }): XMLDocumentCB;
+ not(name: string,
+ value: { pubID?: string, sysID?: string }): XMLDocumentCB;
+
+ /**
+ * Ends the document and calls the `onEnd` callback function.
+ */
+ end(): void;
+
+ /**
+ * Moves up to the parent node.
+ *
+ * _Alias:_ `u`
+ *
+ * @returns the document builder object
+ */
+ up(): XMLDocumentCB;
+ u(): XMLDocumentCB;
+ }
+
+}