Add tpk packaging tools 01/149301/1 devel/gcontext
authorSumin Lim <sumin.lim@samsung.com>
Tue, 12 Sep 2017 05:18:42 +0000 (14:18 +0900)
committerSumin Lim <sumin.lim@samsung.com>
Tue, 12 Sep 2017 05:19:10 +0000 (14:19 +0900)
Change-Id: I2447a16af4f816e38e1f3fa6e2b4824a68f7e081

151 files changed:
config/tizen/tpk-tools/README.md [new file with mode: 0644]
config/tizen/tpk-tools/buildscript.sh [new file with mode: 0755]
config/tizen/tpk-tools/cli/bin/jsn-cli [new file with mode: 0755]
config/tizen/tpk-tools/cli/buildscript.sh [new file with mode: 0755]
config/tizen/tpk-tools/cli/lib/build.js [new file with mode: 0755]
config/tizen/tpk-tools/cli/lib/cli.js [new file with mode: 0755]
config/tizen/tpk-tools/cli/lib/create.js [new file with mode: 0755]
config/tizen/tpk-tools/cli/lib/help.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/lib/jsn_error.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/lib/list.js [new file with mode: 0755]
config/tizen/tpk-tools/cli/lib/parser.js [new file with mode: 0755]
config/tizen/tpk-tools/cli/lib/remove.js [new file with mode: 0755]
config/tizen/tpk-tools/cli/lib/shell_util.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/lib/sign.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/.bin/shjs [new symlink]
config/tizen/tpk-tools/cli/node_modules/elementtree/.npmignore [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/.travis.yml [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/CHANGES.md [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/LICENSE.txt [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/Makefile [new file with mode: 0755]
config/tizen/tpk-tools/cli/node_modules/elementtree/NOTICE [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/README.md [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/lib/constants.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/lib/elementpath.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/lib/elementtree.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/lib/errors.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/lib/parser.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/lib/parsers/index.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/lib/parsers/sax.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/lib/sprintf.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/lib/treebuilder.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/lib/utils.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/package.json [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/tests/data/xml1.xml [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/tests/data/xml2.xml [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/elementtree/tests/test-simple.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/pretty-data/README.md [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/pretty-data/package.json [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/pretty-data/pretty-data.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/pretty-data/test/test_css.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/pretty-data/test/test_json.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/pretty-data/test/test_sql.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/pretty-data/test/test_xml.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/q/CHANGES.md [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/q/LICENSE [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/q/README.md [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/q/package.json [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/q/q.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/q/queue.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/AUTHORS [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/LICENSE [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/README.md [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/examples/big-not-pretty.xml [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/examples/example.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/examples/get-products.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/examples/hello-world.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/examples/not-pretty.xml [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/examples/pretty-print.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/examples/shopping.xml [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/examples/strict.dtd [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/examples/switch-bench.js [new file with mode: 0755]
config/tizen/tpk-tools/cli/node_modules/sax/examples/test.html [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/examples/test.xml [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/lib/sax.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/package.json [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/buffer-overrun.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/cdata-chunked.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/cdata-end-split.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/cdata-fake-end.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/cdata-multiple.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/cdata.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/index.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/issue-23.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/issue-30.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/issue-35.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/issue-47.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/issue-49.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/parser-position.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/script.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/self-closing-child-strict.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/self-closing-child.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/self-closing-tag.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/stray-ending.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/trailing-non-whitespace.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/unquoted.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-issue-41.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-rebinding.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-strict.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-unbound.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-xml-default-prefix.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-xml-default-redefine.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/.documentup.json [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/.jshintrc [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/.npmignore [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/.travis.yml [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/LICENSE [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/README.md [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/RELEASE.md [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/bin/shjs [new file with mode: 0755]
config/tizen/tpk-tools/cli/node_modules/shelljs/global.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/make.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/package.json [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/scripts/generate-docs.js [new file with mode: 0755]
config/tizen/tpk-tools/cli/node_modules/shelljs/scripts/run-tests.js [new file with mode: 0755]
config/tizen/tpk-tools/cli/node_modules/shelljs/shell.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/cat.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/cd.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/chmod.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/common.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/cp.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/dirs.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/echo.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/error.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/exec.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/find.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/grep.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/ln.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/ls.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/mkdir.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/mv.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/popd.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/pushd.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/pwd.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/rm.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/sed.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/tempdir.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/test.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/to.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/toEnd.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/shelljs/src/which.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/string-template/.npmignore [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/string-template/.travis.yml [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/string-template/LICENCE [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/string-template/Readme.md [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/string-template/compile.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/string-template/index.js [new file with mode: 0644]
config/tizen/tpk-tools/cli/node_modules/string-template/package.json [new file with mode: 0644]
config/tizen/tpk-tools/cli/package.json [new file with mode: 0644]
config/tizen/tpk-tools/cli/tizen-app-template/icon.png [new file with mode: 0755]
config/tizen/tpk-tools/cli/tizen-app-template/index.js [new file with mode: 0755]
config/tizen/tpk-tools/cli/tizen-app-template/pkgid.appid [new file with mode: 0755]
config/tizen/tpk-tools/cli/tizen-app-template/tizen-manifest.xml [new file with mode: 0755]
config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/author-signature.xml [new file with mode: 0644]
config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/bin/tizen.org.iotjs-pkg.tizen.org.iotjs-app [new file with mode: 0755]
config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/buildscript.sh [new file with mode: 0755]
config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/res/tizen.org.iotjs-app/index.js [new file with mode: 0755]
config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/shared/res/icon.png [new file with mode: 0755]
config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/signature1.xml [new file with mode: 0644]
config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/tizen-manifest.xml [new file with mode: 0644]
config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/tizen.org.iotjs-pkg.tpk [new file with mode: 0644]

diff --git a/config/tizen/tpk-tools/README.md b/config/tizen/tpk-tools/README.md
new file mode 100644 (file)
index 0000000..f429e25
--- /dev/null
@@ -0,0 +1,39 @@
+# Setting buildscript.sh for Tizen IoT.js app ceritifacation
+1. Install & Launch Tizen-Studio (https://developer.tizen.org/development/tizen-studio/download)
+2. Install Certification :
+ * Tools > PackageManager > Tizen SDK Tools > BaseLine SDK > Certificate Manager
+3. Create a new profile 
+4. Set buildscript.sh file
+Set [AUTHOR_NAME] and [PASSWORD] on buildscript.sh file
+Use same 'author name' and 'password' with Cerification manager,Tizen Studio.
+  
+```code
+jsn-cli build sign ~/tizen-studio/tools/ide/bin/native-signing 
+~/tizen-studio/tools/certificate-generator/certificates/developer/tizen-developer-ca.cer 
+~/tizen-studio-data/keystore/author/[AUTHOR_NAME].p12 [PASSWORD] 
+~/tizen-studio/tools/certificate-generator/certificates/distributor/tizen-distributor-signer.p12 tizenpkcs12passfordsigner 
+~/tizen-studio/tools/certificate-generator/certificates/distributor/tizen-distributor-ca.cer
+```
+# Create Tizen package using jsn-cli
+```code
+> cd cli
+> npm install
+> jsn-cli create package 'tizen.org.iotjs-pkg'
+> cd tizen.org.iotjs-pkg
+> jsn-cli create app tizen.org.iotjs-app
+```
+* Implement your own app on '/res/tizen.org.iotjs-app/index.js'
+
+# Create a .tpk file
+```code
+> cp buildscript ./tizen.org.iotjs-pkg
+> ./buildscript
+```
+
+# Send .tpk to the target device and Install
+```code
+> sdb push ./tizen.org.iotjs-pkg.tpk /tmp
+> sdb shell
+> pkgcmd -i -t tpk -p tizen.org.iotjs-pkg.tpk
+```
+
diff --git a/config/tizen/tpk-tools/buildscript.sh b/config/tizen/tpk-tools/buildscript.sh
new file mode 100755 (executable)
index 0000000..9bc167c
--- /dev/null
@@ -0,0 +1 @@
+jsn-cli build sign ~/tizen-studio/tools/ide/bin/native-signing ~/tizen-studio/tools/certificate-generator/certificates/developer/tizen-developer-ca.cer ~/tizen-studio-data/keystore/author/[AUTHOR_NAME].p12 [PASSWORD] ~/tizen-studio/tools/certificate-generator/certificates/distributor/tizen-distributor-signer.p12 tizenpkcs12passfordsigner ~/tizen-studio/tools/certificate-generator/certificates/distributor/tizen-distributor-ca.cer
diff --git a/config/tizen/tpk-tools/cli/bin/jsn-cli b/config/tizen/tpk-tools/cli/bin/jsn-cli
new file mode 100755 (executable)
index 0000000..de376d4
--- /dev/null
@@ -0,0 +1,16 @@
+#!/usr/bin/env node
+
+var fs = require('fs');
+var path = require('path');
+
+// get current path of execution
+var execPath = process.cwd();
+
+// get real path because it can be real bin file or symbolic link file
+var binDir = path.dirname(fs.realpathSync(process.argv[1]));
+
+// change cwd
+process.chdir(path.join(binDir, '..', 'lib'));
+
+// compile & execute
+require('../lib/cli')(process.argv, execPath);
diff --git a/config/tizen/tpk-tools/cli/buildscript.sh b/config/tizen/tpk-tools/cli/buildscript.sh
new file mode 100755 (executable)
index 0000000..d100ee1
--- /dev/null
@@ -0,0 +1 @@
+jsn-cli build sign ~/tizen-studio/tools/ide/bin/native-signing ~/tizen-studio/tools/certificate-generator/certificates/developer/tizen-developer-ca.cer ~/tizen-studio-data/keystore/author/iotjs.p12 power7sumin ~/tizen-studio/tools/certificate-generator/certificates/distributor/tizen-distributor-signer.p12 tizenpkcs12passfordsigner ~/tizen-studio/tools/certificate-generator/certificates/distributor/tizen-distributor-ca.cer
diff --git a/config/tizen/tpk-tools/cli/lib/build.js b/config/tizen/tpk-tools/cli/lib/build.js
new file mode 100755 (executable)
index 0000000..025165b
--- /dev/null
@@ -0,0 +1,75 @@
+(function() {
+  'use strict';
+
+  var fs = require('fs');
+  var path = require('path');
+  var Q = require('q');
+
+  var JsnError = require('./jsn_error');
+  var shellUtil = require('./shell_util');
+
+  module.exports = build;
+
+  // this module's build is meanging to package a tpk
+  function build(argv, parser) {
+    var needToSign = argv.args_[0] || 'nosign';
+    switch(needToSign) {
+      case 'sign':
+      // current args_[0] is 'sign'. So remove it.
+      argv.args_.shift();
+      return require('./sign')(argv, parser)
+      .then(function() {packageToTpk();});
+
+      case 'nosign':
+      return parser.parse()
+      .catch(function(err) {
+        throw new JsnError('Parsing manifest file has a problem: ' +
+                           err.message);
+      })
+      .then(function() {
+        packageToTpk();
+      });
+
+      default:
+      throw new JsnError('Wrong parameters for build command');
+    }
+
+    function packageToTpk() {
+      var dotTpk = '.tpk';
+      var dirToGoBack = process.cwd();
+
+      console.log('Building the package...');
+
+      // exist 'zip' command?
+      return shellUtil.shExec('which zip')
+
+      .then(function() {
+        // cd to project directory
+        process.chdir(parser.get('exec_path'));
+
+        var pkgIdTpk = parser.get('package').pkg_id + dotTpk;
+
+        // if *.tpk file exists, delete it
+        return Q.denodeify(fs.stat)(pkgIdTpk)
+          .then(function(stats) {
+            shellUtil.shExec('rm ' + pkgIdTpk);
+          },
+            function() {
+            // empty(if not, it is catrued by outer catch )
+          });
+      })
+
+      .then(function() {
+        var tpkFile = parser.get('package').pkg_id + dotTpk;
+        var output = '.' + path.sep + tpkFile;
+        var input = '.' + path.sep + '*';
+        return shellUtil.shExec('zip -r ' + output + ' ' + input);
+      })
+
+      // cd to previous cwd; actually, doesn't need this
+      .then(function() {
+        process.chdir(dirToGoBack);
+      });
+    }
+  }
+}());
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/cli/lib/cli.js b/config/tizen/tpk-tools/cli/lib/cli.js
new file mode 100755 (executable)
index 0000000..0c0020d
--- /dev/null
@@ -0,0 +1,134 @@
+(function() {
+  'use strict';
+
+  var fs = require('fs');
+  var path = require('path');
+  var Q = require('q');
+
+  var help = require('./help');
+
+  module.exports = cli;
+
+  /**
+    * This program uses 'Promises'.
+    * Reference below links for detailed contents.
+    * Promises: http://www.html5rocks.com/en/tutorials/es6/promises/
+    * q: https://github.com/kriskowal/q
+    */
+  function cli(inputArgv, execPath) {
+    // verify inputArgv
+    var argv = getVerifiedArgv(inputArgv);
+    if (argv === null) {
+      help.printAll();
+      return;
+    }
+
+    argv.exec_path_ = execPath;
+
+    // setup manifest parser
+    var parser = new (require('./parser'))(execPath);
+
+    // process command
+    switch (argv.cmd_) {
+      case 'create':
+      return require('./create')(argv, parser)
+      .then(
+        function() { 
+          console.log('Ok');
+        },
+        function(err) {
+          console.error(err.message);
+          help.printCreate();
+        });
+
+      case 'list':
+      return require('./list')(argv, parser)
+      .then(
+        function() {
+          console.log('Ok');
+        },
+        function(err) {
+          console.error(err.message);
+          help.printList();
+        });
+
+      case 'remove':
+      return require('./remove')(argv, parser)
+      .then(
+        function() {
+          console.log('Ok');
+        },
+        function(err) {
+          console.error(err.message);
+          help.printRemove();
+        });
+
+      case 'sign':
+      return require('./sign')(argv, parser)
+      .then(
+        function() {
+          console.log('Ok');
+        },
+        function(err) {
+          console.error(err.message);
+          help.printSign();
+        });
+
+      case 'build':
+      return require('./build')(argv, parser)
+      .then(
+        function() {
+          console.log('Ok');
+        },
+        function(err) {
+          console.error(err.message);
+          help.printBuild();
+        });
+
+      case 'help':
+      default:
+      help.print(argv.args_[0]);
+      break;
+    }
+
+    function getVerifiedArgv(inputArgv) {
+      if (inputArgv.length < 3)
+        return null;
+
+      var cmd = inputArgv[2];
+      var args = [];
+      switch (cmd) {
+        case 'create':
+        args.push(inputArgv[3]);
+        args.push(inputArgv[4]);
+        break;
+
+        case 'remove':
+        args.push(inputArgv[3]);
+        break;
+
+        case 'sign':
+        case 'build':
+        var len = inputArgv.length;
+        for (var i = 3; i < len; i+=1)
+          args[i-3] = inputArgv[i];
+        break;
+
+        case 'list':
+        break;
+
+        case 'help':
+        args.push(inputArgv[3]);
+        break;
+
+        default:
+        return null;
+      }
+
+      return {
+        cmd_: cmd,
+        args_: args
+      };
+    }
+  }
+}());
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/cli/lib/create.js b/config/tizen/tpk-tools/cli/lib/create.js
new file mode 100755 (executable)
index 0000000..dc25e26
--- /dev/null
@@ -0,0 +1,238 @@
+(function() {
+  'use strict';
+
+  var fs = require('fs');
+  var path = require('path');
+  var Q = require('q');
+  var format = require('string-template');
+
+  var JsnError = require('./jsn_error');
+  var shellUtil = require('./shell_util');
+
+  module.exports = create;
+
+  function create(argv, parser) {
+    var manifestFile = 'tizen-manifest.xml';
+    var iconFile = 'icon.png';
+
+    return Q.fcall(function() {
+      if (argv.args_[0] === undefined || argv.args_[1] === undefined) {
+        throw new JsnError('error: You should type proper parameters');
+      } else {
+        var createType = argv.args_[0];
+        console.log('Creating %s...', createType);
+
+        switch (createType) {
+          case 'package':
+          var pkgId = argv.args_[1];
+          return createPackage(pkgId, parser);
+
+          case 'app':
+          var appId = argv.args_[1];
+          return createApp(appId, parser);
+
+          default:
+          throw new JsnError('error: You should type proper parameters');
+        }
+      }
+    });
+
+    /**
+      * creates directory to be below directory structure
+      * [pkgid]/shared(dir)
+      *              /res(dir)
+      *       /bin(dir)
+      *       /lib(dir)
+      *       /res(dir)
+      *           /icon.png(file)
+      *        /tizen-manifest.xml(file)
+      */
+    function createPackage(pkgId, parser) {
+      // Creating Package
+      var dirToCreate = path.join(parser.get('exec_path'), pkgId);
+
+      // Checking directory to create package
+
+      /**
+        * if the dir exists and the dir is not empty, exit program
+        * if the dir exists and the dir is empty, pass
+        * if the dir exists and the dir is file, exit program
+        * if there is no dir, create the dir
+        */
+      return Q.denodeify(fs.stat)(dirToCreate)
+      .then(
+        function(stats) {
+          if (stats.isDirectory()) {
+            return Q.denodeify(fs.readdir)(dirToCreate)
+              .then(function(files) {
+                if (files.length > 0)
+                  throw new JsnError(pkgId + ' is not empty directory');
+              });
+          } else {
+            throw new JsnError(pkgId + ' file exists.');
+          }
+        },
+        function() {
+          // Generating a new package dir : 'dirToCreate'
+          return Q.denodeify(fs.mkdir)(dirToCreate);
+      })
+
+      /**
+        * creates directories like below directory structure
+        * [pkgid]/shared
+        *        /bin
+        *        /lib
+        *        /res
+        */
+      .then(function() {
+        // Creating a new jsn project package
+        // Creating directories in project
+        var shExecPromises = ['shared', 'bin', 'lib', 'res']
+          .map(function(dir) {
+            return 'mkdir ' + path.join(dirToCreate, dir);
+          })
+          .map(shellUtil.shExec);
+        return Q.all(shExecPromises)
+          .catch(function(reason) { throw new JsnError(reason); });
+      })
+
+      /**
+        * creates a 'res' directory under 'shared' directory
+        * [pkgid]/shared
+        *               /res
+        */
+      .then(function() {
+        // Creating directories in project/shared
+        return Q.denodeify(fs.mkdir)(path.join(dirToCreate, 'shared', 'res'));
+      })
+
+      /**
+        * copy icon from 'tizen-app-template'
+        * [pkgid]/res
+        *            /icon.png
+        */
+      .then(function() {
+        // Copying icon
+        var defaultIconPath = path.join('..', 'tizen-app-template', iconFile);
+        var iconCmd = 'cp ' + defaultIconPath + ' ' +
+                        path.join(dirToCreate, 'shared', 'res', iconFile);
+        return shellUtil.shExec(iconCmd)
+          .catch(function(reason) { throw new JsnError(reason); });
+      })
+
+      /**
+        * creates manifest file from 'tizen-app-template'
+        * [pkgid]/tizen-manifest.xml
+        */
+      .then(function() {
+        // Creating manifest
+        var oriManifest = path.join('..', 'tizen-app-template', manifestFile);
+        return Q.denodeify(fs.readFile)(oriManifest);
+      })
+      .then(function(data) {
+        var manifestContent = format(data.toString(), { pkgid: pkgId });
+        var newManifest = path.join(parser.get('exec_path'),
+                                      pkgId, manifestFile);
+        return Q.denodeify(fs.writeFile)(newManifest, manifestContent)
+          .thenResolve(newManifest);
+      })
+
+      .catch(function(err) {
+          throw new JsnError('Creating package is failed: ' + err.message);
+        });
+    } // createPackage
+
+    /**
+      * creates directories to be below directory structure
+      * [pkgid]/shared(dir)
+      *               /res(dir)
+      *        /bin(dir)
+      *                 /[pkgid].[appid]
+      *        /lib(dir)
+      *        /res(dir)
+      *                 /[appid]
+      *                         /index.js
+      *            /icon.png(file)
+      *        /tizen-manifest.xml(file) - add 'ui-application' element
+      */
+    function createApp(appId, parser) {
+      return parser.parse()
+      .catch(function(err) {
+          throw new JsnError('Parsing manifest file has a problem: ' +
+                             err.message);
+      })
+
+      .then(function() {
+        // Creating a new appication
+        // Checking whether the 'appId' exists
+        var app = parser.getAppSync(appId);
+        if (app) {
+          throw new JsnError(appId + ' already exists');
+        }
+      })
+
+      // add 'ui-application' element in manifest file
+      .then(function() {
+        // Addding <ui-application> element in manifest file
+        return parser.addUiAppInManifest(appId)
+          .catch(function(err) { throw err; });
+      })
+
+      /**
+        * creates a bin file by copying and editing it
+        * [pkgid]/bin(dir)
+        *                 /[pkgid].[appid]
+        */
+      .then(function() {
+        // Creating bin file
+       var pkgId = parser.get('package').pkg_id;
+
+        var defaultBinPath =
+            path.join('..', 'tizen-app-template', 'pkgid.appid');
+        return Q.denodeify(fs.readFile)(defaultBinPath)
+          .then(function(data) {
+            // edit format string by 'string-format'
+            var binContent = format(data.toString(), { appid: appId , pkgid: pkgId});
+            var binPath = path.join(parser.get('exec_path'), 'bin',
+                                      parser.get('package').pkg_id +
+                                        '.' + appId);
+            return Q.denodeify(fs.writeFile)(binPath, binContent,
+                                             { mode: '0775' });
+          });
+      })
+
+      /**
+        * creates directory and file
+        * [pkgid]/res(dir)
+        *                 /[appid]
+        *                         /index.js
+        */
+      .then(function() {
+        // Creating app directory
+        var appDir = path.join(parser.get('exec_path'), 'res', appId);
+        return Q.denodeify(fs.mkdir)(appDir);
+      })
+      .then(function() {
+        // Creating index.js
+        var defaultIndexPath =
+            path.join('..', 'tizen-app-template', 'index.js');
+        return Q.denodeify(fs.readFile)(defaultIndexPath)
+          .then(function(data) {
+            // edit format string by 'string-format'
+            var indexContent = format(data.toString(), { appid: appId });
+            var indexPath =
+                path.join(path.join(parser.get('exec_path'), 'res', appId),
+                          'index.js');
+  
+            return Q.denodeify(fs.writeFile)(indexPath, indexContent,
+                                            { mode: '0775' });
+          });
+      })
+
+      .catch(function(err) {
+        throw new JsnError('Creating app(' + appId + ') is failed: ' +
+                           err.message);
+      });
+    } // createApp
+  } // create
+}());
diff --git a/config/tizen/tpk-tools/cli/lib/help.js b/config/tizen/tpk-tools/cli/lib/help.js
new file mode 100644 (file)
index 0000000..1992026
--- /dev/null
@@ -0,0 +1,141 @@
+(function() {
+  'use strict';
+
+  var CLI = 'jsn-cli';
+  var CAUTION_EXECUTED = '%s command should be executed in project root ' +
+                         'where has tizen-manifest.xml';
+
+  var help = module.exports;
+
+  help.printAll = function() {
+    help.printSummary();
+    help.printCreate();
+    help.printList();
+    help.printRemove();
+    help.printSign();
+    help.printBuild();
+  };
+
+  help.printSummary = function() {
+    var summary = 'jsn-cli: commandline tool for creating, signing and building package.\n';
+    var usage = 'Usage: ' + CLI + ' <command> [args0] [args1] ...';
+    console.log(summary);
+    console.log(usage);
+    console.log('where <command> is one of\n' +
+                 '--------------------------\n' +
+                 'create\tCreate a pacakge or app\n' +
+                 'list\tList all apps in the package\n' +
+                 'sign\tSign the package\n' +
+                 'build\tBuild the package to tpk file\n' +
+                 '--------------------------\n');
+    console.log('Usage Example:');
+  };
+
+  help.printCreate = function() {
+    var create = '$ ' + CLI + ' create (\'package\' or \'app\') (id)';
+    var createEx1 = '  ex) ' + CLI + ' create package pkgid';
+    var createEx2 = '  ex) ' + CLI + ' create app appid';
+    console.log(create);
+    console.log(createEx1);
+    console.log(createEx2);
+    console.log('  !!! ' + CAUTION_EXECUTED, '"app"');
+  };
+
+  help.printList = function() {
+    var list = '$ ' + CLI + ' list';
+    console.log('');
+    console.log(list);
+    console.log('  !!! ' + CAUTION_EXECUTED, '"list"');
+  };
+
+  help.printRemove = function() {
+    var remove = '$ ' + CLI + ' remove (appid)';
+    var removeEx = '  ex) ' + CLI + ' remove \'appid\'';
+    console.log(remove);
+    console.log(removeEx);
+    console.log('  !!! ' + CAUTION_EXECUTED, '"remove"');
+  };
+
+  help.printSign = function() {
+    var sign = '$ ' + CLI + ' sign (signer) ' +
+               '(authorCAPath) (authorP12Path) (authorPwd) ' +
+               '(dist1P12Path) (dist1Pwd) (dist1CAPath) ' +
+               '[dist2P12Path, dist2Pwd, dist2CAPath, dist2RootPath]';
+    var signExplain = '  (argv): mandatory\n  [argv]: optional,' +
+                      ' all [4 parameters] have to be put together';
+
+    var signer = '{SIGNER}';
+    var authorCAPath ='{CA}.cer';
+    var authorP12Path = '{AUTHOR NAME}.p12';
+    var authorPwd = '{AUTHOR PASSWORD}';
+    var dist1P12Path = '{DISTRIBUTOR}.p12';
+    var dist1Pwd = '{DISTRIBUTOR_PW}';
+    var dist1CAPath = '{CA_DISTRIBUTOR}.cer';
+
+    var signEx = '  ex) ' + CLI + ' sign ' + signer + ' ' + authorCAPath +
+                 ' ' + authorP12Path + ' ' + authorPwd + ' ' + dist1P12Path +
+                 ' ' + dist1Pwd + ' ' + dist1CAPath;
+
+    console.log('');
+    console.log(sign);
+    console.log(signExplain);
+    console.log(signEx);
+    console.log('  !!! ' + CAUTION_EXECUTED, '"sign"');
+  };
+
+  help.printBuild = function() {
+    var buildDefault = '$ ' + CLI + ' build';
+    var buildSign = '$ ' + CLI + ' build sign (signer) ' +
+                    '(authorCAPath) (authorP12Path) (authorPwd) ' +
+                    '(dist1P12Path) (dist1Pwd) (dist1CAPath) ' +
+                    '[dist2P12Path, dist2Pwd, dist2CAPath, dist2RootPath]';
+    var buildSignExplain = '  (argv): mandatory\n  [argv]: optional,' +
+                             ' all [4 parameters] have to be put together';
+
+    var signer = '{SIGNER}';
+    var authorCAPath ='{CA}.cer';
+    var authorP12Path = '{AUTHOR NAME}.p12';
+    var authorPwd = '{AUTHOR PASSWORD}';
+    var dist1P12Path = '{DISTRIBUTOR}.p12';
+    var dist1Pwd = '{DISTRIBUTOR_PW}';
+    var dist1CAPath = '{CA_DISTRIBUTOR}.cer';
+
+    var buildDefaultEx = 'ex) ' + CLI + ' build';
+    var buildSignEx = 'ex) ' + CLI + ' build sign ' + signer + ' ' +
+                      authorCAPath + ' ' + authorP12Path + ' ' +
+                      authorPwd + ' ' + dist1P12Path + ' ' +
+                      dist1Pwd + ' ' + dist1CAPath;
+
+    console.log('');
+    console.log(buildDefault);
+    console.log(buildSign);
+    console.log(buildSignExplain);
+    console.log('  ' + buildDefaultEx);
+    console.log('  ' + buildSignEx);
+    console.log('  !!!' + CAUTION_EXECUTED, '"build"');
+    console.log('');
+  };
+
+  help.print = function(cmd) {
+    switch(cmd) {
+      case 'create':
+      help.printCreate();
+      break;
+      case 'list':
+      help.printList();
+      break;
+      case 'remove':
+      help.printRemove();
+      break;
+      case 'sign':
+      help.printSign();
+      break;
+      case 'build':
+      help.printBuild();
+      break;
+      default:
+      help.printAll();
+      break;
+    }
+  };
+}());
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/cli/lib/jsn_error.js b/config/tizen/tpk-tools/cli/lib/jsn_error.js
new file mode 100644 (file)
index 0000000..c276a6b
--- /dev/null
@@ -0,0 +1,11 @@
+(function() {
+  'use strict';
+
+  module.exports = function JsnError(message) {
+    Error.captureStackTrace(this, this.constructor.name);
+    this.name = this.constructor.name;
+    this.message = message;
+  };
+
+  require('util').inherits(module.exports, Error);
+}());
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/cli/lib/list.js b/config/tizen/tpk-tools/cli/lib/list.js
new file mode 100755 (executable)
index 0000000..45507e9
--- /dev/null
@@ -0,0 +1,29 @@
+(function() {
+  'use strict';
+
+  var path = require('path');
+  var Q = require('q');
+
+  var JsnError = require('./jsn_error');
+  module.exports = function(argv, parser) {
+    return parser.parse()
+    .catch(function(err) {
+        throw new JsnError('Parsing manifest file has a problem: ' +
+                           err.message);
+      })
+    .then(function() {
+      console.log('Listing apps');
+      if (parser.get('parsed') && parser.get('has_app')) {
+        console.log('No.\tAppId\tAppType\tExec');
+        var len = parser.get('apps').length;
+        for (var i = 0; i < len; i++) {
+          var app = parser.get('apps')[i];
+          console.log((i+1) + '\t' + app.app_id + '\t' + app.type +
+                      '\t' + app.exec);
+        }
+      } else {
+        console.log('There is no app');
+      }
+    });
+  };
+}());
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/cli/lib/parser.js b/config/tizen/tpk-tools/cli/lib/parser.js
new file mode 100755 (executable)
index 0000000..7b8f0da
--- /dev/null
@@ -0,0 +1,211 @@
+(function() {
+  'use strict';
+
+  var fs = require('fs');
+  var path = require('path');
+  var et = require('elementtree');
+  var pd = require('pretty-data').pd;
+  var Q = require('q');
+  var format = require('string-template');
+
+  var JsnError = require('./jsn_error');
+
+  var MANIFEST_FILE = 'tizen-manifest.xml';
+
+  function Parser(execPath) {
+    this.exec_path = execPath;
+    this.manifest_path = '';
+    this.has_package = false;
+    this.package = {};
+    this.has_app = false;
+    this.apps = [];
+
+    // parsed_ expresses done to parse
+    this.parsed = false;
+
+    // ready_ expresses ready for parsing
+    this.ready = (function(this_) {
+      var maybeManifestPath = path.join(this_.exec_path,
+                                          MANIFEST_FILE);
+      var existManifest = (function(path) {
+          try {
+            return (fs.statSync(path));
+          } catch(err) {
+            return false;
+          }
+      })(maybeManifestPath);
+      if (existManifest) {
+        this_.manifest_path = maybeManifestPath;
+        return true;
+      } else {
+        return false;
+      }
+    })(this);
+  } // Parser
+
+  Parser.prototype = {
+    constructor: Parser,
+    set: function(key, val) {
+      this[key] = val;
+    },
+
+    get: function(key) {
+      return this[key];
+    },
+
+    /**
+      * parses manifest file and its contents are parsed to Parser's
+      * members. this method returns a promise.
+      */
+    parse: function() {
+      if (this.ready === false) {
+        return Q.fcall(function() {
+          throw new JsnError('\n  Parser is not ready. ' +
+                             'Checks whether the manifest file exists');
+        });
+      }
+
+      var self = this;
+      return Q.denodeify(fs.readFile)(self.manifest_path)
+      .then(function(data) {
+        var etree = et.parse(data.toString());
+
+        // parse package
+        var manifestElem = etree.getroot();
+        if (manifestElem) {
+          var pack = {
+            pkg_id: manifestElem.get('package'),
+            pkg_version: manifestElem.get('version'),
+            api_version: manifestElem.get('api-version')
+          };
+          self.package = pack;
+          self.has_package = true;
+        } else {
+          throw new JsnError('Can\'t get manifest element ' +
+                             'while parsing manifest file');
+        }
+
+        // parse apps
+        var uiAppElems = etree.findall('./ui-application');
+        if (uiAppElems) {
+          var len = uiAppElems.length;
+          self.has_app = (len > 0) ? true : false;
+          for (var i = 0; i < len; i++) {
+            var uiApp = uiAppElems[i];
+            var app = {
+              app_id: uiApp.get('appid'),
+              exec: uiApp.get('exec'),
+              type: uiApp.get('type')
+            };
+            self.apps[i] = app;
+          }
+        } else {
+          throw new JsnError('Can\'t get any ui app elements ' +
+                             'while parsing manifest file');
+        }
+        self.parsed = true;
+      });
+    }, // parse
+
+    addUiAppInManifest: function(appId) {
+      var self = this;
+      return Q.denodeify(fs.readFile)(self.manifest_path)
+      .then(function(data) {
+        var etree = et.parse(data.toString());
+        var subElement = et.SubElement;
+        var root = etree.getroot();
+        var uiAppElem = subElement(root, 'ui-application');
+        uiAppElem.set('appid', appId);
+        uiAppElem.set('exec', self.package.pkg_id + '.' + appId);
+        uiAppElem.set('type', 'jsapp');
+        uiAppElem.set('multiple', 'false');
+        uiAppElem.set('taskmanage', 'true');
+        uiAppElem.set('nodisplay', 'false');
+
+        var iconElem = subElement(uiAppElem, 'icon');
+        iconElem.text = 'icon.png';
+        var labelElem = subElement(uiAppElem, 'label');
+        labelElem.text = appId;
+
+        // print xml pretty
+        var xmlPretty = pd.xml(etree.write());
+        return xmlPretty;
+      })
+
+      .then(function(xmlPretty) {
+          Q.denodeify(fs.writeFile)(self.manifest_path, xmlPretty);
+        });
+    }, // addUiAppInManifest
+
+    removeApp: function(appId) {
+      var self = this;
+      var app = self.getAppSync(appId);
+
+      return Q.fcall(function() {
+        if (app === null) {  // equals to ((=== null) or (=== undefined))
+          throw new JsnError(appId + ' doesn\'t exist');
+        }
+      })
+
+      .then(function() {
+        return Q.denodeify(fs.readFile)(self.manifest_path);
+      })
+
+      .then(function(data) {
+        var etree = et.parse(data.toString());
+        var root = etree.getroot();
+        var uiAppElems = root.findall('./ui-application');
+        if (uiAppElems) {
+          var len = uiAppElems.length;
+          for (var i = 0; i < len; i++) {
+            var uiApp = uiAppElems[i];
+            if (uiApp.get('appid') == appId) {
+              root.remove(uiApp);
+              var xmlPretty = pd.xml(etree.write());
+              return xmlPretty;
+            }
+          }
+        }
+        throw new JsnError('Can\'t get valid ui-application element' +
+                           'while parsing mafniest file');
+      })
+
+      .then(function(xmlPretty) {
+          Q.denodeify(fs.writeFile)(self.manifest_path, xmlPretty);
+        })
+
+      .then(function() {
+        var len = self.apps.length;
+        for (var i = 0; i < len; i++) {
+          var app = self.apps[i];
+          if (app.app_id == appId) {
+            self.apps.splice(i, 1);
+            break;
+          }
+        }
+        self.has_app = (self.apps.length > 0) ? true : false;
+      });
+    }, // removeApp
+
+    // it is not async, so adds 'sync' to the its name
+    getAppSync: function(appId) {
+      if (!this.has_app)
+        return null;
+      var len = this.apps.length;
+      for (var i = 0; i < len; i++) {
+        var app = this.apps[i];
+        if (app.app_id == appId)
+          return app;
+      }
+      return null;
+    } // getAppSync
+  };
+
+  /**
+    * This Parser module is a class. Parser contains actions such as parsing
+    * manifest file, and adding/removing 'ui-application' element.
+    * Parser does 'async' by 'Promises' with 'q'.
+    * (Reference to 'cli.js')
+    */
+  module.exports = Parser;
+}());
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/cli/lib/remove.js b/config/tizen/tpk-tools/cli/lib/remove.js
new file mode 100755 (executable)
index 0000000..375eece
--- /dev/null
@@ -0,0 +1,50 @@
+(function() {
+  'use strict';
+
+  var path = require('path');
+  var Q = require('q');
+
+  var shellUtil = require('./shell_util');
+  var JsnError = require('./jsn_error');
+
+  module.exports = function(argv, parser) {
+    var appId = argv.args_[0];
+
+    return Q.fcall(function() {
+      if (appId === undefined)
+        throw new JsnError('error: You should type appid');
+
+      return parser.parse()
+      .catch(function(err) {
+        throw new JsnError('Parsing manifest file has a problem: ' +
+                           err.message);
+      });
+    })
+
+    .then(function() {
+      console.log('Removing app...');
+      if (parser.get('parsed') && parser.get('has_app')) {
+        var app = parser.getAppSync(appId);
+        if (app === null) {
+          throw new JsnError('There is no app');
+        }
+
+        // Deleting directories & files
+        var execFileInBin = path.join(parser.get('exec_path'),
+                                        'bin', app.exec);
+        var appDirInRes = path.join(parser.get('exec_path'),
+                                      'res', app.app_id);
+        var shPromises = ['rm ' + execFileInBin, 'rm -rf ' + appDirInRes]
+                           .map(shellUtil.shExec);
+        return Q.all(shPromises);
+      } else {
+        throw new JsnError('There is no app');
+      }
+    })
+
+    .then(function() {
+      // Deleting ui-application element in manifest file
+      return parser.removeApp(appId);
+    });
+  };
+}());
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/cli/lib/shell_util.js b/config/tizen/tpk-tools/cli/lib/shell_util.js
new file mode 100644 (file)
index 0000000..e8a18fe
--- /dev/null
@@ -0,0 +1,18 @@
+(function() {
+  'use strict';
+
+  var Q = require('q');
+  var sh = require('shelljs');
+
+  var shellUtil = module.exports;
+
+  // This is utility function for easing usage of shell script command.
+  shellUtil.shExec = function(cmd) {
+    var deferred = Q.defer();
+    sh.exec(cmd, {async:true, silent:true}, function(code) {
+      if (code !== 0) deferred.reject(cmd + ' returns ' + code);
+      else deferred.resolve(code);
+    });
+    return deferred.promise;
+  };
+}());
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/cli/lib/sign.js b/config/tizen/tpk-tools/cli/lib/sign.js
new file mode 100644 (file)
index 0000000..4904527
--- /dev/null
@@ -0,0 +1,122 @@
+(function() {
+  'use strict';
+
+  var fs = require('fs');
+  var path = require('path');
+  var Q = require('q');
+
+  var JsnError = require('./jsn_error');
+  var shellUtil = require('./shell_util');
+
+  module.exports = sign;
+
+  /**
+    * Sign command should be executed before build command.
+    * If you execute sign command after build command, the sign command
+    * deletes the tpk file which created by build command.
+    */
+  function sign(argv, parser) {
+    var argc = argv.args_.length;
+    var signCmdArray = [];    // it will be used as command
+
+    return Q.fcall(function() {
+      // if argc is not 11, argc's num is equal or greater than 7 minimally
+      if (argc !== 7 && argc !== 11) {
+        throw new JsnError(
+            'error: You should type sign command with proper arguments');
+      }
+    })
+
+    .then(function() {
+      /**
+        * argv.args_ are parameters for sign cmd
+        * sign cmd:
+        *     [signer] [targetDir] [authorCAPath] [authorP12Path] [authorPwd]
+        *     [dist1P12Path] [dist1Pwd] [dist1CAPath]
+        *     [dist2P12Path] [dist2Pwd] [dist2CAPath] [dist2RootPath]
+        * if argc is not 11,
+        *   fill them(11 - num of empty parameters) with ' ' (one space string)
+        */
+
+      // caution: targetDir is not from args_
+      var targetDir = parser.get('exec_path');
+      var signer = argv.args_[0];
+      var authorCAPath = argv.args_[1];
+      var authorP12Path = argv.args_[2];
+      var authorPwd = argv.args_[3];
+      var dist1P12Path = argv.args_[4];
+      var dist1Pwd = argv.args_[5];
+      var dist1CAPath = argv.args_[6];
+      var dist2P12Path = argv.args_[7] || '" "';
+      var dist2Pwd = argv.args_[8] || '" "';
+      var dist2CAPath = argv.args_[9] || '" "';
+      var dist2RootPath = argv.args_[10] || '" "';
+
+      // verify arguments for sign command by checking wheter files exist
+      var verifyArgv = [signer, targetDir, authorCAPath, authorP12Path,
+                        dist1P12Path, dist1CAPath];
+      if (argc === 11) {
+        verifyArgv =
+            verifyArgv.concat([dist2P12Path, dist2CAPath, dist2RootPath]);
+      }
+
+      var promToExistFiles = verifyArgv.map(function(path) {
+        var deferred = Q.defer();
+        fs.stat(path, function(err, stats) {
+          if (err) deferred.reject(err);
+          else deferred.resolve(stats);
+        });
+        return deferred.promise;
+      });
+
+      return Q.all(promToExistFiles)
+      .then(
+        function() {
+          var signArgv = [signer, targetDir, authorCAPath, authorP12Path,
+                          authorPwd, dist1P12Path, dist1Pwd, dist1CAPath];
+          if (argc === 7) {
+            signArgv = signArgv.concat([dist2P12Path, dist2Pwd,
+                                        dist2CAPath, dist2RootPath]);
+          }
+          Array.prototype.push.apply(signCmdArray, signArgv);
+        }, function(err) {
+        throw new JsnError('Can\'t verify arguments: ' + err.message);
+      });
+    })
+
+    .then(function() {
+      parser.parse();
+    })
+    .catch(function(err) {
+        throw new JsnError('Parsing manifest file has a problem: ' +
+                           err.message);
+    })
+
+    /**
+      * if [*.tpk, author-signature.xml, .manifest.tmp, signature1.xml]
+      * exists, remove all of them
+      */
+    .then(function() {
+      console.log('Signing package...');
+      // Checking previous signing
+      var shExecPromises = ['*.tpk', 'author-signature.xml',
+                              '.manifest.tmp', 'signature1.xml']
+          .map(function(dir) {
+            return 'rm ' + path.join(parser.get('exec_path'), dir);
+          })
+          .map(shellUtil.shExec);
+      return Q.all(shExecPromises)
+        // If above file doesn't exist, it can fail. But it needs to pass.
+        .fail(function() {});
+    })
+
+    // try signing
+    .then(function() {
+      // Trying signing from 'signCmdArray[0]'
+      var signCmd = signCmdArray.join(' ');
+      return shellUtil.shExec(signCmd)
+      .catch(function() { throw new JsnError("Fail to sign packge");
+    });
+    });
+  }
+}());
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/cli/node_modules/.bin/shjs b/config/tizen/tpk-tools/cli/node_modules/.bin/shjs
new file mode 120000 (symlink)
index 0000000..a044997
--- /dev/null
@@ -0,0 +1 @@
+../shelljs/bin/shjs
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/.npmignore b/config/tizen/tpk-tools/cli/node_modules/elementtree/.npmignore
new file mode 100644 (file)
index 0000000..3c3629e
--- /dev/null
@@ -0,0 +1 @@
+node_modules
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/.travis.yml b/config/tizen/tpk-tools/cli/node_modules/elementtree/.travis.yml
new file mode 100644 (file)
index 0000000..6f27c96
--- /dev/null
@@ -0,0 +1,10 @@
+language: node_js
+
+node_js:
+  - 0.6
+
+script: make test
+
+notifications:
+  email:
+    - tomaz+travisci@tomaz.me
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/CHANGES.md b/config/tizen/tpk-tools/cli/node_modules/elementtree/CHANGES.md
new file mode 100644 (file)
index 0000000..50d415d
--- /dev/null
@@ -0,0 +1,39 @@
+elementtree v0.1.6 (in development)
+
+* Add support for CData elements. (#14)
+  [hermannpencole]
+
+elementtree v0.1.5 - 2012-11-14
+
+* Fix a bug in the find() and findtext() method which could manifest itself
+  under some conditions.
+  [metagriffin]
+
+elementtree v0.1.4 - 2012-10-15
+
+* Allow user to use namespaced attributes when using find* functions.
+  [Andrew Lunny]
+
+elementtree v0.1.3 - 2012-09-21
+
+* Improve the output of text content in the tags (strip unnecessary line break
+  characters).
+
+[Darryl Pogue]
+
+elementtree v0.1.2 - 2012-09-04
+
+ * Allow user to pass 'indent' option to ElementTree.write method. If this
+   option is specified (e.g. {'indent': 4}). XML will be pretty printed.
+   [Darryl Pogue, Tomaz Muraus]
+
+ * Bump sax dependency version.
+
+elementtree v0.1.1 - 2011-09-23
+
+ * Improve special character escaping.
+   [Ryan Phillips]
+
+elementtree v0.1.0 - 2011-09-05
+
+ * Initial release.
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/LICENSE.txt b/config/tizen/tpk-tools/cli/node_modules/elementtree/LICENSE.txt
new file mode 100644 (file)
index 0000000..6b0b127
--- /dev/null
@@ -0,0 +1,203 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/Makefile b/config/tizen/tpk-tools/cli/node_modules/elementtree/Makefile
new file mode 100755 (executable)
index 0000000..ab7c4e0
--- /dev/null
@@ -0,0 +1,21 @@
+TESTS := \
+       tests/test-simple.js
+
+
+
+PATH := ./node_modules/.bin:$(PATH)
+
+WHISKEY := $(shell bash -c 'PATH=$(PATH) type -p whiskey')
+
+default: test
+
+test:
+       NODE_PATH=`pwd`/lib/ ${WHISKEY} --scope-leaks --sequential --real-time --tests "${TESTS}"
+
+tap:
+       NODE_PATH=`pwd`/lib/ ${WHISKEY} --test-reporter tap --sequential --real-time --tests "${TESTS}"
+
+coverage:
+       NODE_PATH=`pwd`/lib/ ${WHISKEY} --sequential --coverage  --coverage-reporter html --coverage-dir coverage_html --tests "${TESTS}"
+
+.PHONY: default test coverage tap scope
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/NOTICE b/config/tizen/tpk-tools/cli/node_modules/elementtree/NOTICE
new file mode 100644 (file)
index 0000000..28ad70a
--- /dev/null
@@ -0,0 +1,5 @@
+node-elementtree
+Copyright (c) 2011, Rackspace, Inc.
+
+The ElementTree toolkit is Copyright (c) 1999-2007 by Fredrik Lundh
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/README.md b/config/tizen/tpk-tools/cli/node_modules/elementtree/README.md
new file mode 100644 (file)
index 0000000..738420c
--- /dev/null
@@ -0,0 +1,141 @@
+node-elementtree
+====================
+
+node-elementtree is a [Node.js](http://nodejs.org) XML parser and serializer based upon the [Python ElementTree v1.3](http://effbot.org/zone/element-index.htm) module.
+
+Installation
+====================
+
+    $ npm install elementtree
+    
+Using the library
+====================
+
+For the usage refer to the Python ElementTree library documentation - [http://effbot.org/zone/element-index.htm#usage](http://effbot.org/zone/element-index.htm#usage).
+
+Supported XPath expressions in `find`, `findall` and `findtext` methods are listed on [http://effbot.org/zone/element-xpath.htm](http://effbot.org/zone/element-xpath.htm).
+
+Example 1 – Creating An XML Document
+====================
+
+This example shows how to build a valid XML document that can be published to
+Atom Hopper. Atom Hopper is used internally as a bridge from products all the
+way to collecting revenue, called “Usage.”  MaaS and other products send similar
+events to it every time user performs an action on a resource
+(e.g. creates,updates or deletes). Below is an example of leveraging the API
+to create a new XML document.
+
+```javascript
+var et = require('elementtree');
+var XML = et.XML;
+var ElementTree = et.ElementTree;
+var element = et.Element;
+var subElement = et.SubElement;
+
+var date, root, tenantId, serviceName, eventType, usageId, dataCenter, region,
+checks, resourceId, category, startTime, resourceName, etree, xml;
+
+date = new Date();
+
+root = element('entry');
+root.set('xmlns', 'http://www.w3.org/2005/Atom');
+
+tenantId = subElement(root, 'TenantId');
+tenantId.text = '12345';
+
+serviceName = subElement(root, 'ServiceName');
+serviceName.text = 'MaaS';
+
+resourceId = subElement(root, 'ResourceID');
+resourceId.text = 'enAAAA';
+
+usageId = subElement(root, 'UsageID');
+usageId.text = '550e8400-e29b-41d4-a716-446655440000';
+
+eventType = subElement(root, 'EventType');
+eventType.text = 'create';
+
+category = subElement(root, 'category');
+category.set('term', 'monitoring.entity.create');
+
+dataCenter = subElement(root, 'DataCenter');
+dataCenter.text = 'global';
+
+region = subElement(root, 'Region');
+region.text = 'global';
+
+startTime = subElement(root, 'StartTime');
+startTime.text = date;
+
+resourceName = subElement(root, 'ResourceName');
+resourceName.text = 'entity';
+
+etree = new ElementTree(root);
+xml = etree.write({'xml_declaration': false});
+console.log(xml);
+```
+
+As you can see, both et.Element and et.SubElement are factory methods which
+return a new instance of Element and SubElement class, respectively.
+When you create a new element (tag) you can use set method to set an attribute.
+To set the tag value, assign a value to the .text attribute.
+
+This example would output a document that looks like this:
+
+```xml
+<entry xmlns="http://www.w3.org/2005/Atom">
+  <TenantId>12345</TenantId>
+  <ServiceName>MaaS</ServiceName>
+  <ResourceID>enAAAA</ResourceID>
+  <UsageID>550e8400-e29b-41d4-a716-446655440000</UsageID>
+  <EventType>create</EventType>
+  <category term="monitoring.entity.create"/>
+  <DataCenter>global</DataCenter>
+  <Region>global</Region>
+  <StartTime>Sun Apr 29 2012 16:37:32 GMT-0700 (PDT)</StartTime>
+  <ResourceName>entity</ResourceName>
+</entry>
+```
+
+Example 2 – Parsing An XML Document
+====================
+
+This example shows how to parse an XML document and use simple XPath selectors.
+For demonstration purposes, we will use the XML document located at
+https://gist.github.com/2554343.
+
+Behind the scenes, node-elementtree uses Isaac’s sax library for parsing XML,
+but the library has a concept of “parsers,” which means it’s pretty simple to
+add support for a different parser.
+
+```javascript
+var fs = require('fs');
+
+var et = require('elementtree');
+
+var XML = et.XML;
+var ElementTree = et.ElementTree;
+var element = et.Element;
+var subElement = et.SubElement;
+
+var data, etree;
+
+data = fs.readFileSync('document.xml').toString();
+etree = et.parse(data);
+
+console.log(etree.findall('./entry/TenantId').length); // 2
+console.log(etree.findtext('./entry/ServiceName')); // MaaS
+console.log(etree.findall('./entry/category')[0].get('term')); // monitoring.entity.create
+console.log(etree.findall('*/category/[@term="monitoring.entity.update"]').length); // 1
+```
+
+Build status
+====================
+
+[![Build Status](https://secure.travis-ci.org/racker/node-elementtree.png)](http://travis-ci.org/racker/node-elementtree)
+
+
+License
+====================
+
+node-elementtree is distributed under the [Apache license](http://www.apache.org/licenses/LICENSE-2.0.html).
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/constants.js b/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/constants.js
new file mode 100644 (file)
index 0000000..b057faf
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ *  Copyright 2011 Rackspace
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+var DEFAULT_PARSER = 'sax';
+
+exports.DEFAULT_PARSER = DEFAULT_PARSER;
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/elementpath.js b/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/elementpath.js
new file mode 100644 (file)
index 0000000..2e93f47
--- /dev/null
@@ -0,0 +1,343 @@
+/**
+ *  Copyright 2011 Rackspace
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+var sprintf = require('./sprintf').sprintf;
+
+var utils = require('./utils');
+var SyntaxError = require('./errors').SyntaxError;
+
+var _cache = {};
+
+var RE = new RegExp(
+  "(" +
+  "'[^']*'|\"[^\"]*\"|" +
+  "::|" +
+  "//?|" +
+  "\\.\\.|" +
+  "\\(\\)|" +
+  "[/.*:\\[\\]\\(\\)@=])|" +
+  "((?:\\{[^}]+\\})?[^/\\[\\]\\(\\)@=\\s]+)|" +
+  "\\s+", 'g'
+);
+
+var xpath_tokenizer = utils.findall.bind(null, RE);
+
+function prepare_tag(next, token) {
+  var tag = token[0];
+
+  function select(context, result) {
+    var i, len, elem, rv = [];
+
+    for (i = 0, len = result.length; i < len; i++) {
+      elem = result[i];
+      elem._children.forEach(function(e) {
+        if (e.tag === tag) {
+          rv.push(e);
+        }
+      });
+    }
+
+    return rv;
+  }
+
+  return select;
+}
+
+function prepare_star(next, token) {
+  function select(context, result) {
+    var i, len, elem, rv = [];
+
+    for (i = 0, len = result.length; i < len; i++) {
+      elem = result[i];
+      elem._children.forEach(function(e) {
+        rv.push(e);
+      });
+    }
+
+    return rv;
+  }
+
+  return select;
+}
+
+function prepare_dot(next, token) {
+  function select(context, result) {
+    var i, len, elem, rv = [];
+
+    for (i = 0, len = result.length; i < len; i++) {
+      elem = result[i];
+      rv.push(elem);
+    }
+
+    return rv;
+  }
+
+  return select;
+}
+
+function prepare_iter(next, token) {
+  var tag;
+  token = next();
+
+  if (token[1] === '*') {
+    tag = '*';
+  }
+  else if (!token[1]) {
+    tag = token[0] || '';
+  }
+  else {
+    throw new SyntaxError(token);
+  }
+
+  function select(context, result) {
+    var i, len, elem, rv = [];
+
+    for (i = 0, len = result.length; i < len; i++) {
+      elem = result[i];
+      elem.iter(tag, function(e) {
+        if (e !== elem) {
+          rv.push(e);
+        }
+      });
+    }
+
+    return rv;
+  }
+
+  return select;
+}
+
+function prepare_dot_dot(next, token) {
+  function select(context, result) {
+    var i, len, elem, rv = [], parent_map = context.parent_map;
+
+    if (!parent_map) {
+      context.parent_map = parent_map = {};
+
+      context.root.iter(null, function(p) {
+        p._children.forEach(function(e) {
+          parent_map[e] = p;
+        });
+      });
+    }
+
+    for (i = 0, len = result.length; i < len; i++) {
+      elem = result[i];
+
+      if (parent_map.hasOwnProperty(elem)) {
+        rv.push(parent_map[elem]);
+      }
+    }
+
+    return rv;
+  }
+
+  return select;
+}
+
+
+function prepare_predicate(next, token) {
+  var tag, key, value, select;
+  token = next();
+
+  if (token[1] === '@') {
+    // attribute
+    token = next();
+
+    if (token[1]) {
+      throw new SyntaxError(token, 'Invalid attribute predicate');
+    }
+
+    key = token[0];
+    token = next();
+
+    if (token[1] === ']') {
+      select = function(context, result) {
+        var i, len, elem, rv = [];
+
+        for (i = 0, len = result.length; i < len; i++) {
+          elem = result[i];
+
+          if (elem.get(key)) {
+            rv.push(elem);
+          }
+        }
+
+        return rv;
+      };
+    }
+    else if (token[1] === '=') {
+      value = next()[1];
+
+      if (value[0] === '"' || value[value.length - 1] === '\'') {
+        value = value.slice(1, value.length - 1);
+      }
+      else {
+        throw new SyntaxError(token, 'Ivalid comparison target');
+      }
+
+      token = next();
+      select = function(context, result) {
+        var i, len, elem, rv = [];
+
+        for (i = 0, len = result.length; i < len; i++) {
+          elem = result[i];
+
+          if (elem.get(key) === value) {
+            rv.push(elem);
+          }
+        }
+
+        return rv;
+      };
+    }
+
+    if (token[1] !== ']') {
+      throw new SyntaxError(token, 'Invalid attribute predicate');
+    }
+  }
+  else if (!token[1]) {
+    tag = token[0] || '';
+    token = next();
+
+    if (token[1] !== ']') {
+      throw new SyntaxError(token, 'Invalid node predicate');
+    }
+
+    select = function(context, result) {
+      var i, len, elem, rv = [];
+
+      for (i = 0, len = result.length; i < len; i++) {
+        elem = result[i];
+
+        if (elem.find(tag)) {
+          rv.push(elem);
+        }
+      }
+
+      return rv;
+    };
+  }
+  else {
+    throw new SyntaxError(null, 'Invalid predicate');
+  }
+
+  return select;
+}
+
+
+
+var ops = {
+  "": prepare_tag,
+  "*": prepare_star,
+  ".": prepare_dot,
+  "..": prepare_dot_dot,
+  "//": prepare_iter,
+  "[": prepare_predicate,
+};
+
+function _SelectorContext(root) {
+  this.parent_map = null;
+  this.root = root;
+}
+
+function findall(elem, path) {
+  var selector, result, i, len, token, value, select, context;
+
+  if (_cache.hasOwnProperty(path)) {
+    selector = _cache[path];
+  }
+  else {
+    // TODO: Use smarter cache purging approach
+    if (Object.keys(_cache).length > 100) {
+      _cache = {};
+    }
+
+    if (path.charAt(0) === '/') {
+      throw new SyntaxError(null, 'Cannot use absolute path on element');
+    }
+
+    result = xpath_tokenizer(path);
+    selector = [];
+
+    function getToken() {
+      return result.shift();
+    }
+
+    token = getToken();
+    while (true) {
+      var c = token[1] || '';
+      value = ops[c](getToken, token);
+
+      if (!value) {
+        throw new SyntaxError(null, sprintf('Invalid path: %s', path));
+      }
+
+      selector.push(value);
+      token = getToken();
+
+      if (!token) {
+        break;
+      }
+      else if (token[1] === '/') {
+        token = getToken();
+      }
+
+      if (!token) {
+        break;
+      }
+    }
+
+    _cache[path] = selector;
+  }
+
+  // Execute slector pattern
+  result = [elem];
+  context = new _SelectorContext(elem);
+
+  for (i = 0, len = selector.length; i < len; i++) {
+    select = selector[i];
+    result = select(context, result);
+  }
+
+  return result || [];
+}
+
+function find(element, path) {
+  var resultElements = findall(element, path);
+
+  if (resultElements && resultElements.length > 0) {
+    return resultElements[0];
+  }
+
+  return null;
+}
+
+function findtext(element, path, defvalue) {
+  var resultElements = findall(element, path);
+
+  if (resultElements && resultElements.length > 0) {
+    return resultElements[0].text;
+  }
+
+  return defvalue;
+}
+
+
+exports.find = find;
+exports.findall = findall;
+exports.findtext = findtext;
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/elementtree.js b/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/elementtree.js
new file mode 100644 (file)
index 0000000..61d9276
--- /dev/null
@@ -0,0 +1,611 @@
+/**
+ *  Copyright 2011 Rackspace
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+var sprintf = require('./sprintf').sprintf;
+
+var utils = require('./utils');
+var ElementPath = require('./elementpath');
+var TreeBuilder = require('./treebuilder').TreeBuilder;
+var get_parser = require('./parser').get_parser;
+var constants = require('./constants');
+
+var element_ids = 0;
+
+function Element(tag, attrib)
+{
+  this._id = element_ids++;
+  this.tag = tag;
+  this.attrib = {};
+  this.text = null;
+  this.tail = null;
+  this._children = [];
+
+  if (attrib) {
+    this.attrib = utils.merge(this.attrib, attrib);
+  }
+}
+
+Element.prototype.toString = function()
+{
+  return sprintf("<Element %s at %s>", this.tag, this._id);
+};
+
+Element.prototype.makeelement = function(tag, attrib)
+{
+  return new Element(tag, attrib);
+};
+
+Element.prototype.len = function()
+{
+  return this._children.length;
+};
+
+Element.prototype.getItem = function(index)
+{
+  return this._children[index];
+};
+
+Element.prototype.setItem = function(index, element)
+{
+  this._children[index] = element;
+};
+
+Element.prototype.delItem = function(index)
+{
+  this._children.splice(index, 1);
+};
+
+Element.prototype.getSlice = function(start, stop)
+{
+  return this._children.slice(start, stop);
+};
+
+Element.prototype.setSlice = function(start, stop, elements)
+{
+  var i;
+  var k = 0;
+  for (i = start; i < stop; i++, k++) {
+    this._children[i] = elements[k];
+  }
+};
+
+Element.prototype.delSlice = function(start, stop)
+{
+  this._children.splice(start, stop - start);
+};
+
+Element.prototype.append = function(element)
+{
+  this._children.push(element);
+};
+
+Element.prototype.extend = function(elements)
+{
+  this._children.concat(elements);
+};
+
+Element.prototype.insert = function(index, element)
+{
+  this._children[index] = element;
+};
+
+Element.prototype.remove = function(element)
+{
+  this._children = this._children.filter(function(e) {
+    /* TODO: is this the right way to do this? */
+    if (e._id === element._id) {
+      return false;
+    }
+    return true;
+  });
+};
+
+Element.prototype.getchildren = function() {
+  return this._children;
+};
+
+Element.prototype.find = function(path)
+{
+  return ElementPath.find(this, path);
+};
+
+Element.prototype.findtext = function(path, defvalue)
+{
+  return ElementPath.findtext(this, path, defvalue);
+};
+
+Element.prototype.findall = function(path, defvalue)
+{
+  return ElementPath.findall(this, path, defvalue);
+};
+
+Element.prototype.clear = function()
+{
+  this.attrib = {};
+  this._children = [];
+  this.text = null;
+  this.tail = null;
+};
+
+Element.prototype.get = function(key, defvalue)
+{
+  if (this.attrib[key] !== undefined) {
+    return this.attrib[key];
+  }
+  else {
+    return defvalue;
+  }
+};
+
+Element.prototype.set = function(key, value)
+{
+  this.attrib[key] = value;
+};
+
+Element.prototype.keys = function()
+{
+  return Object.keys(this.attrib);
+};
+
+Element.prototype.items = function()
+{
+  return utils.items(this.attrib);
+};
+
+/*
+ * In python this uses a generator, but in v8 we don't have em,
+ * so we use a callback instead.
+ **/
+Element.prototype.iter = function(tag, callback)
+{
+  var self = this;
+  var i, child;
+
+  if (tag === "*") {
+    tag = null;
+  }
+
+  if (tag === null || this.tag === tag) {
+    callback(self);
+  }
+
+  for (i = 0; i < this._children.length; i++) {
+    child = this._children[i];
+    child.iter(tag, function(e) {
+      callback(e);
+    });
+  }
+};
+
+Element.prototype.itertext = function(callback)
+{
+  this.iter(null, function(e) {
+    if (e.text) {
+      callback(e.text);
+    }
+
+    if (e.tail) {
+      callback(e.tail);
+    }
+  });
+};
+
+
+function SubElement(parent, tag, attrib) {
+  var element = parent.makeelement(tag, attrib);
+  parent.append(element);
+  return element;
+}
+
+function Comment(text) {
+  var element = new Element(Comment);
+  if (text) {
+    element.text = text;
+  }
+  return element;
+}
+
+function CData(text) {
+  var element = new Element(CData);
+  if (text) {
+    element.text = text;
+  }
+  return element;
+}
+
+function ProcessingInstruction(target, text)
+{
+  var element = new Element(ProcessingInstruction);
+  element.text = target;
+  if (text) {
+    element.text = element.text + " " + text;
+  }
+  return element;
+}
+
+function QName(text_or_uri, tag)
+{
+  if (tag) {
+    text_or_uri = sprintf("{%s}%s", text_or_uri, tag);
+  }
+  this.text = text_or_uri;
+}
+
+QName.prototype.toString = function() {
+  return this.text;
+};
+
+function ElementTree(element)
+{
+  this._root = element;
+}
+
+ElementTree.prototype.getroot = function() {
+  return this._root;
+};
+
+ElementTree.prototype._setroot = function(element) {
+  this._root = element;
+};
+
+ElementTree.prototype.parse = function(source, parser) {
+  if (!parser) {
+    parser = get_parser(constants.DEFAULT_PARSER);
+    parser = new parser.XMLParser(new TreeBuilder());
+  }
+
+  parser.feed(source);
+  this._root = parser.close();
+  return this._root;
+};
+
+ElementTree.prototype.iter = function(tag, callback) {
+  this._root.iter(tag, callback);
+};
+
+ElementTree.prototype.find = function(path) {
+  return this._root.find(path);
+};
+
+ElementTree.prototype.findtext = function(path, defvalue) {
+  return this._root.findtext(path, defvalue);
+};
+
+ElementTree.prototype.findall = function(path) {
+  return this._root.findall(path);
+};
+
+/**
+ * Unlike ElementTree, we don't write to a file, we return you a string.
+ */
+ElementTree.prototype.write = function(options) {
+  var sb = [];
+  options = utils.merge({
+    encoding: 'utf-8',
+    xml_declaration: null,
+    default_namespace: null,
+    method: 'xml'}, options);
+
+  if (options.xml_declaration !== false) {
+    sb.push("<?xml version='1.0' encoding='"+options.encoding +"'?>\n");
+  }
+
+  if (options.method === "text") {
+    _serialize_text(sb, self._root, encoding);
+  }
+  else {
+    var qnames, namespaces, indent, indent_string;
+    var x = _namespaces(this._root, options.encoding, options.default_namespace);
+    qnames = x[0];
+    namespaces = x[1];
+
+    if (options.hasOwnProperty('indent')) {
+      indent = 0;
+      indent_string = new Array(options.indent + 1).join(' ');
+    }
+    else {
+      indent = false;
+    }
+
+    if (options.method === "xml") {
+      _serialize_xml(function(data) {
+        sb.push(data);
+      }, this._root, options.encoding, qnames, namespaces, indent, indent_string);
+    }
+    else {
+      /* TODO: html */
+      throw new Error("unknown serialization method "+ options.method);
+    }
+  }
+
+  return sb.join("");
+};
+
+var _namespace_map = {
+    /* "well-known" namespace prefixes */
+    "http://www.w3.org/XML/1998/namespace": "xml",
+    "http://www.w3.org/1999/xhtml": "html",
+    "http://www.w3.org/1999/02/22-rdf-syntax-ns#": "rdf",
+    "http://schemas.xmlsoap.org/wsdl/": "wsdl",
+    /* xml schema */
+    "http://www.w3.org/2001/XMLSchema": "xs",
+    "http://www.w3.org/2001/XMLSchema-instance": "xsi",
+    /* dublic core */
+    "http://purl.org/dc/elements/1.1/": "dc",
+};
+
+function register_namespace(prefix, uri) {
+  if (/ns\d+$/.test(prefix)) {
+    throw new Error('Prefix format reserved for internal use');
+  }
+
+  if (_namespace_map.hasOwnProperty(uri) && _namespace_map[uri] === prefix) {
+    delete _namespace_map[uri];
+  }
+
+  _namespace_map[uri] = prefix;
+}
+
+
+function _escape(text, encoding, isAttribute, isText) {
+  if (text) {
+    text = text.toString();
+    text = text.replace(/&/g, '&amp;');
+    text = text.replace(/</g, '&lt;');
+    text = text.replace(/>/g, '&gt;');
+    if (!isText) {
+        text = text.replace(/\n/g, '&#xA;');
+        text = text.replace(/\r/g, '&#xD;');
+    }
+    if (isAttribute) {
+      text = text.replace(/"/g, '&quot;');
+    }
+  }
+  return text;
+}
+
+/* TODO: benchmark single regex */
+function _escape_attrib(text, encoding) {
+  return _escape(text, encoding, true);
+}
+
+function _escape_cdata(text, encoding) {
+  return _escape(text, encoding, false);
+}
+
+function _escape_text(text, encoding) {
+  return _escape(text, encoding, false, true);
+}
+
+function _namespaces(elem, encoding, default_namespace) {
+  var qnames = {};
+  var namespaces = {};
+
+  if (default_namespace) {
+    namespaces[default_namespace] = "";
+  }
+
+  function encode(text) {
+    return text;
+  }
+
+  function add_qname(qname) {
+    if (qname[0] === "{") {
+      var tmp = qname.substring(1).split("}", 2);
+      var uri = tmp[0];
+      var tag = tmp[1];
+      var prefix = namespaces[uri];
+
+      if (prefix === undefined) {
+        prefix = _namespace_map[uri];
+        if (prefix === undefined) {
+          prefix = "ns" + Object.keys(namespaces).length;
+        }
+        if (prefix !== "xml") {
+          namespaces[uri] = prefix;
+        }
+      }
+
+      if (prefix) {
+        qnames[qname] = sprintf("%s:%s", prefix, tag);
+      }
+      else {
+        qnames[qname] = tag;
+      }
+    }
+    else {
+      if (default_namespace) {
+        throw new Error('cannot use non-qualified names with default_namespace option');
+      }
+
+      qnames[qname] = qname;
+    }
+  }
+
+
+  elem.iter(null, function(e) {
+    var i;
+    var tag = e.tag;
+    var text = e.text;
+    var items = e.items();
+
+    if (tag instanceof QName && qnames[tag.text] === undefined) {
+      add_qname(tag.text);
+    }
+    else if (typeof(tag) === "string") {
+      add_qname(tag);
+    }
+    else if (tag !== null && tag !== Comment && tag !== CData && tag !== ProcessingInstruction) {
+      throw new Error('Invalid tag type for serialization: '+ tag);
+    }
+
+    if (text instanceof QName && qnames[text.text] === undefined) {
+      add_qname(text.text);
+    }
+
+    items.forEach(function(item) {
+      var key = item[0],
+          value = item[1];
+      if (key instanceof QName) {
+        key = key.text;
+      }
+
+      if (qnames[key] === undefined) {
+        add_qname(key);
+      }
+
+      if (value instanceof QName && qnames[value.text] === undefined) {
+        add_qname(value.text);
+      }
+    });
+  });
+  return [qnames, namespaces];
+}
+
+function _serialize_xml(write, elem, encoding, qnames, namespaces, indent, indent_string) {
+  var tag = elem.tag;
+  var text = elem.text;
+  var items;
+  var i;
+
+  var newlines = indent || (indent === 0);
+  write(Array(indent + 1).join(indent_string));
+
+  if (tag === Comment) {
+    write(sprintf("<!--%s-->", _escape_cdata(text, encoding)));
+  }
+  else if (tag === ProcessingInstruction) {
+    write(sprintf("<?%s?>", _escape_cdata(text, encoding)));
+  }
+  else if (tag === CData) {
+    text = text || '';
+    write(sprintf("<![CDATA[%s]]>", text));
+  }
+  else {
+    tag = qnames[tag];
+    if (tag === undefined) {
+      if (text) {
+        write(_escape_text(text, encoding));
+      }
+      elem.iter(function(e) {
+        _serialize_xml(write, e, encoding, qnames, null, newlines ? indent + 1 : false, indent_string);
+      });
+    }
+    else {
+      write("<" + tag);
+      items = elem.items();
+
+      if (items || namespaces) {
+        items.sort(); // lexical order
+
+        items.forEach(function(item) {
+          var k = item[0],
+              v = item[1];
+
+            if (k instanceof QName) {
+              k = k.text;
+            }
+
+            if (v instanceof QName) {
+              v = qnames[v.text];
+            }
+            else {
+              v = _escape_attrib(v, encoding);
+            }
+            write(sprintf(" %s=\"%s\"", qnames[k], v));
+        });
+
+        if (namespaces) {
+          items = utils.items(namespaces);
+          items.sort(function(a, b) { return a[1] < b[1]; });
+
+          items.forEach(function(item) {
+            var k = item[1],
+                v = item[0];
+
+            if (k) {
+              k = ':' + k;
+            }
+
+            write(sprintf(" xmlns%s=\"%s\"", k, _escape_attrib(v, encoding)));
+          });
+        }
+      }
+
+      if (text || elem.len()) {
+        if (text && text.toString().match(/^\s*$/)) {
+            text = null;
+        }
+
+        write(">");
+        if (!text && newlines) {
+          write("\n");
+        }
+
+        if (text) {
+          write(_escape_text(text, encoding));
+        }
+        elem._children.forEach(function(e) {
+          _serialize_xml(write, e, encoding, qnames, null, newlines ? indent + 1 : false, indent_string);
+        });
+
+        if (!text && indent) {
+          write(Array(indent + 1).join(indent_string));
+        }
+        write("</" + tag + ">");
+      }
+      else {
+        write(" />");
+      }
+    }
+  }
+
+  if (newlines) {
+    write("\n");
+  }
+}
+
+function parse(source, parser) {
+  var tree = new ElementTree();
+  tree.parse(source, parser);
+  return tree;
+}
+
+function tostring(element, options) {
+  return new ElementTree(element).write(options);
+}
+
+exports.PI = ProcessingInstruction;
+exports.Comment = Comment;
+exports.CData = CData;
+exports.ProcessingInstruction = ProcessingInstruction;
+exports.SubElement = SubElement;
+exports.QName = QName;
+exports.ElementTree = ElementTree;
+exports.ElementPath = ElementPath;
+exports.Element = function(tag, attrib) {
+  return new Element(tag, attrib);
+};
+
+exports.XML = function(data) {
+  var et = new ElementTree();
+  return et.parse(data);
+};
+
+exports.parse = parse;
+exports.register_namespace = register_namespace;
+exports.tostring = tostring;
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/errors.js b/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/errors.js
new file mode 100644 (file)
index 0000000..e8742be
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ *  Copyright 2011 Rackspace
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+var util = require('util');
+
+var sprintf = require('./sprintf').sprintf;
+
+function SyntaxError(token, msg) {
+  msg = msg || sprintf('Syntax Error at token %s', token.toString());
+  this.token = token;
+  this.message = msg;
+  Error.call(this, msg);
+}
+
+util.inherits(SyntaxError, Error);
+
+exports.SyntaxError = SyntaxError;
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/parser.js b/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/parser.js
new file mode 100644 (file)
index 0000000..7307ee4
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ *  Copyright 2011 Rackspace
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+/* TODO: support node-expat C++ module optionally */
+
+var util = require('util');
+var parsers = require('./parsers/index');
+
+function get_parser(name) {
+  if (name === 'sax') {
+    return parsers.sax;
+  }
+  else {
+    throw new Error('Invalid parser: ' + name);
+  }
+}
+
+
+exports.get_parser = get_parser;
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/parsers/index.js b/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/parsers/index.js
new file mode 100644 (file)
index 0000000..5eac5c8
--- /dev/null
@@ -0,0 +1 @@
+exports.sax = require('./sax');
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/parsers/sax.js b/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/parsers/sax.js
new file mode 100644 (file)
index 0000000..69b0a59
--- /dev/null
@@ -0,0 +1,56 @@
+var util = require('util');
+
+var sax = require('sax');
+
+var TreeBuilder = require('./../treebuilder').TreeBuilder;
+
+function XMLParser(target) {
+  this.parser = sax.parser(true);
+
+  this.target = (target) ? target : new TreeBuilder();
+
+  this.parser.onopentag = this._handleOpenTag.bind(this);
+  this.parser.ontext = this._handleText.bind(this);
+  this.parser.oncdata = this._handleCdata.bind(this);
+  this.parser.ondoctype = this._handleDoctype.bind(this);
+  this.parser.oncomment = this._handleComment.bind(this);
+  this.parser.onclosetag = this._handleCloseTag.bind(this);
+  this.parser.onerror = this._handleError.bind(this);
+}
+
+XMLParser.prototype._handleOpenTag = function(tag) {
+  this.target.start(tag.name, tag.attributes);
+};
+
+XMLParser.prototype._handleText = function(text) {
+  this.target.data(text);
+};
+
+XMLParser.prototype._handleCdata = function(text) {
+  this.target.data(text);
+};
+
+XMLParser.prototype._handleDoctype = function(text) {
+};
+
+XMLParser.prototype._handleComment = function(comment) {
+};
+
+XMLParser.prototype._handleCloseTag = function(tag) {
+  this.target.end(tag);
+};
+
+XMLParser.prototype._handleError = function(err) {
+  throw err;
+};
+
+XMLParser.prototype.feed = function(chunk) {
+  this.parser.write(chunk);
+};
+
+XMLParser.prototype.close = function() {
+  this.parser.close();
+  return this.target.close();
+};
+
+exports.XMLParser = XMLParser;
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/sprintf.js b/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/sprintf.js
new file mode 100644 (file)
index 0000000..f802c1b
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ *  Copyright 2011 Rackspace
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+var cache = {};
+
+
+// Do any others need escaping?
+var TO_ESCAPE = {
+  '\'': '\\\'',
+  '\n': '\\n'
+};
+
+
+function populate(formatter) {
+  var i, type,
+      key = formatter,
+      prev = 0,
+      arg = 1,
+      builder = 'return \'';
+
+  for (i = 0; i < formatter.length; i++) {
+    if (formatter[i] === '%') {
+      type = formatter[i + 1];
+
+      switch (type) {
+        case 's':
+          builder += formatter.slice(prev, i) + '\' + arguments[' + arg + '] + \'';
+          prev = i + 2;
+          arg++;
+          break;
+        case 'j':
+          builder += formatter.slice(prev, i) + '\' + JSON.stringify(arguments[' + arg + ']) + \'';
+          prev = i + 2;
+          arg++;
+          break;
+        case '%':
+          builder += formatter.slice(prev, i + 1);
+          prev = i + 2;
+          i++;
+          break;
+      }
+
+
+    } else if (TO_ESCAPE[formatter[i]]) {
+      builder += formatter.slice(prev, i) + TO_ESCAPE[formatter[i]];
+      prev = i + 1;
+    }
+  }
+
+  builder += formatter.slice(prev) + '\';';
+  cache[key] = new Function(builder);
+}
+
+
+/**
+ * A fast version of sprintf(), which currently only supports the %s and %j.
+ * This caches a formatting function for each format string that is used, so
+ * you should only use this sprintf() will be called many times with a single
+ * format string and a limited number of format strings will ever be used (in
+ * general this means that format strings should be string literals).
+ *
+ * @param {String} formatter A format string.
+ * @param {...String} var_args Values that will be formatted by %s and %j.
+ * @return {String} The formatted output.
+ */
+exports.sprintf = function(formatter, var_args) {
+  if (!cache[formatter]) {
+    populate(formatter);
+  }
+
+  return cache[formatter].apply(null, arguments);
+};
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/treebuilder.js b/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/treebuilder.js
new file mode 100644 (file)
index 0000000..393a98f
--- /dev/null
@@ -0,0 +1,60 @@
+function TreeBuilder(element_factory) {
+  this._data = [];
+  this._elem = [];
+  this._last = null;
+  this._tail = null;
+  if (!element_factory) {
+    /* evil circular dep */
+    element_factory = require('./elementtree').Element;
+  }
+  this._factory = element_factory;
+}
+
+TreeBuilder.prototype.close = function() {
+  return this._last;
+};
+
+TreeBuilder.prototype._flush = function() {
+  if (this._data) {
+    if (this._last !== null) {
+      var text = this._data.join("");
+      if (this._tail) {
+        this._last.tail = text;
+      }
+      else {
+        this._last.text = text;
+      }
+    }
+    this._data = [];
+  }
+};
+
+TreeBuilder.prototype.data = function(data) {
+  this._data.push(data);
+};
+
+TreeBuilder.prototype.start = function(tag, attrs) {
+  this._flush();
+  var elem = this._factory(tag, attrs);
+  this._last = elem;
+
+  if (this._elem.length) {
+    this._elem[this._elem.length - 1].append(elem);
+  }
+
+  this._elem.push(elem);
+
+  this._tail = null;
+};
+
+TreeBuilder.prototype.end = function(tag) {
+  this._flush();
+  this._last = this._elem.pop();
+  if (this._last.tag !== tag) {
+    throw new Error("end tag mismatch");
+  }
+  this._tail = 1;
+  return this._last;
+};
+
+exports.TreeBuilder = TreeBuilder;
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/utils.js b/config/tizen/tpk-tools/cli/node_modules/elementtree/lib/utils.js
new file mode 100644 (file)
index 0000000..b08a670
--- /dev/null
@@ -0,0 +1,72 @@
+/**
+ *  Copyright 2011 Rackspace
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+/**
+ * @param {Object} hash.
+ * @param {Array} ignored.
+ */
+function items(hash, ignored) {
+  ignored = ignored || null;
+  var k, rv = [];
+
+  function is_ignored(key) {
+    if (!ignored || ignored.length === 0) {
+      return false;
+    }
+
+    return ignored.indexOf(key);
+  }
+
+  for (k in hash) {
+    if (hash.hasOwnProperty(k) && !(is_ignored(ignored))) {
+      rv.push([k, hash[k]]);
+    }
+  }
+
+  return rv;
+}
+
+
+function findall(re, str) {
+  var match, matches = [];
+
+  while ((match = re.exec(str))) {
+      matches.push(match);
+  }
+
+  return matches;
+}
+
+function merge(a, b) {
+  var c = {}, attrname;
+
+  for (attrname in a) {
+    if (a.hasOwnProperty(attrname)) {
+      c[attrname] = a[attrname];
+    }
+  }
+  for (attrname in b) {
+    if (b.hasOwnProperty(attrname)) {
+      c[attrname] = b[attrname];
+    }
+  }
+  return c;
+}
+
+exports.items = items;
+exports.findall = findall;
+exports.merge = merge;
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/package.json b/config/tizen/tpk-tools/cli/node_modules/elementtree/package.json
new file mode 100644 (file)
index 0000000..77dd360
--- /dev/null
@@ -0,0 +1,108 @@
+{
+  "_args": [
+    [
+      {
+        "raw": "elementtree@0.1.6",
+        "scope": null,
+        "escapedName": "elementtree",
+        "name": "elementtree",
+        "rawSpec": "0.1.6",
+        "spec": "0.1.6",
+        "type": "version"
+      },
+      "/home/sumin/iotjs-tpk/cli"
+    ]
+  ],
+  "_from": "elementtree@0.1.6",
+  "_id": "elementtree@0.1.6",
+  "_inCache": true,
+  "_location": "/elementtree",
+  "_npmUser": {
+    "name": "rphillips",
+    "email": "ryan@trolocsis.com"
+  },
+  "_npmVersion": "1.3.24",
+  "_phantomChildren": {},
+  "_requested": {
+    "raw": "elementtree@0.1.6",
+    "scope": null,
+    "escapedName": "elementtree",
+    "name": "elementtree",
+    "rawSpec": "0.1.6",
+    "spec": "0.1.6",
+    "type": "version"
+  },
+  "_requiredBy": [
+    "/"
+  ],
+  "_resolved": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz",
+  "_shasum": "2ac4c46ea30516c8c4cbdb5e3ac7418e592de20c",
+  "_shrinkwrap": null,
+  "_spec": "elementtree@0.1.6",
+  "_where": "/home/sumin/iotjs-tpk/cli",
+  "author": {
+    "name": "Rackspace US, Inc."
+  },
+  "bugs": {
+    "url": "https://github.com/racker/node-elementtree/issues"
+  },
+  "contributors": [
+    {
+      "name": "Paul Querna",
+      "email": "paul.querna@rackspace.com"
+    },
+    {
+      "name": "Tomaz Muraus",
+      "email": "tomaz.muraus@rackspace.com"
+    }
+  ],
+  "dependencies": {
+    "sax": "0.3.5"
+  },
+  "description": "XML Serialization and Parsing module based on Python's ElementTree.",
+  "devDependencies": {
+    "whiskey": "0.8.x"
+  },
+  "directories": {
+    "lib": "lib"
+  },
+  "dist": {
+    "shasum": "2ac4c46ea30516c8c4cbdb5e3ac7418e592de20c",
+    "tarball": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz"
+  },
+  "engines": {
+    "node": ">= 0.4.0"
+  },
+  "homepage": "https://github.com/racker/node-elementtree",
+  "keywords": [
+    "xml",
+    "sax",
+    "parser",
+    "seralization",
+    "elementtree"
+  ],
+  "licenses": [
+    {
+      "type": "Apache",
+      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
+    }
+  ],
+  "main": "lib/elementtree.js",
+  "maintainers": [
+    {
+      "name": "rphillips",
+      "email": "ryan@trolocsis.com"
+    }
+  ],
+  "name": "elementtree",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/racker/node-elementtree.git"
+  },
+  "scripts": {
+    "test": "make test"
+  },
+  "version": "0.1.6"
+}
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/tests/data/xml1.xml b/config/tizen/tpk-tools/cli/node_modules/elementtree/tests/data/xml1.xml
new file mode 100644 (file)
index 0000000..72c33ae
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<container name="test_container_1" xmlns:android="http://schemas.android.com/apk/res/android">
+  <object>dd
+    <name>test_object_1</name>
+    <hash>4281c348eaf83e70ddce0e07221c3d28</hash>
+    <bytes android:type="cool">14</bytes>
+    <content_type>application/octetstream</content_type>
+    <last_modified>2009-02-03T05:26:32.612278</last_modified>
+  </object>
+  <object>
+    <name>test_object_2</name>
+    <hash>b039efe731ad111bc1b0ef221c3849d0</hash>
+    <bytes android:type="lame">64</bytes>
+    <content_type>application/octetstream</content_type>
+    <last_modified>2009-02-03T05:26:32.612278</last_modified>
+  </object>
+</container>
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/tests/data/xml2.xml b/config/tizen/tpk-tools/cli/node_modules/elementtree/tests/data/xml2.xml
new file mode 100644 (file)
index 0000000..5f94bbd
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<object>
+    <title>
+        Hello World
+    </title>
+    <children>
+        <object id="obj1" />
+        <object id="obj2" />
+        <object id="obj3" />
+    </children>
+    <text><![CDATA[
+        Test & Test & Test
+    ]]></text>
+</object>
diff --git a/config/tizen/tpk-tools/cli/node_modules/elementtree/tests/test-simple.js b/config/tizen/tpk-tools/cli/node_modules/elementtree/tests/test-simple.js
new file mode 100644 (file)
index 0000000..1fc04b8
--- /dev/null
@@ -0,0 +1,339 @@
+/**
+ *  Copyright 2011 Rackspace
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+var fs = require('fs');
+var path = require('path');
+
+var sprintf = require('./../lib/sprintf').sprintf;
+var et = require('elementtree');
+var XML = et.XML;
+var ElementTree = et.ElementTree;
+var Element = et.Element;
+var SubElement = et.SubElement;
+var SyntaxError = require('./../lib/errors').SyntaxError;
+
+function readFile(name) {
+  return fs.readFileSync(path.join(__dirname, '/data/', name), 'utf8');
+}
+
+exports['test_simplest'] = function(test, assert) {
+  /* Ported from <https://github.com/lxml/lxml/blob/master/src/lxml/tests/test_elementtree.py> */
+  var Element = et.Element;
+  var root = Element('root');
+  root.append(Element('one'));
+  root.append(Element('two'));
+  root.append(Element('three'));
+  assert.equal(3, root.len());
+  assert.equal('one', root.getItem(0).tag);
+  assert.equal('two', root.getItem(1).tag);
+  assert.equal('three', root.getItem(2).tag);
+  test.finish();
+};
+
+
+exports['test_attribute_values'] = function(test, assert) {
+  var XML = et.XML;
+  var root = XML('<doc alpha="Alpha" beta="Beta" gamma="Gamma"/>');
+  assert.equal('Alpha', root.attrib['alpha']);
+  assert.equal('Beta', root.attrib['beta']);
+  assert.equal('Gamma', root.attrib['gamma']);
+  test.finish();
+};
+
+
+exports['test_findall'] = function(test, assert) {
+  var XML = et.XML;
+  var root = XML('<a><b><c/></b><b/><c><b/></c></a>');
+
+  assert.equal(root.findall("c").length, 1);
+  assert.equal(root.findall(".//c").length, 2);
+  assert.equal(root.findall(".//b").length, 3);
+  assert.equal(root.findall(".//b")[0]._children.length, 1);
+  assert.equal(root.findall(".//b")[1]._children.length, 0);
+  assert.equal(root.findall(".//b")[2]._children.length, 0);
+  assert.deepEqual(root.findall('.//b')[0], root.getchildren()[0]);
+
+  test.finish();
+};
+
+exports['test_find'] = function(test, assert) {
+  var a = Element('a');
+  var b = SubElement(a, 'b');
+  var c = SubElement(a, 'c');
+
+  assert.deepEqual(a.find('./b/..'), a);
+  test.finish();
+};
+
+exports['test_elementtree_find_qname'] = function(test, assert) {
+  var tree = new et.ElementTree(XML('<a><b><c/></b><b/><c><b/></c></a>'));
+  assert.deepEqual(tree.find(new et.QName('c')), tree.getroot()._children[2]);
+  test.finish();
+};
+
+exports['test_attrib_ns_clear'] = function(test, assert) {
+  var attribNS = '{http://foo/bar}x';
+
+  var par = Element('par');
+  par.set(attribNS, 'a');
+  var child = SubElement(par, 'child');
+  child.set(attribNS, 'b');
+
+  assert.equal('a', par.get(attribNS));
+  assert.equal('b', child.get(attribNS));
+
+  par.clear();
+  assert.equal(null, par.get(attribNS));
+  assert.equal('b', child.get(attribNS));
+  test.finish();
+};
+
+exports['test_create_tree_and_parse_simple'] = function(test, assert) {
+  var i = 0;
+  var e = new Element('bar', {});
+  var expected = "<?xml version='1.0' encoding='utf-8'?>\n" +
+    '<bar><blah a="11" /><blah a="12" /><gag a="13" b="abc">ponies</gag></bar>';
+
+  SubElement(e, "blah", {a: 11});
+  SubElement(e, "blah", {a: 12});
+  var se = et.SubElement(e, "gag", {a: '13', b: 'abc'});
+  se.text = 'ponies';
+
+  se.itertext(function(text) {
+    assert.equal(text, 'ponies');
+    i++;
+  });
+
+  assert.equal(i, 1);
+  var etree = new ElementTree(e);
+  var xml = etree.write();
+  assert.equal(xml, expected);
+  test.finish();
+};
+
+exports['test_write_with_options'] = function(test, assert) {
+  var i = 0;
+  var e = new Element('bar', {});
+  var expected1 = "<?xml version='1.0' encoding='utf-8'?>\n" +
+    '<bar>\n' +
+    '    <blah a="11">\n' +
+    '        <baz d="11">test</baz>\n' +
+    '    </blah>\n' +
+    '    <blah a="12" />\n' +
+    '    <gag a="13" b="abc">ponies</gag>\n' +
+    '</bar>\n';
+    var expected2 = "<?xml version='1.0' encoding='utf-8'?>\n" +
+    '<bar>\n' +
+    '  <blah a="11">\n' +
+    '    <baz d="11">test</baz>\n' +
+    '  </blah>\n' +
+    '  <blah a="12" />\n' +
+    '  <gag a="13" b="abc">ponies</gag>\n' +
+    '</bar>\n';
+
+    var expected3 = "<?xml version='1.0' encoding='utf-8'?>\n" +
+    '<object>\n' +
+    '    <title>\n' +
+    '        Hello World\n' +
+    '    </title>\n' +
+    '    <children>\n' +
+    '        <object id="obj1" />\n' +
+    '        <object id="obj2" />\n' +
+    '        <object id="obj3" />\n' +
+    '    </children>\n' +
+    '    <text>\n' +
+    '        Test &amp; Test &amp; Test\n' +
+    '    </text>\n' +
+    '</object>\n';
+
+  var se1 = SubElement(e, "blah", {a: 11});
+  var se2 = SubElement(se1, "baz", {d: 11});
+  se2.text = 'test';
+  SubElement(e, "blah", {a: 12});
+  var se = et.SubElement(e, "gag", {a: '13', b: 'abc'});
+  se.text = 'ponies';
+
+  se.itertext(function(text) {
+    assert.equal(text, 'ponies');
+    i++;
+  });
+
+  assert.equal(i, 1);
+  var etree = new ElementTree(e);
+  var xml1 = etree.write({'indent': 4});
+  var xml2 = etree.write({'indent': 2});
+  assert.equal(xml1, expected1);
+  assert.equal(xml2, expected2);
+
+  var file = readFile('xml2.xml');
+  var etree2 = et.parse(file);
+  var xml3 = etree2.write({'indent': 4});
+  assert.equal(xml3, expected3);
+  test.finish();
+};
+
+exports['test_parse_and_find_2'] = function(test, assert) {
+  var data = readFile('xml1.xml');
+  var etree = et.parse(data);
+
+  assert.equal(etree.findall('./object').length, 2);
+  assert.equal(etree.findall('[@name]').length, 1);
+  assert.equal(etree.findall('[@name="test_container_1"]').length, 1);
+  assert.equal(etree.findall('[@name=\'test_container_1\']').length, 1);
+  assert.equal(etree.findall('./object')[0].findtext('name'), 'test_object_1');
+  assert.equal(etree.findtext('./object/name'), 'test_object_1');
+  assert.equal(etree.findall('.//bytes').length, 2);
+  assert.equal(etree.findall('*/bytes').length, 2);
+  assert.equal(etree.findall('*/foobar').length, 0);
+
+  test.finish();
+};
+
+exports['test_namespaced_attribute'] = function(test, assert) {
+  var data = readFile('xml1.xml');
+  var etree = et.parse(data);
+
+  assert.equal(etree.findall('*/bytes[@android:type="cool"]').length, 1);
+
+  test.finish();
+}
+
+exports['test_syntax_errors'] = function(test, assert) {
+  var expressions = [ './/@bar', '[@bar', '[@foo=bar]', '[@', '/bar' ];
+  var errCount = 0;
+  var data = readFile('xml1.xml');
+  var etree = et.parse(data);
+
+  expressions.forEach(function(expression) {
+    try {
+      etree.findall(expression);
+    }
+    catch (err) {
+      errCount++;
+    }
+  });
+
+  assert.equal(errCount, expressions.length);
+  test.finish();
+};
+
+exports['test_register_namespace'] = function(test, assert){
+  var prefix = 'TESTPREFIX';
+  var namespace = 'http://seriously.unknown/namespace/URI';
+  var errCount = 0;
+
+  var etree = Element(sprintf('{%s}test', namespace));
+  assert.equal(et.tostring(etree, { 'xml_declaration': false}),
+               sprintf('<ns0:test xmlns:ns0="%s" />', namespace));
+
+  et.register_namespace(prefix, namespace);
+  var etree = Element(sprintf('{%s}test', namespace));
+  assert.equal(et.tostring(etree, { 'xml_declaration': false}),
+               sprintf('<%s:test xmlns:%s="%s" />', prefix, prefix, namespace));
+
+  try {
+    et.register_namespace('ns25', namespace);
+  }
+  catch (err) {
+    errCount++;
+  }
+
+  assert.equal(errCount, 1, 'Reserved prefix used, but exception was not thrown');
+  test.finish();
+};
+
+exports['test_tostring'] = function(test, assert) {
+  var a = Element('a');
+  var b = SubElement(a, 'b');
+  var c = SubElement(a, 'c');
+  c.text = 543;
+
+  assert.equal(et.tostring(a, { 'xml_declaration': false }), '<a><b /><c>543</c></a>');
+  assert.equal(et.tostring(c, { 'xml_declaration': false }), '<c>543</c>');
+  test.finish();
+};
+
+exports['test_escape'] = function(test, assert) {
+  var a = Element('a');
+  var b = SubElement(a, 'b');
+  b.text = '&&&&<>"\n\r';
+
+  assert.equal(et.tostring(a, { 'xml_declaration': false }), '<a><b>&amp;&amp;&amp;&amp;&lt;&gt;\"\n\r</b></a>');
+  test.finish();
+};
+
+exports['test_find_null'] = function(test, assert) {
+  var root = Element('root');
+  var node = SubElement(root, 'node');
+  var leaf  = SubElement(node, 'leaf');
+  leaf.text = 'ipsum';
+
+  assert.equal(root.find('node/leaf'), leaf);
+  assert.equal(root.find('no-such-node/leaf'), null);
+  test.finish();
+};
+
+exports['test_findtext_null'] = function(test, assert) {
+  var root = Element('root');
+  var node = SubElement(root, 'node');
+  var leaf  = SubElement(node, 'leaf');
+  leaf.text = 'ipsum';
+
+  assert.equal(root.findtext('node/leaf'), 'ipsum');
+  assert.equal(root.findtext('no-such-node/leaf'), null);
+  test.finish();
+};
+
+exports['test_remove'] = function(test, assert) {
+  var root = Element('root');
+  var node1 = SubElement(root, 'node1');
+  var node2 = SubElement(root, 'node2');
+  var node3 = SubElement(root, 'node3');
+
+  assert.equal(root.len(), 3);
+
+  root.remove(node2);
+
+  assert.equal(root.len(), 2);
+  assert.equal(root.getItem(0).tag, 'node1')
+  assert.equal(root.getItem(1).tag, 'node3')
+
+  test.finish();
+};
+
+exports['test_cdata_write'] = function(test, assert) {
+  var root, etree, xml, values, value, i;
+
+  values = [
+    'if(0>1) then true;',
+    '<test1>ponies hello</test1>',
+    ''
+  ];
+
+  for (i = 0; i < values.length; i++) {
+    value = values[i];
+
+    root = Element('root');
+    root.append(et.CData(value));
+    etree = new ElementTree(root);
+    xml = etree.write({'xml_declaration': false});
+
+    assert.equal(xml, sprintf('<root><![CDATA[%s]]></root>', value));
+  }
+
+  test.finish();
+};
diff --git a/config/tizen/tpk-tools/cli/node_modules/pretty-data/README.md b/config/tizen/tpk-tools/cli/node_modules/pretty-data/README.md
new file mode 100644 (file)
index 0000000..5bec8d7
--- /dev/null
@@ -0,0 +1,78 @@
+# pretty-data - Nodejs plugin
+
+nodejs plugin to **pretty-print** or **minify**
+text in **XML**, **JSON**, **CSS**  and  **SQL** formats.
+
+**Version** - 0.40.0
+
+**Copyright** (c) 2012 Vadim Kiryukhin ( vkiryukhin @ gmail.com )
+
+**Home page:** [http://www.eslinstructor.net/pretty-data/](http://www.eslinstructor.net/pretty-data/) 
+
+**License:** Dual licensed under
+the MIT and GPL licenses:
+
+[http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php)
+
+[http://www.gnu.org/licenses/gpl.html](http://www.gnu.org/licenses/gpl.html)
+
+##Description
+
+* `pd.xml(data )` - pretty print XML; 
+
+* `pd.json(data)` - pretty print JSON; 
+
+* `pd.css(data )` - pretty print CSS; 
+
+* `pd.sql(data )` - pretty print SQL; 
+
+* `pd.xmlmin(data [, preserveComments]) ` - minify XML; 
+
+* `pd.jsonmin(data)` - minify JSON text;
+
+* `pd.cssmin(data [, preserveComments] )` - minify CSS text; 
+
+* `pd.sqlmin(data)` - minify JSON text;
+
+**PARAMETERS:**
+
+`@data` - String; XML, JSON, CSS or SQL text to beautify; 
+
+`@preserveComments` - Bool (optional, used in npp.minxml and npp.mincss only); 
+                       Set this flag to true to prevent removing comments from @data; 
+
+`@Return` - String;
+
+
+**USAGE:**
+
+`var pd = require('pretty-data').pd; `
+
+`var xml_pp = pd.xml(data); `
+
+`var xml_min = pd.xmlmin(data [,true]);` 
+
+`var json_pp = pd.json(data);` 
+
+`var json_min = pd.jsonmin(data);` 
+
+`var css_pp = pd.css(data); `
+
+`var css_min = pd.cssmin(data [, true]);`
+
+`var sql_pp = pd.sql(data);` 
+
+`var sql_min = pd.sqlmin(data);` 
+
+**TEST:**
+
+`node ./test/test_xml 
+
+`node ./test/test_json
+
+`node ./test/test_css
+
+`node ./test/test_sql 
+
+
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/pretty-data/package.json b/config/tizen/tpk-tools/cli/node_modules/pretty-data/package.json
new file mode 100644 (file)
index 0000000..780f98a
--- /dev/null
@@ -0,0 +1,96 @@
+{
+  "_args": [
+    [
+      {
+        "raw": "pretty-data@0.40.0",
+        "scope": null,
+        "escapedName": "pretty-data",
+        "name": "pretty-data",
+        "rawSpec": "0.40.0",
+        "spec": "0.40.0",
+        "type": "version"
+      },
+      "/home/sumin/iotjs-tpk/cli"
+    ]
+  ],
+  "_defaultsLoaded": true,
+  "_engineSupported": true,
+  "_from": "pretty-data@0.40.0",
+  "_id": "pretty-data@0.40.0",
+  "_inCache": true,
+  "_location": "/pretty-data",
+  "_nodeVersion": "v0.4.9",
+  "_npmVersion": "0.2.19",
+  "_phantomChildren": {},
+  "_requested": {
+    "raw": "pretty-data@0.40.0",
+    "scope": null,
+    "escapedName": "pretty-data",
+    "name": "pretty-data",
+    "rawSpec": "0.40.0",
+    "spec": "0.40.0",
+    "type": "version"
+  },
+  "_requiredBy": [
+    "/"
+  ],
+  "_resolved": "https://registry.npmjs.org/pretty-data/-/pretty-data-0.40.0.tgz",
+  "_shasum": "572aa8ea23467467ab94b6b5266a6fd9c8fddd72",
+  "_shrinkwrap": null,
+  "_spec": "pretty-data@0.40.0",
+  "_where": "/home/sumin/iotjs-tpk/cli",
+  "author": {
+    "name": "Vadim Kiryukhin",
+    "email": "vkiryukhin@gmail.com"
+  },
+  "bugs": {
+    "url": "https://github.com/vkiryukhin/pretty-data/issues"
+  },
+  "contributors": [
+    {
+      "name": "Vadim Kiryukhin",
+      "email": "vkiryukhin@gmail.com"
+    }
+  ],
+  "dependencies": {},
+  "description": "plugin to pretty-print or minify XML, JSON, CSS and SQL files",
+  "devDependencies": {},
+  "directories": {},
+  "dist": {
+    "shasum": "572aa8ea23467467ab94b6b5266a6fd9c8fddd72",
+    "tarball": "https://registry.npmjs.org/pretty-data/-/pretty-data-0.40.0.tgz"
+  },
+  "engine": {
+    "node": ">=0.4.9"
+  },
+  "engines": {
+    "node": "*"
+  },
+  "files": [],
+  "homepage": "https://github.com/vkiryukhin/pretty-data#readme",
+  "keywords": [
+    "pretty print",
+    "beautify",
+    "minify",
+    "XML",
+    "JSON",
+    "CSS",
+    "SQL"
+  ],
+  "license": "MIT",
+  "main": "./pretty-data",
+  "maintainers": [
+    {
+      "name": "vkiryukhin",
+      "email": "vkiryukhin@gmail.com"
+    }
+  ],
+  "name": "pretty-data",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+ssh://git@github.com/vkiryukhin/pretty-data.git"
+  },
+  "version": "0.40.0"
+}
diff --git a/config/tizen/tpk-tools/cli/node_modules/pretty-data/pretty-data.js b/config/tizen/tpk-tools/cli/node_modules/pretty-data/pretty-data.js
new file mode 100644 (file)
index 0000000..0723e27
--- /dev/null
@@ -0,0 +1,344 @@
+/**
+* pretty-data - nodejs plugin to pretty-print or minify data in XML, JSON and CSS formats.
+*  
+* Version - 0.40.0
+* Copyright (c) 2012 Vadim Kiryukhin
+* vkiryukhin @ gmail.com
+* http://www.eslinstructor.net/pretty-data/
+* 
+* Dual licensed under the MIT and GPL licenses:
+*   http://www.opensource.org/licenses/mit-license.php
+*   http://www.gnu.org/licenses/gpl.html
+*
+*      pd.xml(data ) - pretty print XML;
+*      pd.json(data) - pretty print JSON;
+*      pd.css(data ) - pretty print CSS;
+*      pd.sql(data)  - pretty print SQL;
+*
+*      pd.xmlmin(data [, preserveComments] ) - minify XML; 
+*      pd.jsonmin(data)                      - minify JSON; 
+*      pd.cssmin(data [, preserveComments] ) - minify CSS; 
+*      pd.sqlmin(data)                       - minify SQL; 
+*
+* PARAMETERS:
+*
+*      @data                   - String; XML, JSON, CSS or SQL text to beautify;
+*      @preserveComments       - Bool (optional, used in minxml and mincss only); 
+*                                Set this flag to true to prevent removing comments from @text; 
+*      @Return                 - String;
+*      
+* USAGE:
+*      
+*      var pd  = require('pretty-data').pd;
+*
+*      var xml_pp   = pd.xml(xml_text);
+*      var xml_min  = pd.xmlmin(xml_text [,true]);
+*      var json_pp  = pd.json(json_text);
+*      var json_min = pd.jsonmin(json_text);
+*      var css_pp   = pd.css(css_text);
+*      var css_min  = pd.cssmin(css_text [, true]);
+*      var sql_pp   = pd.sql(sql_text);
+*      var sql_min  = pd.sqlmin(sql_text);
+*
+* TEST:
+*      comp-name:pretty-data$ node ./test/test_xml
+*      comp-name:pretty-data$ node ./test/test_json
+*      comp-name:pretty-data$ node ./test/test_css
+*      comp-name:pretty-data$ node ./test/test_sql
+*/
+
+
+function pp() {
+       this.shift = ['\n']; // array of shifts
+       this.step = '  ', // 2 spaces
+               maxdeep = 100, // nesting level
+               ix = 0;
+
+       // initialize array with shifts //
+       for(ix=0;ix<maxdeep;ix++){
+               this.shift.push(this.shift[ix]+this.step); 
+       }
+
+};     
+       
+// ----------------------- XML section ----------------------------------------------------
+
+pp.prototype.xml = function(text) {
+
+       var ar = text.replace(/>\s{0,}</g,"><")
+                                .replace(/</g,"~::~<")
+                                .replace(/xmlns\:/g,"~::~xmlns:")
+                                .replace(/xmlns\=/g,"~::~xmlns=")
+                                .split('~::~'),
+               len = ar.length,
+               inComment = false,
+               deep = 0,
+               str = '',
+               ix = 0;
+
+               for(ix=0;ix<len;ix++) {
+                       // start comment or <![CDATA[...]]> or <!DOCTYPE //
+                       if(ar[ix].search(/<!/) > -1) { 
+                               str += this.shift[deep]+ar[ix];
+                               inComment = true; 
+                               // end comment  or <![CDATA[...]]> //
+                               if(ar[ix].search(/-->/) > -1 || ar[ix].search(/\]>/) > -1 || ar[ix].search(/!DOCTYPE/) > -1 ) { 
+                                       inComment = false; 
+                               }
+                       } else 
+                       // end comment  or <![CDATA[...]]> //
+                       if(ar[ix].search(/-->/) > -1 || ar[ix].search(/\]>/) > -1) { 
+                               str += ar[ix];
+                               inComment = false; 
+                       } else 
+                       // <elm></elm> //
+                       if( /^<\w/.exec(ar[ix-1]) && /^<\/\w/.exec(ar[ix]) &&
+                               /^<[\w:\-\.\,]+/.exec(ar[ix-1]) == /^<\/[\w:\-\.\,]+/.exec(ar[ix])[0].replace('/','')) { 
+                               str += ar[ix];
+                               if(!inComment) deep--;
+                       } else
+                        // <elm> //
+                       if(ar[ix].search(/<\w/) > -1 && ar[ix].search(/<\//) == -1 && ar[ix].search(/\/>/) == -1 ) {
+                               str = !inComment ? str += this.shift[deep++]+ar[ix] : str += ar[ix];
+                       } else 
+                        // <elm>...</elm> //
+                       if(ar[ix].search(/<\w/) > -1 && ar[ix].search(/<\//) > -1) {
+                               str = !inComment ? str += this.shift[deep]+ar[ix] : str += ar[ix];
+                       } else 
+                       // </elm> //
+                       if(ar[ix].search(/<\//) > -1) { 
+                               str = !inComment ? str += this.shift[--deep]+ar[ix] : str += ar[ix];
+                       } else 
+                       // <elm/> //
+                       if(ar[ix].search(/\/>/) > -1 ) { 
+                               str = !inComment ? str += this.shift[deep]+ar[ix] : str += ar[ix];
+                       } else 
+                       // <? xml ... ?> //
+                       if(ar[ix].search(/<\?/) > -1) { 
+                               str += this.shift[deep]+ar[ix];
+                       } else 
+                       // xmlns //
+                       if( ar[ix].search(/xmlns\:/) > -1  || ar[ix].search(/xmlns\=/) > -1) { 
+                               str += this.shift[deep]+ar[ix];
+                       } 
+                       
+                       else {
+                               str += ar[ix];
+                       }
+               }
+               
+       return  (str[0] == '\n') ? str.slice(1) : str;
+}
+
+// ----------------------- JSON section ----------------------------------------------------
+
+pp.prototype.json = function(text) {
+
+       if ( typeof text === "string" ) {
+               return JSON.stringify(JSON.parse(text), null, this.step);
+       }
+       if ( typeof text === "object" ) {
+               return JSON.stringify(text, null, this.step);
+       }
+       return null;
+}
+
+// ----------------------- CSS section ----------------------------------------------------
+
+pp.prototype.css = function(text) {
+
+       var ar = text.replace(/\s{1,}/g,' ')
+                               .replace(/\{/g,"{~::~")
+                               .replace(/\}/g,"~::~}~::~")
+                               .replace(/\;/g,";~::~")
+                               .replace(/\/\*/g,"~::~/*")
+                               .replace(/\*\//g,"*/~::~")
+                               .replace(/~::~\s{0,}~::~/g,"~::~")
+                               .split('~::~'),
+               len = ar.length,
+               deep = 0,
+               str = '',
+               ix = 0;
+               
+               for(ix=0;ix<len;ix++) {
+
+                       if( /\{/.exec(ar[ix]))  { 
+                               str += this.shift[deep++]+ar[ix];
+                       } else 
+                       if( /\}/.exec(ar[ix]))  { 
+                               str += this.shift[--deep]+ar[ix];
+                       } else
+                       if( /\*\\/.exec(ar[ix]))  { 
+                               str += this.shift[deep]+ar[ix];
+                       }
+                       else {
+                               str += this.shift[deep]+ar[ix];
+                       }
+               }
+               return str.replace(/^\n{1,}/,'');
+}
+
+// ----------------------- SQL section ----------------------------------------------------
+
+function isSubquery(str, parenthesisLevel) {
+  return  parenthesisLevel - (str.replace(/\(/g,'').length - str.replace(/\)/g,'').length )
+}
+
+function split_sql(str, tab) {
+
+    return str.replace(/\s{1,}/g," ")
+
+        .replace(/ AND /ig,"~::~"+tab+tab+"AND ")
+        .replace(/ BETWEEN /ig,"~::~"+tab+"BETWEEN ")
+        .replace(/ CASE /ig,"~::~"+tab+"CASE ")
+        .replace(/ ELSE /ig,"~::~"+tab+"ELSE ")
+        .replace(/ END /ig,"~::~"+tab+"END ")
+        .replace(/ FROM /ig,"~::~FROM ")
+        .replace(/ GROUP\s{1,}BY/ig,"~::~GROUP BY ")
+        .replace(/ HAVING /ig,"~::~HAVING ")
+        //.replace(/ IN /ig,"~::~"+tab+"IN ")
+        .replace(/ IN /ig," IN ")
+        .replace(/ JOIN /ig,"~::~JOIN ")
+        .replace(/ CROSS~::~{1,}JOIN /ig,"~::~CROSS JOIN ")
+        .replace(/ INNER~::~{1,}JOIN /ig,"~::~INNER JOIN ")
+        .replace(/ LEFT~::~{1,}JOIN /ig,"~::~LEFT JOIN ")
+        .replace(/ RIGHT~::~{1,}JOIN /ig,"~::~RIGHT JOIN ")
+        .replace(/ ON /ig,"~::~"+tab+"ON ")
+        .replace(/ OR /ig,"~::~"+tab+tab+"OR ")
+        .replace(/ ORDER\s{1,}BY/ig,"~::~ORDER BY ")
+        .replace(/ OVER /ig,"~::~"+tab+"OVER ")
+        .replace(/\(\s{0,}SELECT /ig,"~::~(SELECT ")
+        .replace(/\)\s{0,}SELECT /ig,")~::~SELECT ")
+        .replace(/ THEN /ig," THEN~::~"+tab+"")
+        .replace(/ UNION /ig,"~::~UNION~::~")
+        .replace(/ USING /ig,"~::~USING ")
+        .replace(/ WHEN /ig,"~::~"+tab+"WHEN ")
+        .replace(/ WHERE /ig,"~::~WHERE ")
+        .replace(/ WITH /ig,"~::~WITH ")
+        //.replace(/\,\s{0,}\(/ig,",~::~( ")
+        //.replace(/\,/ig,",~::~"+tab+tab+"")
+        .replace(/ ALL /ig," ALL ")
+        .replace(/ AS /ig," AS ")
+        .replace(/ ASC /ig," ASC ") 
+        .replace(/ DESC /ig," DESC ") 
+        .replace(/ DISTINCT /ig," DISTINCT ")
+        .replace(/ EXISTS /ig," EXISTS ")
+        .replace(/ NOT /ig," NOT ")
+        .replace(/ NULL /ig," NULL ")
+        .replace(/ LIKE /ig," LIKE ")
+        .replace(/\s{0,}SELECT /ig,"SELECT ")
+        .replace(/~::~{1,}/g,"~::~")
+        .split('~::~');
+}
+
+pp.prototype.sql = function(text) {
+
+    var ar_by_quote = text.replace(/\s{1,}/g," ")
+                        .replace(/\'/ig,"~::~\'")
+                        .split('~::~'),
+        len = ar_by_quote.length,
+        ar = [],
+        deep = 0,
+        tab = this.step,//+this.step,
+        inComment = true,
+        inQuote = false,
+        parenthesisLevel = 0,
+        str = '',
+        ix = 0;
+
+    for(ix=0;ix<len;ix++) {
+
+        if(ix%2) {
+            ar = ar.concat(ar_by_quote[ix]);
+        } else {
+            ar = ar.concat(split_sql(ar_by_quote[ix], tab) );
+        }
+    }
+
+    len = ar.length;
+    for(ix=0;ix<len;ix++) {
+
+        parenthesisLevel = isSubquery(ar[ix], parenthesisLevel);
+
+        if( /\s{0,}\s{0,}SELECT\s{0,}/.exec(ar[ix]))  { 
+            ar[ix] = ar[ix].replace(/\,/g,",\n"+tab+tab+"")
+        } 
+
+        if( /\s{0,}\(\s{0,}SELECT\s{0,}/.exec(ar[ix]))  { 
+            deep++;
+            str += this.shift[deep]+ar[ix];
+        } else 
+        if( /\'/.exec(ar[ix]) )  { 
+            if(parenthesisLevel<1 && deep) {
+                deep--;
+            }
+            str += ar[ix];
+        }
+        else  { 
+            str += this.shift[deep]+ar[ix];
+            if(parenthesisLevel<1 && deep) {
+                deep--;
+            }
+        } 
+    }
+
+    str = str.replace(/^\n{1,}/,'').replace(/\n{1,}/g,"\n");
+    return str;
+}
+
+// ----------------------- min section ----------------------------------------------------
+
+pp.prototype.xmlmin = function(text, preserveComments) {
+
+       var str = preserveComments ? text
+                                  : text.replace(/\<![ \r\n\t]*(--([^\-]|[\r\n]|-[^\-])*--[ \r\n\t]*)\>/g,"");
+       return  str.replace(/>\s{0,}</g,"><"); 
+}
+
+pp.prototype.jsonmin = function(text) {
+                                                                 
+    return  text.replace(/\s{0,}\{\s{0,}/g,"{")
+                .replace(/\s{0,}\[$/g,"[")
+                .replace(/\[\s{0,}/g,"[")
+                .replace(/:\s{0,}\[/g,':[')
+                .replace(/\s{0,}\}\s{0,}/g,"}")
+                .replace(/\s{0,}\]\s{0,}/g,"]")
+                .replace(/\"\s{0,}\,/g,'",')
+                .replace(/\,\s{0,}\"/g,',"')
+                .replace(/\"\s{0,}:/g,'":')
+                .replace(/:\s{0,}\"/g,':"')
+                .replace(/:\s{0,}\[/g,':[')
+                .replace(/\,\s{0,}\[/g,',[')
+                .replace(/\,\s{2,}/g,', ')
+                .replace(/\]\s{0,},\s{0,}\[/g,'],[');   
+}
+
+pp.prototype.cssmin = function(text, preserveComments) {
+       
+       var str = preserveComments ? text
+                                  : text.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g,"") ;
+       return str.replace(/\s{1,}/g,' ')
+                         .replace(/\{\s{1,}/g,"{")
+                         .replace(/\}\s{1,}/g,"}")
+                         .replace(/\;\s{1,}/g,";")
+                         .replace(/\/\*\s{1,}/g,"/*")
+                         .replace(/\*\/\s{1,}/g,"*/");
+}      
+
+pp.prototype.sqlmin = function(text) {
+    return text.replace(/\s{1,}/g," ").replace(/\s{1,}\(/,"(").replace(/\s{1,}\)/,")");
+}
+
+// --------------------------------------------------------------------------------------------
+
+exports.pd= new pp;    
+
+
+
+
+
+
+
+
+
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/pretty-data/test/test_css.js b/config/tizen/tpk-tools/cli/node_modules/pretty-data/test/test_css.js
new file mode 100644 (file)
index 0000000..d702415
--- /dev/null
@@ -0,0 +1,12 @@
+       
+var css   = '.headbg{margin:0 8px;display:none; }a:link,a:focus{   color:#00c }\n /* comment */ a:active{   color:red }',
+    pp_css  = require('../pretty-data').pd.css(css),
+    pp_cssmin_com  = require('../pretty-data').pd.cssmin(css,true),
+    pp_cssmin  = require('../pretty-data').pd.cssmin(css);
+
+console.log('\n==============================================================================\n');
+console.log('\n/*------- Original CSS string: -------*/\n\n' + css + '\n');
+console.log('\n/*------- Beautified original CSS -------------*/\n\n' + pp_css  + '\n');
+console.log('\n/*------- Minified original CSS with preserved comments: -------*/\n\n' + pp_cssmin_com + '\n');
+console.log('\n/*------- Minified original CSS with deleted comments: ---------*/\n\n' + pp_cssmin + '\n');
+console.log('\n===============================================================================\n');
diff --git a/config/tizen/tpk-tools/cli/node_modules/pretty-data/test/test_json.js b/config/tizen/tpk-tools/cli/node_modules/pretty-data/test/test_json.js
new file mode 100644 (file)
index 0000000..8022c10
--- /dev/null
@@ -0,0 +1,10 @@
+       
+var json  = '{"menu":{"id": "file","value": \n[[1,2,3],[4,5,6] ],\n"popup":{"menuitem":[{"value":    ["one","two"],\n"onclick":"CreateNewDoc()"},{"value":"Close","onclick":"CloseDoc()"}]}}}',
+    json_pp  = require('../pretty-data').pd.json(json),
+    json_min  = require('../pretty-data').pd.jsonmin(json);
+
+console.log('\n==============================================================================\n');
+console.log('\n/*------- Original JSON string: -------*/\n\n' + json + '\n');
+console.log('\n/*------- Beautified JSON: -------------*/\n\n' + json_pp  + '\n');
+console.log('\n/*------- Minified JSON: ---------------*/\n\n' + json_min + '\n');
+console.log('\n===============================================================================\n');
diff --git a/config/tizen/tpk-tools/cli/node_modules/pretty-data/test/test_sql.js b/config/tizen/tpk-tools/cli/node_modules/pretty-data/test/test_sql.js
new file mode 100644 (file)
index 0000000..35fa1f0
--- /dev/null
@@ -0,0 +1,10 @@
+       
+var sql  = "select ca.proj_id as proj_id, ca.ca_name as proj_name, ca.ca_date_start as proj_start, ca.ca_date_end AS proj_end,\n(select COUNT(*)  from rotations r \nwhere r.proj_id = proj_id and r.r_status = 'R' \ngroup by r.proj_id) r_count, \n(select count(*) from rotations r \nwhere r.proj_id = proj_id and r.channel_id = 24) r_rtb_count \nfrom projs ca, clients c, proj_auth caa \nwhere ca.client_id = 12345 and ca.client_id = c.client_id and ca_type = 'zzz' \nand c.agency_id = 0 and ca.client_id = NVL( caa.client_id, ca.client_id) \nand proj_id = NVL( caa.proj_id, proj_id) and caa.contact_id = 7890";
+var sql_pp  = require('../pretty-data').pd.sql(sql);
+var sql_min  = require('../pretty-data').pd.sqlmin(sql);
+
+console.log('\n==============================================================================\n');
+console.log('\n/*------- Original SQL string: -------*/\n\n' + sql + '\n');
+console.log('\n/*------- Beautified SQL: -------------*/\n\n' + sql_pp  + '\n');
+console.log('\n/*------- Minified SQL: ---------------*/\n\n' + sql_min + '\n');
+console.log('\n===============================================================================\n');
diff --git a/config/tizen/tpk-tools/cli/node_modules/pretty-data/test/test_xml.js b/config/tizen/tpk-tools/cli/node_modules/pretty-data/test/test_xml.js
new file mode 100644 (file)
index 0000000..7ac1322
--- /dev/null
@@ -0,0 +1,12 @@
+       
+var xml = '<?xml version="1.0" encoding="UTF-8" ?>      <!DOCTYPE foo SYSTEM "Foo.dtd"><a>          <b>bbb</b>   <!-- comment --><c/><d><soapenv:Envelope xmlns:soapenv="http://xxx" xmlns:xsd="http://yyy" xmlns:xsi="http://zzz"></soapenv>       </d><e>        <![CDATA[ <z></z> ]]></e><f><g></g></f></a>',
+    pp_xml  = require('../pretty-data').pd.xml(xml),
+    pp_xmlmin_com  = require('../pretty-data').pd.xmlmin(xml,true),
+    pp_xmlmin  = require('../pretty-data').pd.xmlmin(xml);
+
+console.log('\n==============================================================================\n');
+console.log('\n/*------- Original XML string: -------*/\n\n' + xml + '\n');
+console.log('\n/*------- Beautified XML -------------*/\n\n' + pp_xml  + '\n');
+console.log('\n/*------- Minified XML with preserved comments: -------*/\n\n' + pp_xmlmin_com + '\n');
+console.log('\n/*------- Minified XML with deleted comments: ---------*/\n\n' + pp_xmlmin + '\n');
+console.log('\n===============================================================================\n');
diff --git a/config/tizen/tpk-tools/cli/node_modules/q/CHANGES.md b/config/tizen/tpk-tools/cli/node_modules/q/CHANGES.md
new file mode 100644 (file)
index 0000000..cd351fd
--- /dev/null
@@ -0,0 +1,786 @@
+
+## 1.4.1
+
+ - Address an issue that prevented Q from being used as a `<script>` for
+   Firefox add-ons. Q can now be used in any environment that provides `window`
+   or `self` globals, favoring `window` since add-ons have an an immutable
+   `self` that is distinct from `window`.
+
+## 1.4.0
+
+ - Add `noConflict` support for use in `<script>` (@jahnjw).
+
+## 1.3.0
+
+ - Add tracking for unhandled and handled rejections in Node.js (@benjamingr).
+
+## 1.2.1
+
+ - Fix Node.js environment detection for modern Browserify (@kahnjw).
+
+## 1.2.0
+
+ - Added Q.any(promisesArray) method (@vergara).
+   Returns a promise fulfilled with the value of the first resolved promise in
+   promisesArray. If all promises in promisesArray are rejected, it returns
+   a rejected promise.
+
+## 1.1.2
+
+ - Removed extraneous files from the npm package by using the "files"
+   whitelist in package.json instead of the .npmignore blacklist.
+   (@anton-rudeshko)
+
+## 1.1.1
+
+ - Fix a pair of regressions in bootstrapping, one which precluded
+   WebWorker support, and another that precluded support in
+   ``<script>`` usage outright. #607
+
+## 1.1.0
+
+ - Adds support for enabling long stack traces in node.js by setting
+   environment variable `Q_DEBUG=1`.
+ - Introduces the `tap` method to promises, which will see a value
+   pass through without alteration.
+ - Use instanceof to recognize own promise instances as opposed to
+   thenables.
+ - Construct timeout errors with `code === ETIMEDOUT` (Kornel Lesiński)
+ - More descriminant CommonJS module environment detection.
+ - Dropped continuous integration for Node.js 0.6 and 0.8 because of
+   changes to npm that preclude the use of new `^` version predicate
+   operator in any transitive dependency.
+ - Users can now override `Q.nextTick`.
+
+## 1.0.1
+
+ - Adds support for `Q.Promise`, which implements common usage of the
+   ES6 `Promise` constructor and its methods. `Promise` does not have
+   a valid promise constructor and a proper implementation awaits
+   version 2 of Q.
+ - Removes the console stopgap for a promise inspector. This no longer
+   works with any degree of reliability.
+ - Fixes support for content security policies that forbid eval. Now
+   using the `StopIteration` global to distinguish SpiderMonkey
+   generators from ES6 generators, assuming that they will never
+   coexist.
+
+## 1.0.0
+
+:cake: This is all but a re-release of version 0.9, which has settled
+into a gentle maintenance mode and rightly deserves an official 1.0.
+An ambitious 2.0 release is already around the corner, but 0.9/1.0
+have been distributed far and wide and demand long term support.
+
+ - Q will now attempt to post a debug message in browsers regardless
+   of whether window.Touch is defined. Chrome at least now has this
+   property regardless of whether touch is supported by the underlying
+   hardware.
+ - Remove deprecation warning from `promise.valueOf`. The function is
+   called by the browser in various ways so there is no way to
+   distinguish usage that should be migrated from usage that cannot be
+   altered.
+
+## 0.9.7
+
+ - :warning: `q.min.js` is no longer checked-in.  It is however still
+   created by Grunt and NPM.
+ - Fixes a bug that inhibited `Q.async` with implementations of the new
+   ES6 generators.
+ - Fixes a bug with `nextTick` affecting Safari 6.0.5 the first time a
+   page loads when an `iframe` is involved.
+ - Introduces `passByCopy`, `join`, and `race`.
+ - Shows stack traces or error messages on the console, instead of
+   `Error` objects.
+ - Elimintates wrapper methods for improved performance.
+ - `Q.all` now propagates progress notifications of the form you might
+   expect of ES6 iterations, `{value, index}` where the `value` is the
+   progress notification from the promise at `index`.
+
+## 0.9.6
+
+ - Fixes a bug in recognizing the difference between compatible Q
+   promises, and Q promises from before the implementation of "inspect".
+   The latter are now coerced.
+ - Fixes an infinite asynchronous coercion cycle introduced by former
+   solution, in two independently sufficient ways.  1.) All promises
+   returned by makePromise now implement "inspect", albeit a default
+   that reports that the promise has an "unknown" state.  2.) The
+   implementation of "then/when" is now in "then" instead of "when", so
+   that the responsibility to "coerce" the given promise rests solely in
+   the "when" method and the "then" method may assume that "this" is a
+   promise of the right type.
+ - Refactors `nextTick` to use an unrolled microtask within Q regardless
+   of how new ticks a requested. #316 @rkatic
+
+## 0.9.5
+
+ - Introduces `inspect` for getting the state of a promise as
+   `{state: "fulfilled" | "rejected" | "pending", value | reason}`.
+ - Introduces `allSettled` which produces an array of promises states
+   for the input promises once they have all "settled".  This is in
+   accordance with a discussion on Promises/A+ that "settled" refers to
+   a promise that is "fulfilled" or "rejected".  "resolved" refers to a
+   deferred promise that has been "resolved" to another promise,
+   "sealing its fate" to the fate of the successor promise.
+ - Long stack traces are now off by default.  Set `Q.longStackSupport`
+   to true to enable long stack traces.
+ - Long stack traces can now follow the entire asynchronous history of a
+   promise, not just a single jump.
+ - Introduces `spawn` for an immediately invoked asychronous generator.
+   @jlongster
+ - Support for *experimental* synonyms `mapply`, `mcall`, `nmapply`,
+   `nmcall` for method invocation.
+
+## 0.9.4
+
+ - `isPromise` and `isPromiseAlike` now always returns a boolean
+   (even for falsy values). #284 @lfac-pt
+ - Support for ES6 Generators in `async` #288 @andywingo
+ - Clear duplicate promise rejections from dispatch methods #238 @SLaks
+ - Unhandled rejection API #296 @domenic
+   `stopUnhandledRejectionTracking`, `getUnhandledReasons`,
+   `resetUnhandledRejections`.
+
+## 0.9.3
+
+ - Add the ability to give `Q.timeout`'s errors a custom error message. #270
+   @jgrenon
+ - Fix Q's call-stack busting behavior in Node.js 0.10, by switching from
+   `process.nextTick` to `setImmediate`. #254 #259
+ - Fix Q's behavior when used with the Mocha test runner in the browser, since
+   Mocha introduces a fake `process` global without a `nextTick` property. #267
+ - Fix some, but not all, cases wherein Q would give false positives in its
+   unhandled rejection detection (#252). A fix for other cases (#238) is
+   hopefully coming soon.
+ - Made `Q.promise` throw early if given a non-function.
+
+## 0.9.2
+
+ - Pass through progress notifications when using `timeout`. #229 @omares
+ - Pass through progress notifications when using `delay`.
+ - Fix `nbind` to actually bind the `thisArg`. #232 @davidpadbury
+
+## 0.9.1
+
+ - Made the AMD detection compatible with the RequireJS optimizer's `namespace`
+   option. #225 @terinjokes
+ - Fix side effects from `valueOf`, and thus from `isFulfilled`, `isRejected`,
+   and `isPending`. #226 @benjamn
+
+## 0.9.0
+
+This release removes many layers of deprecated methods and brings Q closer to
+alignment with Mark Miller’s TC39 [strawman][] for concurrency. At the same
+time, it fixes many bugs and adds a few features around error handling. Finally,
+it comes with an updated and comprehensive [API Reference][].
+
+[strawman]: http://wiki.ecmascript.org/doku.php?id=strawman:concurrency
+[API Reference]: https://github.com/kriskowal/q/wiki/API-Reference
+
+### API Cleanup
+
+The following deprecated or undocumented methods have been removed.
+Their replacements are listed here:
+
+<table>
+   <thead>
+      <tr>
+         <th>0.8.x method</th>
+         <th>0.9 replacement</th>
+      </tr>
+   </thead>
+   <tbody>
+      <tr>
+         <td><code>Q.ref</code></td>
+         <td><code>Q</code></td>
+      </tr>
+      <tr>
+         <td><code>call</code>, <code>apply</code>, <code>bind</code> (*)</td>
+         <td><code>fcall</code>/<code>invoke</code>, <code>fapply</code>/<code>post</code>, <code>fbind</code></td>
+      </tr>
+      <tr>
+         <td><code>ncall</code>, <code>napply</code> (*)</td>
+         <td><code>nfcall</code>/<code>ninvoke</code>, <code>nfapply</code>/<code>npost</code></td>
+      </tr>
+      <tr>
+         <td><code>end</code></td>
+         <td><code>done</code></td>
+      </tr>
+      <tr>
+         <td><code>put</code></td>
+         <td><code>set</code></td>
+      </tr>
+      <tr>
+         <td><code>node</code></td>
+         <td><code>nbind</code></td>
+      </tr>
+      <tr>
+         <td><code>nend</code></td>
+         <td><code>nodeify</code></td>
+      </tr>
+      <tr>
+         <td><code>isResolved</code></td>
+         <td><code>isPending</code></td>
+      </tr>
+      <tr>
+         <td><code>deferred.node</code></td>
+         <td><code>deferred.makeNodeResolver</code></td>
+      </tr>
+      <tr>
+         <td><code>Method</code>, <code>sender</code></td>
+         <td><code>dispatcher</code></td>
+      </tr>
+      <tr>
+         <td><code>send</code></td>
+         <td><code>dispatch</code></td>
+      </tr>
+      <tr>
+         <td><code>view</code>, <code>viewInfo</code></td>
+         <td>(none)</td>
+      </tr>
+   </tbody>
+</table>
+
+
+(*) Use of ``thisp`` is discouraged. For calling methods, use ``post`` or
+``invoke``.
+
+### Alignment with the Concurrency Strawman
+
+-   Q now exports a `Q(value)` function, an alias for `resolve`.
+    `Q.call`, `Q.apply`, and `Q.bind` were removed to make room for the
+    same methods on the function prototype.
+-   `invoke` has been aliased to `send` in all its forms.
+-   `post` with no method name acts like `fapply`.
+
+### Error Handling
+
+-   Long stack traces can be turned off by setting `Q.stackJumpLimit` to zero.
+    In the future, this property will be used to fine tune how many stack jumps
+    are retained in long stack traces; for now, anything nonzero is treated as
+    one (since Q only tracks one stack jump at the moment, see #144). #168
+-   In Node.js, if there are unhandled rejections when the process exits, they
+    are output to the console. #115
+
+### Other
+
+-   `delete` and `set` (née `put`) no longer have a fulfillment value.
+-   Q promises are no longer frozen, which
+    [helps with performance](http://code.google.com/p/v8/issues/detail?id=1858).
+-   `thenReject` is now included, as a counterpart to `thenResolve`.
+-   The included browser `nextTick` shim is now faster. #195 @rkatic.
+
+### Bug Fixes
+
+-   Q now works in Internet Explorer 10. #186 @ForbesLindesay
+-   `fbind` no longer hard-binds the returned function's `this` to `undefined`.
+    #202
+-   `Q.reject` no longer leaks memory. #148
+-   `npost` with no arguments now works. #207
+-   `allResolved` now works with non-Q promises ("thenables"). #179
+-   `keys` behavior is now correct even in browsers without native
+    `Object.keys`. #192 @rkatic
+-   `isRejected` and the `exception` property now work correctly if the
+    rejection reason is falsy. #198
+
+### Internals and Advanced
+
+-   The internal interface for a promise now uses
+    `dispatchPromise(resolve, op, operands)` instead of `sendPromise(op,
+    resolve, ...operands)`, which reduces the cases where Q needs to do
+    argument slicing.
+-   The internal protocol uses different operands. "put" is now "set".
+    "del" is now "delete". "view" and "viewInfo" have been removed.
+-   `Q.fulfill` has been added. It is distinct from `Q.resolve` in that
+    it does not pass promises through, nor coerces promises from other
+    systems. The promise becomes the fulfillment value. This is only
+    recommended for use when trying to fulfill a promise with an object that has
+    a `then` function that is at the same time not a promise.
+
+## 0.8.12
+- Treat foreign promises as unresolved in `Q.isFulfilled`; this lets `Q.all`
+  work on arrays containing foreign promises. #154
+- Fix minor incompliances with the [Promises/A+ spec][] and [test suite][]. #157
+  #158
+
+[Promises/A+ spec]: http://promises-aplus.github.com/promises-spec/
+[test suite]: https://github.com/promises-aplus/promises-tests
+
+## 0.8.11
+
+ - Added ``nfcall``, ``nfapply``, and ``nfbind`` as ``thisp``-less versions of
+   ``ncall``, ``napply``, and ``nbind``. The latter are now deprecated. #142
+ - Long stack traces no longer cause linearly-growing memory usage when chaining
+   promises together. #111
+ - Inspecting ``error.stack`` in a rejection handler will now give a long stack
+   trace. #103
+ - Fixed ``Q.timeout`` to clear its timeout handle when the promise is rejected;
+   previously, it kept the event loop alive until the timeout period expired.
+   #145 @dfilatov
+ - Added `q/queue` module, which exports an infinite promise queue
+   constructor.
+
+## 0.8.10
+
+ - Added ``done`` as a replacement for ``end``, taking the usual fulfillment,
+   rejection, and progress handlers. It's essentially equivalent to
+   ``then(f, r, p).end()``.
+ - Added ``Q.onerror``, a settable error trap that you can use to get full stack
+   traces for uncaught errors. #94
+ - Added ``thenResolve`` as a shortcut for returning a constant value once a
+   promise is fulfilled. #108 @ForbesLindesay
+ - Various tweaks to progress notification, including propagation and
+   transformation of progress values and only forwarding a single progress
+   object.
+ - Renamed ``nend`` to ``nodeify``. It no longer returns an always-fulfilled
+   promise when a Node callback is passed.
+ - ``deferred.resolve`` and ``deferred.reject`` no longer (sometimes) return
+   ``deferred.promise``.
+ - Fixed stack traces getting mangled if they hit ``end`` twice. #116 #121 @ef4
+ - Fixed ``ninvoke`` and ``npost`` to work on promises for objects with Node
+   methods. #134
+ - Fixed accidental coercion of objects with nontrivial ``valueOf`` methods,
+   like ``Date``s, by the promise's ``valueOf`` method. #135
+ - Fixed ``spread`` not calling the passed rejection handler if given a rejected
+   promise.
+
+## 0.8.9
+
+ - Added ``nend``
+ - Added preliminary progress notification support, via
+   ``promise.then(onFulfilled, onRejected, onProgress)``,
+   ``promise.progress(onProgress)``, and ``deferred.notify(...progressData)``.
+ - Made ``put`` and ``del`` return the object acted upon for easier chaining.
+   #84
+ - Fixed coercion cycles with cooperating promises. #106
+
+## 0.8.7
+
+ - Support [Montage Require](http://github.com/kriskowal/mr)
+
+## 0.8.6
+
+ - Fixed ``npost`` and ``ninvoke`` to pass the correct ``thisp``. #74
+ - Fixed various cases involving unorthodox rejection reasons. #73 #90
+   @ef4
+ - Fixed double-resolving of misbehaved custom promises. #75
+ - Sped up ``Q.all`` for arrays contain already-resolved promises or scalar
+   values. @ForbesLindesay
+ - Made stack trace filtering work when concatenating assets. #93 @ef4
+ - Added warnings for deprecated methods. @ForbesLindesay
+ - Added ``.npmignore`` file so that dependent packages get a slimmer
+   ``node_modules`` directory.
+
+## 0.8.5
+
+ - Added preliminary support for long traces (@domenic)
+ - Added ``fapply``, ``fcall``, ``fbind`` for non-thisp
+   promised function calls.
+ - Added ``return`` for async generators, where generators
+   are implemented.
+ - Rejected promises now have an "exception" property.  If an object
+   isRejected(object), then object.valueOf().exception will
+   be the wrapped error.
+ - Added Jasmine specifications
+ - Support Internet Explorers 7–9 (with multiple bug fixes @domenic)
+ - Support Firefox 12
+ - Support Safari 5.1.5
+ - Support Chrome 18
+
+## 0.8.4
+
+ - WARNING: ``promise.timeout`` is now rejected with an ``Error`` object
+   and the message now includes the duration of the timeout in
+   miliseconds.  This doesn't constitute (in my opinion) a
+   backward-incompatibility since it is a change of an undocumented and
+   unspecified public behavior, but if you happened to depend on the
+   exception being a string, you will need to revise your code.
+ - Added ``deferred.makeNodeResolver()`` to replace the more cryptic
+   ``deferred.node()`` method.
+ - Added experimental ``Q.promise(maker(resolve, reject))`` to make a
+   promise inside a callback, such that thrown exceptions in the
+   callback are converted and the resolver and rejecter are arguments.
+   This is a shorthand for making a deferred directly and inspired by
+   @gozala’s stream constructor pattern and the Microsoft Windows Metro
+   Promise constructor interface.
+ - Added experimental ``Q.begin()`` that is intended to kick off chains
+   of ``.then`` so that each of these can be reordered without having to
+   edit the new and former first step.
+
+## 0.8.3
+
+ - Added ``isFulfilled``, ``isRejected``, and ``isResolved``
+   to the promise prototype.
+ - Added ``allResolved`` for waiting for every promise to either be
+   fulfilled or rejected, without propagating an error. @utvara #53
+ - Added ``Q.bind`` as a method to transform functions that
+   return and throw into promise-returning functions. See
+   [an example](https://gist.github.com/1782808). @domenic
+ - Renamed ``node`` export to ``nbind``, and added ``napply`` to
+   complete the set. ``node`` remains as deprecated. @domenic #58
+ - Renamed ``Method`` export to ``sender``.  ``Method``
+   remains as deprecated and will be removed in the next
+   major version since I expect it has very little usage.
+ - Added browser console message indicating a live list of
+   unhandled errors.
+ - Added support for ``msSetImmediate`` (IE10) or ``setImmediate``
+   (available via [polyfill](https://github.com/NobleJS/setImmediate))
+   as a browser-side ``nextTick`` implementation. #44 #50 #59
+ - Stopped using the event-queue dependency, which was in place for
+   Narwhal support: now directly using ``process.nextTick``.
+ - WARNING: EXPERIMENTAL: added ``finally`` alias for ``fin``, ``catch``
+   alias for ``fail``, ``try`` alias for ``call``, and ``delete`` alias
+   for ``del``.  These properties are enquoted in the library for
+   cross-browser compatibility, but may be used as property names in
+   modern engines.
+
+## 0.8.2
+
+ - Deprecated ``ref`` in favor of ``resolve`` as recommended by
+   @domenic.
+ - Update event-queue dependency.
+
+## 0.8.1
+
+ - Fixed Opera bug. #35 @cadorn
+ - Fixed ``Q.all([])`` #32 @domenic
+
+## 0.8.0
+
+ - WARNING: ``enqueue`` removed.  Use ``nextTick`` instead.
+   This is more consistent with NodeJS and (subjectively)
+   more explicit and intuitive.
+ - WARNING: ``def`` removed.  Use ``master`` instead.  The
+   term ``def`` was too confusing to new users.
+ - WARNING: ``spy`` removed in favor of ``fin``.
+ - WARNING: ``wait`` removed. Do ``all(args).get(0)`` instead.
+ - WARNING: ``join`` removed. Do ``all(args).spread(callback)`` instead.
+ - WARNING: Removed the ``Q`` function module.exports alias
+   for ``Q.ref``. It conflicts with ``Q.apply`` in weird
+   ways, making it uncallable.
+ - Revised ``delay`` so that it accepts both ``(value,
+   timeout)`` and ``(timeout)`` variations based on
+   arguments length.
+ - Added ``ref().spread(cb(...args))``, a variant of
+   ``then`` that spreads an array across multiple arguments.
+   Useful with ``all()``.
+ - Added ``defer().node()`` Node callback generator.  The
+   callback accepts ``(error, value)`` or ``(error,
+   ...values)``.  For multiple value arguments, the
+   fulfillment value is an array, useful in conjunction with
+   ``spread``.
+ - Added ``node`` and ``ncall``, both with the signature
+   ``(fun, thisp_opt, ...args)``.  The former is a decorator
+   and the latter calls immediately.  ``node`` optional
+   binds and partially applies.  ``ncall`` can bind and pass
+   arguments.
+
+## 0.7.2
+
+ - Fixed thenable promise assimilation.
+
+## 0.7.1
+
+ - Stopped shimming ``Array.prototype.reduce``. The
+   enumerable property has bad side-effects.  Libraries that
+   depend on this (for example, QQ) will need to be revised.
+
+## 0.7.0 - BACKWARD INCOMPATIBILITY
+
+ - WARNING: Removed ``report`` and ``asap``
+ - WARNING: The ``callback`` argument of the ``fin``
+   function no longer receives any arguments. Thus, it can
+   be used to call functions that should not receive
+   arguments on resolution.  Use ``when``, ``then``, or
+   ``fail`` if you need a value.
+ - IMPORTANT: Fixed a bug in the use of ``MessageChannel``
+   for ``nextTick``.
+ - Renamed ``enqueue`` to ``nextTick``.
+ - Added experimental ``view`` and ``viewInfo`` for creating
+   views of promises either when or before they're
+   fulfilled.
+ - Shims are now externally applied so subsequent scripts or
+   dependees can use them.
+ - Improved minification results.
+ - Improved readability.
+
+## 0.6.0 - BACKWARD INCOMPATIBILITY
+
+ - WARNING: In practice, the implementation of ``spy`` and
+   the name ``fin`` were useful.  I've removed the old
+   ``fin`` implementation and renamed/aliased ``spy``.
+ - The "q" module now exports its ``ref`` function as a "Q"
+   constructor, with module systems that support exports
+   assignment including NodeJS, RequireJS, and when used as
+   a ``<script>`` tag. Notably, strictly compliant CommonJS
+   does not support this, but UncommonJS does.
+ - Added ``async`` decorator for generators that use yield
+   to "trampoline" promises. In engines that support
+   generators (SpiderMonkey), this will greatly reduce the
+   need for nested callbacks.
+ - Made ``when`` chainable.
+ - Made ``all`` chainable.
+
+## 0.5.3
+
+ - Added ``all`` and refactored ``join`` and ``wait`` to use
+   it.  All of these will now reject at the earliest
+   rejection.
+
+## 0.5.2
+
+ - Minor improvement to ``spy``; now waits for resolution of
+   callback promise.
+
+## 0.5.1
+
+ - Made most Q API methods chainable on promise objects, and
+   turned the previous promise-methods of ``join``,
+   ``wait``, and ``report`` into Q API methods.
+ - Added ``apply`` and ``call`` to the Q API, and ``apply``
+   as a promise handler.
+ - Added ``fail``, ``fin``, and ``spy`` to Q and the promise
+   prototype for convenience when observing rejection,
+   fulfillment and rejection, or just observing without
+   affecting the resolution.
+ - Renamed ``def`` (although ``def`` remains shimmed until
+   the next major release) to ``master``.
+ - Switched to using ``MessageChannel`` for next tick task
+   enqueue in browsers that support it.
+
+## 0.5.0 - MINOR BACKWARD INCOMPATIBILITY
+
+ - Exceptions are no longer reported when consumed.
+ - Removed ``error`` from the API.  Since exceptions are
+   getting consumed, throwing them in an errback causes the
+   exception to silently disappear.  Use ``end``.
+ - Added ``end`` as both an API method and a promise-chain
+   ending method.  It causes propagated rejections to be
+   thrown, which allows Node to write stack traces and
+   emit ``uncaughtException`` events, and browsers to
+   likewise emit ``onerror`` and log to the console.
+ - Added ``join`` and ``wait`` as promise chain functions,
+   so you can wait for variadic promises, returning your own
+   promise back, or join variadic promises, resolving with a
+   callback that receives variadic fulfillment values.
+
+## 0.4.4
+
+ - ``end`` no longer returns a promise. It is the end of the
+   promise chain.
+ - Stopped reporting thrown exceptions in ``when`` callbacks
+   and errbacks.  These must be explicitly reported through
+   ``.end()``, ``.then(null, Q.error)``, or some other
+   mechanism.
+ - Added ``report`` as an API method, which can be used as
+   an errback to report and propagate an error.
+ - Added ``report`` as a promise-chain method, so an error
+   can be reported if it passes such a gate.
+
+## 0.4.3
+
+ - Fixed ``<script>`` support that regressed with 0.4.2
+   because of "use strict" in the module system
+   multi-plexer.
+
+## 0.4.2
+
+ - Added support for RequireJS (jburke)
+
+## 0.4.1
+
+ - Added an "end" method to the promise prototype,
+   as a shorthand for waiting for the promise to
+   be resolved gracefully, and failing to do so,
+   to dump an error message.
+
+## 0.4.0 - BACKWARD INCOMPATIBLE*
+
+ - *Removed the utility modules. NPM and Node no longer
+   expose any module except the main module.  These have
+   been moved and merged into the "qq" package.
+ - *In a non-CommonJS browser, q.js can be used as a script.
+   It now creates a Q global variable.
+ - Fixed thenable assimilation.
+ - Fixed some issues with asap, when it resolves to
+   undefined, or throws an exception.
+
+## 0.3.0 - BACKWARD-INCOMPATIBLE
+
+ - The `post` method has been reverted to its original
+   signature, as provided in Tyler Close's `ref_send` API.
+   That is, `post` accepts two arguments, the second of
+   which is an arbitrary object, but usually invocation
+   arguments as an `Array`.  To provide variadic arguments
+   to `post`, there is a new `invoke` function that posts
+   the variadic arguments to the value given in the first
+   argument.
+ - The `defined` method has been moved from `q` to `q/util`
+   since it gets no use in practice but is still
+   theoretically useful.
+ - The `Promise` constructor has been renamed to
+   `makePromise` to be consistent with the convention that
+   functions that do not require the `new` keyword to be
+   used as constructors have camelCase names.
+ - The `isResolved` function has been renamed to
+   `isFulfilled`.  There is a new `isResolved` function that
+   indicates whether a value is not a promise or, if it is a
+   promise, whether it has been either fulfilled or
+   rejected.  The code has been revised to reflect this
+   nuance in terminology.
+
+## 0.2.10
+
+ - Added `join` to `"q/util"` for variadically joining
+   multiple promises.
+
+## 0.2.9
+
+ - The future-compatible `invoke` method has been added,
+   to replace `post`, since `post` will become backward-
+   incompatible in the next major release.
+ - Exceptions thrown in the callbacks of a `when` call are
+   now emitted to Node's `"uncaughtException"` `process`
+   event in addition to being returned as a rejection reason.
+
+## 0.2.8
+
+ - Exceptions thrown in the callbacks of a `when` call
+   are now consumed, warned, and transformed into
+   rejections of the promise returned by `when`.
+
+## 0.2.7
+
+ - Fixed a minor bug in thenable assimilation, regressed
+   because of the change in the forwarding protocol.
+ - Fixed behavior of "q/util" `deep` method on dates and
+   other primitives. Github issue #11.
+
+## 0.2.6
+
+ - Thenables (objects with a "then" method) are accepted
+   and provided, bringing this implementation of Q
+   into conformance with Promises/A, B, and D.
+ - Added `makePromise`, to replace the `Promise` function
+   eventually.
+ - Rejections are now also duck-typed. A rejection is a
+   promise with a valueOf method that returns a rejection
+   descriptor. A rejection descriptor has a
+   "promiseRejected" property equal to "true" and a
+   "reason" property corresponding to the rejection reason.
+ - Altered the `makePromise` API such that the `fallback`
+   method no longer receives a superfluous `resolved` method
+   after the `operator`.  The fallback method is responsible
+   only for returning a resolution.  This breaks an
+   undocumented API, so third-party API's depending on the
+   previous undocumented behavior may break.
+
+## 0.2.5
+
+ - Changed promises into a duck-type such that multiple
+   instances of the Q module can exchange promise objects.
+   A promise is now defined as "an object that implements the
+   `promiseSend(op, resolved, ...)` method and `valueOf`".
+ - Exceptions in promises are now captured and returned
+   as rejections.
+
+## 0.2.4
+
+ - Fixed bug in `ref` that prevented `del` messages from
+   being received (gozala)
+ - Fixed a conflict with FireFox 4; constructor property
+   is now read-only.
+
+## 0.2.3
+
+ - Added `keys` message to promises and to the promise API.
+
+## 0.2.2
+
+ - Added boilerplate to `q/queue` and `q/util`.
+ - Fixed missing dependency to `q/queue`.
+
+## 0.2.1
+
+ - The `resolve` and `reject` methods of `defer` objects now
+   return the resolution promise for convenience.
+ - Added `q/util`, which provides `step`, `delay`, `shallow`,
+   `deep`, and three reduction orders.
+ - Added `q/queue` module for a promise `Queue`.
+ - Added `q-comm` to the list of compatible libraries.
+ - Deprecated `defined` from `q`, with intent to move it to
+   `q/util`.
+
+## 0.2.0 - BACKWARD INCOMPATIBLE
+
+ - Changed post(ref, name, args) to variadic
+   post(ref, name, ...args). BACKWARD INCOMPATIBLE
+ - Added a def(value) method to annotate an object as being
+   necessarily a local value that cannot be serialized, such
+   that inter-process/worker/vat promise communication
+   libraries will send messages to it, but never send it
+   back.
+ - Added a send(value, op, ...args) method to the public API, for
+   forwarding messages to a value or promise in a future turn.
+
+## 0.1.9
+
+ - Added isRejected() for testing whether a value is a rejected
+   promise.  isResolved() retains the behavior of stating
+   that rejected promises are not resolved.
+
+## 0.1.8
+
+ - Fixed isResolved(null) and isResolved(undefined) [issue #9]
+ - Fixed a problem with the Object.create shim
+
+## 0.1.7
+
+ - shimmed ES5 Object.create in addition to Object.freeze
+   for compatibility on non-ES5 engines (gozala)
+
+## 0.1.6
+
+ - Q.isResolved added
+ - promise.valueOf() now returns the value of resolved
+   and near values
+ - asap retried
+ - promises are frozen when possible
+
+## 0.1.5
+
+ - fixed dependency list for Teleport (gozala)
+ - all unit tests now pass (gozala)
+
+## 0.1.4
+
+ - added support for Teleport as an engine (gozala)
+ - simplified and updated methods for getting internal
+   print and enqueue functions universally (gozala)
+
+## 0.1.3
+
+ - fixed erroneous link to the q module in package.json
+
+## 0.1.2
+
+ - restructured for overlay style package compatibility
+
+## 0.1.0
+
+ - removed asap because it was broken, probably down to the
+   philosophy.
+
+## 0.0.3
+
+ - removed q-util
+ - fixed asap so it returns a value if completed
+
+## 0.0.2
+
+ - added q-util
+
+## 0.0.1
+
+ - initial version
diff --git a/config/tizen/tpk-tools/cli/node_modules/q/LICENSE b/config/tizen/tpk-tools/cli/node_modules/q/LICENSE
new file mode 100644 (file)
index 0000000..8a706b5
--- /dev/null
@@ -0,0 +1,18 @@
+Copyright 2009–2014 Kristopher Michael Kowal. All rights reserved.
+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/config/tizen/tpk-tools/cli/node_modules/q/README.md b/config/tizen/tpk-tools/cli/node_modules/q/README.md
new file mode 100644 (file)
index 0000000..9065bfa
--- /dev/null
@@ -0,0 +1,881 @@
+[![Build Status](https://secure.travis-ci.org/kriskowal/q.png?branch=master)](http://travis-ci.org/kriskowal/q)
+
+<a href="http://promises-aplus.github.com/promises-spec">
+    <img src="http://kriskowal.github.io/q/q.png"
+         align="right" alt="Q logo" />
+</a>
+
+*This is Q version 1, from the `v1` branch in Git. This documentation applies to
+the latest of both the version 1 and version 0.9 release trains. These releases
+are stable. There will be no further releases of 0.9 after 0.9.7 which is nearly
+equivalent to version 1.0.0. All further releases of `q@~1.0` will be backward
+compatible. The version 2 release train introduces significant and
+backward-incompatible changes and is experimental at this time.*
+
+If a function cannot return a value or throw an exception without
+blocking, it can return a promise instead.  A promise is an object
+that represents the return value or the thrown exception that the
+function may eventually provide.  A promise can also be used as a
+proxy for a [remote object][Q-Connection] to overcome latency.
+
+[Q-Connection]: https://github.com/kriskowal/q-connection
+
+On the first pass, promises can mitigate the “[Pyramid of
+Doom][POD]”: the situation where code marches to the right faster
+than it marches forward.
+
+[POD]: http://calculist.org/blog/2011/12/14/why-coroutines-wont-work-on-the-web/
+
+```javascript
+step1(function (value1) {
+    step2(value1, function(value2) {
+        step3(value2, function(value3) {
+            step4(value3, function(value4) {
+                // Do something with value4
+            });
+        });
+    });
+});
+```
+
+With a promise library, you can flatten the pyramid.
+
+```javascript
+Q.fcall(promisedStep1)
+.then(promisedStep2)
+.then(promisedStep3)
+.then(promisedStep4)
+.then(function (value4) {
+    // Do something with value4
+})
+.catch(function (error) {
+    // Handle any error from all above steps
+})
+.done();
+```
+
+With this approach, you also get implicit error propagation, just like `try`,
+`catch`, and `finally`.  An error in `promisedStep1` will flow all the way to
+the `catch` function, where it’s caught and handled.  (Here `promisedStepN` is
+a version of `stepN` that returns a promise.)
+
+The callback approach is called an “inversion of control”.
+A function that accepts a callback instead of a return value
+is saying, “Don’t call me, I’ll call you.”.  Promises
+[un-invert][IOC] the inversion, cleanly separating the input
+arguments from control flow arguments.  This simplifies the
+use and creation of API’s, particularly variadic,
+rest and spread arguments.
+
+[IOC]: http://www.slideshare.net/domenicdenicola/callbacks-promises-and-coroutines-oh-my-the-evolution-of-asynchronicity-in-javascript
+
+
+## Getting Started
+
+The Q module can be loaded as:
+
+-   A ``<script>`` tag (creating a ``Q`` global variable): ~2.5 KB minified and
+    gzipped.
+-   A Node.js and CommonJS module, available in [npm](https://npmjs.org/) as
+    the [q](https://npmjs.org/package/q) package
+-   An AMD module
+-   A [component](https://github.com/component/component) as ``microjs/q``
+-   Using [bower](http://bower.io/) as `q#1.0.1`
+-   Using [NuGet](http://nuget.org/) as [Q](https://nuget.org/packages/q)
+
+Q can exchange promises with jQuery, Dojo, When.js, WinJS, and more.
+
+## Resources
+
+Our [wiki][] contains a number of useful resources, including:
+
+- A method-by-method [Q API reference][reference].
+- A growing [examples gallery][examples], showing how Q can be used to make
+  everything better. From XHR to database access to accessing the Flickr API,
+  Q is there for you.
+- There are many libraries that produce and consume Q promises for everything
+  from file system/database access or RPC to templating. For a list of some of
+  the more popular ones, see [Libraries][].
+- If you want materials that introduce the promise concept generally, and the
+  below tutorial isn't doing it for you, check out our collection of
+  [presentations, blog posts, and podcasts][resources].
+- A guide for those [coming from jQuery's `$.Deferred`][jquery].
+
+We'd also love to have you join the Q-Continuum [mailing list][].
+
+[wiki]: https://github.com/kriskowal/q/wiki
+[reference]: https://github.com/kriskowal/q/wiki/API-Reference
+[examples]: https://github.com/kriskowal/q/wiki/Examples-Gallery
+[Libraries]: https://github.com/kriskowal/q/wiki/Libraries
+[resources]: https://github.com/kriskowal/q/wiki/General-Promise-Resources
+[jquery]: https://github.com/kriskowal/q/wiki/Coming-from-jQuery
+[mailing list]: https://groups.google.com/forum/#!forum/q-continuum
+
+
+## Tutorial
+
+Promises have a ``then`` method, which you can use to get the eventual
+return value (fulfillment) or thrown exception (rejection).
+
+```javascript
+promiseMeSomething()
+.then(function (value) {
+}, function (reason) {
+});
+```
+
+If ``promiseMeSomething`` returns a promise that gets fulfilled later
+with a return value, the first function (the fulfillment handler) will be
+called with the value.  However, if the ``promiseMeSomething`` function
+gets rejected later by a thrown exception, the second function (the
+rejection handler) will be called with the exception.
+
+Note that resolution of a promise is always asynchronous: that is, the
+fulfillment or rejection handler will always be called in the next turn of the
+event loop (i.e. `process.nextTick` in Node). This gives you a nice
+guarantee when mentally tracing the flow of your code, namely that
+``then`` will always return before either handler is executed.
+
+In this tutorial, we begin with how to consume and work with promises. We'll
+talk about how to create them, and thus create functions like
+`promiseMeSomething` that return promises, [below](#the-beginning).
+
+
+### Propagation
+
+The ``then`` method returns a promise, which in this example, I’m
+assigning to ``outputPromise``.
+
+```javascript
+var outputPromise = getInputPromise()
+.then(function (input) {
+}, function (reason) {
+});
+```
+
+The ``outputPromise`` variable becomes a new promise for the return
+value of either handler.  Since a function can only either return a
+value or throw an exception, only one handler will ever be called and it
+will be responsible for resolving ``outputPromise``.
+
+-   If you return a value in a handler, ``outputPromise`` will get
+    fulfilled.
+
+-   If you throw an exception in a handler, ``outputPromise`` will get
+    rejected.
+
+-   If you return a **promise** in a handler, ``outputPromise`` will
+    “become” that promise.  Being able to become a new promise is useful
+    for managing delays, combining results, or recovering from errors.
+
+If the ``getInputPromise()`` promise gets rejected and you omit the
+rejection handler, the **error** will go to ``outputPromise``:
+
+```javascript
+var outputPromise = getInputPromise()
+.then(function (value) {
+});
+```
+
+If the input promise gets fulfilled and you omit the fulfillment handler, the
+**value** will go to ``outputPromise``:
+
+```javascript
+var outputPromise = getInputPromise()
+.then(null, function (error) {
+});
+```
+
+Q promises provide a ``fail`` shorthand for ``then`` when you are only
+interested in handling the error:
+
+```javascript
+var outputPromise = getInputPromise()
+.fail(function (error) {
+});
+```
+
+If you are writing JavaScript for modern engines only or using
+CoffeeScript, you may use `catch` instead of `fail`.
+
+Promises also have a ``fin`` function that is like a ``finally`` clause.
+The final handler gets called, with no arguments, when the promise
+returned by ``getInputPromise()`` either returns a value or throws an
+error.  The value returned or error thrown by ``getInputPromise()``
+passes directly to ``outputPromise`` unless the final handler fails, and
+may be delayed if the final handler returns a promise.
+
+```javascript
+var outputPromise = getInputPromise()
+.fin(function () {
+    // close files, database connections, stop servers, conclude tests
+});
+```
+
+-   If the handler returns a value, the value is ignored
+-   If the handler throws an error, the error passes to ``outputPromise``
+-   If the handler returns a promise, ``outputPromise`` gets postponed.  The
+    eventual value or error has the same effect as an immediate return
+    value or thrown error: a value would be ignored, an error would be
+    forwarded.
+
+If you are writing JavaScript for modern engines only or using
+CoffeeScript, you may use `finally` instead of `fin`.
+
+### Chaining
+
+There are two ways to chain promises.  You can chain promises either
+inside or outside handlers.  The next two examples are equivalent.
+
+```javascript
+return getUsername()
+.then(function (username) {
+    return getUser(username)
+    .then(function (user) {
+        // if we get here without an error,
+        // the value returned here
+        // or the exception thrown here
+        // resolves the promise returned
+        // by the first line
+    })
+});
+```
+
+```javascript
+return getUsername()
+.then(function (username) {
+    return getUser(username);
+})
+.then(function (user) {
+    // if we get here without an error,
+    // the value returned here
+    // or the exception thrown here
+    // resolves the promise returned
+    // by the first line
+});
+```
+
+The only difference is nesting.  It’s useful to nest handlers if you
+need to capture multiple input values in your closure.
+
+```javascript
+function authenticate() {
+    return getUsername()
+    .then(function (username) {
+        return getUser(username);
+    })
+    // chained because we will not need the user name in the next event
+    .then(function (user) {
+        return getPassword()
+        // nested because we need both user and password next
+        .then(function (password) {
+            if (user.passwordHash !== hash(password)) {
+                throw new Error("Can't authenticate");
+            }
+        });
+    });
+}
+```
+
+
+### Combination
+
+You can turn an array of promises into a promise for the whole,
+fulfilled array using ``all``.
+
+```javascript
+return Q.all([
+    eventualAdd(2, 2),
+    eventualAdd(10, 20)
+]);
+```
+
+If you have a promise for an array, you can use ``spread`` as a
+replacement for ``then``.  The ``spread`` function “spreads” the
+values over the arguments of the fulfillment handler.  The rejection handler
+will get called at the first sign of failure.  That is, whichever of
+the received promises fails first gets handled by the rejection handler.
+
+```javascript
+function eventualAdd(a, b) {
+    return Q.spread([a, b], function (a, b) {
+        return a + b;
+    })
+}
+```
+
+But ``spread`` calls ``all`` initially, so you can skip it in chains.
+
+```javascript
+return getUsername()
+.then(function (username) {
+    return [username, getUser(username)];
+})
+.spread(function (username, user) {
+});
+```
+
+The ``all`` function returns a promise for an array of values.  When this
+promise is fulfilled, the array contains the fulfillment values of the original
+promises, in the same order as those promises.  If one of the given promises
+is rejected, the returned promise is immediately rejected, not waiting for the
+rest of the batch.  If you want to wait for all of the promises to either be
+fulfilled or rejected, you can use ``allSettled``.
+
+```javascript
+Q.allSettled(promises)
+.then(function (results) {
+    results.forEach(function (result) {
+        if (result.state === "fulfilled") {
+            var value = result.value;
+        } else {
+            var reason = result.reason;
+        }
+    });
+});
+```
+
+The ``any`` function accepts an array of promises and returns a promise that is
+fulfilled by the first given promise to be fulfilled, or rejected if all of the
+given promises are rejected.
+
+```javascript
+Q.any(promises)
+.then(function (first) {
+    // Any of the promises was fulfilled.
+}, function (error) {
+    // All of the promises were rejected.
+});
+```
+
+### Sequences
+
+If you have a number of promise-producing functions that need
+to be run sequentially, you can of course do so manually:
+
+```javascript
+return foo(initialVal).then(bar).then(baz).then(qux);
+```
+
+However, if you want to run a dynamically constructed sequence of
+functions, you'll want something like this:
+
+```javascript
+var funcs = [foo, bar, baz, qux];
+
+var result = Q(initialVal);
+funcs.forEach(function (f) {
+    result = result.then(f);
+});
+return result;
+```
+
+You can make this slightly more compact using `reduce`:
+
+```javascript
+return funcs.reduce(function (soFar, f) {
+    return soFar.then(f);
+}, Q(initialVal));
+```
+
+Or, you could use the ultra-compact version:
+
+```javascript
+return funcs.reduce(Q.when, Q(initialVal));
+```
+
+### Handling Errors
+
+One sometimes-unintuive aspect of promises is that if you throw an
+exception in the fulfillment handler, it will not be caught by the error
+handler.
+
+```javascript
+return foo()
+.then(function (value) {
+    throw new Error("Can't bar.");
+}, function (error) {
+    // We only get here if "foo" fails
+});
+```
+
+To see why this is, consider the parallel between promises and
+``try``/``catch``. We are ``try``-ing to execute ``foo()``: the error
+handler represents a ``catch`` for ``foo()``, while the fulfillment handler
+represents code that happens *after* the ``try``/``catch`` block.
+That code then needs its own ``try``/``catch`` block.
+
+In terms of promises, this means chaining your rejection handler:
+
+```javascript
+return foo()
+.then(function (value) {
+    throw new Error("Can't bar.");
+})
+.fail(function (error) {
+    // We get here with either foo's error or bar's error
+});
+```
+
+### Progress Notification
+
+It's possible for promises to report their progress, e.g. for tasks that take a
+long time like a file upload. Not all promises will implement progress
+notifications, but for those that do, you can consume the progress values using
+a third parameter to ``then``:
+
+```javascript
+return uploadFile()
+.then(function () {
+    // Success uploading the file
+}, function (err) {
+    // There was an error, and we get the reason for error
+}, function (progress) {
+    // We get notified of the upload's progress as it is executed
+});
+```
+
+Like `fail`, Q also provides a shorthand for progress callbacks
+called `progress`:
+
+```javascript
+return uploadFile().progress(function (progress) {
+    // We get notified of the upload's progress
+});
+```
+
+### The End
+
+When you get to the end of a chain of promises, you should either
+return the last promise or end the chain.  Since handlers catch
+errors, it’s an unfortunate pattern that the exceptions can go
+unobserved.
+
+So, either return it,
+
+```javascript
+return foo()
+.then(function () {
+    return "bar";
+});
+```
+
+Or, end it.
+
+```javascript
+foo()
+.then(function () {
+    return "bar";
+})
+.done();
+```
+
+Ending a promise chain makes sure that, if an error doesn’t get
+handled before the end, it will get rethrown and reported.
+
+This is a stopgap. We are exploring ways to make unhandled errors
+visible without any explicit handling.
+
+
+### The Beginning
+
+Everything above assumes you get a promise from somewhere else.  This
+is the common case.  Every once in a while, you will need to create a
+promise from scratch.
+
+#### Using ``Q.fcall``
+
+You can create a promise from a value using ``Q.fcall``.  This returns a
+promise for 10.
+
+```javascript
+return Q.fcall(function () {
+    return 10;
+});
+```
+
+You can also use ``fcall`` to get a promise for an exception.
+
+```javascript
+return Q.fcall(function () {
+    throw new Error("Can't do it");
+});
+```
+
+As the name implies, ``fcall`` can call functions, or even promised
+functions.  This uses the ``eventualAdd`` function above to add two
+numbers.
+
+```javascript
+return Q.fcall(eventualAdd, 2, 2);
+```
+
+
+#### Using Deferreds
+
+If you have to interface with asynchronous functions that are callback-based
+instead of promise-based, Q provides a few shortcuts (like ``Q.nfcall`` and
+friends). But much of the time, the solution will be to use *deferreds*.
+
+```javascript
+var deferred = Q.defer();
+FS.readFile("foo.txt", "utf-8", function (error, text) {
+    if (error) {
+        deferred.reject(new Error(error));
+    } else {
+        deferred.resolve(text);
+    }
+});
+return deferred.promise;
+```
+
+Note that a deferred can be resolved with a value or a promise.  The
+``reject`` function is a shorthand for resolving with a rejected
+promise.
+
+```javascript
+// this:
+deferred.reject(new Error("Can't do it"));
+
+// is shorthand for:
+var rejection = Q.fcall(function () {
+    throw new Error("Can't do it");
+});
+deferred.resolve(rejection);
+```
+
+This is a simplified implementation of ``Q.delay``.
+
+```javascript
+function delay(ms) {
+    var deferred = Q.defer();
+    setTimeout(deferred.resolve, ms);
+    return deferred.promise;
+}
+```
+
+This is a simplified implementation of ``Q.timeout``
+
+```javascript
+function timeout(promise, ms) {
+    var deferred = Q.defer();
+    Q.when(promise, deferred.resolve);
+    delay(ms).then(function () {
+        deferred.reject(new Error("Timed out"));
+    });
+    return deferred.promise;
+}
+```
+
+Finally, you can send a progress notification to the promise with
+``deferred.notify``.
+
+For illustration, this is a wrapper for XML HTTP requests in the browser. Note
+that a more [thorough][XHR] implementation would be in order in practice.
+
+[XHR]: https://github.com/montagejs/mr/blob/71e8df99bb4f0584985accd6f2801ef3015b9763/browser.js#L29-L73
+
+```javascript
+function requestOkText(url) {
+    var request = new XMLHttpRequest();
+    var deferred = Q.defer();
+
+    request.open("GET", url, true);
+    request.onload = onload;
+    request.onerror = onerror;
+    request.onprogress = onprogress;
+    request.send();
+
+    function onload() {
+        if (request.status === 200) {
+            deferred.resolve(request.responseText);
+        } else {
+            deferred.reject(new Error("Status code was " + request.status));
+        }
+    }
+
+    function onerror() {
+        deferred.reject(new Error("Can't XHR " + JSON.stringify(url)));
+    }
+
+    function onprogress(event) {
+        deferred.notify(event.loaded / event.total);
+    }
+
+    return deferred.promise;
+}
+```
+
+Below is an example of how to use this ``requestOkText`` function:
+
+```javascript
+requestOkText("http://localhost:3000")
+.then(function (responseText) {
+    // If the HTTP response returns 200 OK, log the response text.
+    console.log(responseText);
+}, function (error) {
+    // If there's an error or a non-200 status code, log the error.
+    console.error(error);
+}, function (progress) {
+    // Log the progress as it comes in.
+    console.log("Request progress: " + Math.round(progress * 100) + "%");
+});
+```
+
+#### Using `Q.Promise`
+
+This is an alternative promise-creation API that has the same power as
+the deferred concept, but without introducing another conceptual entity.
+
+Rewriting the `requestOkText` example above using `Q.Promise`:
+
+```javascript
+function requestOkText(url) {
+    return Q.Promise(function(resolve, reject, notify) {
+        var request = new XMLHttpRequest();
+
+        request.open("GET", url, true);
+        request.onload = onload;
+        request.onerror = onerror;
+        request.onprogress = onprogress;
+        request.send();
+
+        function onload() {
+            if (request.status === 200) {
+                resolve(request.responseText);
+            } else {
+                reject(new Error("Status code was " + request.status));
+            }
+        }
+
+        function onerror() {
+            reject(new Error("Can't XHR " + JSON.stringify(url)));
+        }
+
+        function onprogress(event) {
+            notify(event.loaded / event.total);
+        }
+    });
+}
+```
+
+If `requestOkText` were to throw an exception, the returned promise would be
+rejected with that thrown exception as the rejection reason.
+
+### The Middle
+
+If you are using a function that may return a promise, but just might
+return a value if it doesn’t need to defer, you can use the “static”
+methods of the Q library.
+
+The ``when`` function is the static equivalent for ``then``.
+
+```javascript
+return Q.when(valueOrPromise, function (value) {
+}, function (error) {
+});
+```
+
+All of the other methods on a promise have static analogs with the
+same name.
+
+The following are equivalent:
+
+```javascript
+return Q.all([a, b]);
+```
+
+```javascript
+return Q.fcall(function () {
+    return [a, b];
+})
+.all();
+```
+
+When working with promises provided by other libraries, you should
+convert it to a Q promise.  Not all promise libraries make the same
+guarantees as Q and certainly don’t provide all of the same methods.
+Most libraries only provide a partially functional ``then`` method.
+This thankfully is all we need to turn them into vibrant Q promises.
+
+```javascript
+return Q($.ajax(...))
+.then(function () {
+});
+```
+
+If there is any chance that the promise you receive is not a Q promise
+as provided by your library, you should wrap it using a Q function.
+You can even use ``Q.invoke`` as a shorthand.
+
+```javascript
+return Q.invoke($, 'ajax', ...)
+.then(function () {
+});
+```
+
+
+### Over the Wire
+
+A promise can serve as a proxy for another object, even a remote
+object.  There are methods that allow you to optimistically manipulate
+properties or call functions.  All of these interactions return
+promises, so they can be chained.
+
+```
+direct manipulation         using a promise as a proxy
+--------------------------  -------------------------------
+value.foo                   promise.get("foo")
+value.foo = value           promise.put("foo", value)
+delete value.foo            promise.del("foo")
+value.foo(...args)          promise.post("foo", [args])
+value.foo(...args)          promise.invoke("foo", ...args)
+value(...args)              promise.fapply([args])
+value(...args)              promise.fcall(...args)
+```
+
+If the promise is a proxy for a remote object, you can shave
+round-trips by using these functions instead of ``then``.  To take
+advantage of promises for remote objects, check out [Q-Connection][].
+
+[Q-Connection]: https://github.com/kriskowal/q-connection
+
+Even in the case of non-remote objects, these methods can be used as
+shorthand for particularly-simple fulfillment handlers. For example, you
+can replace
+
+```javascript
+return Q.fcall(function () {
+    return [{ foo: "bar" }, { foo: "baz" }];
+})
+.then(function (value) {
+    return value[0].foo;
+});
+```
+
+with
+
+```javascript
+return Q.fcall(function () {
+    return [{ foo: "bar" }, { foo: "baz" }];
+})
+.get(0)
+.get("foo");
+```
+
+
+### Adapting Node
+
+If you're working with functions that make use of the Node.js callback pattern,
+where callbacks are in the form of `function(err, result)`, Q provides a few
+useful utility functions for converting between them. The most straightforward
+are probably `Q.nfcall` and `Q.nfapply` ("Node function call/apply") for calling
+Node.js-style functions and getting back a promise:
+
+```javascript
+return Q.nfcall(FS.readFile, "foo.txt", "utf-8");
+return Q.nfapply(FS.readFile, ["foo.txt", "utf-8"]);
+```
+
+If you are working with methods, instead of simple functions, you can easily
+run in to the usual problems where passing a method to another function—like
+`Q.nfcall`—"un-binds" the method from its owner. To avoid this, you can either
+use `Function.prototype.bind` or some nice shortcut methods we provide:
+
+```javascript
+return Q.ninvoke(redisClient, "get", "user:1:id");
+return Q.npost(redisClient, "get", ["user:1:id"]);
+```
+
+You can also create reusable wrappers with `Q.denodeify` or `Q.nbind`:
+
+```javascript
+var readFile = Q.denodeify(FS.readFile);
+return readFile("foo.txt", "utf-8");
+
+var redisClientGet = Q.nbind(redisClient.get, redisClient);
+return redisClientGet("user:1:id");
+```
+
+Finally, if you're working with raw deferred objects, there is a
+`makeNodeResolver` method on deferreds that can be handy:
+
+```javascript
+var deferred = Q.defer();
+FS.readFile("foo.txt", "utf-8", deferred.makeNodeResolver());
+return deferred.promise;
+```
+
+### Long Stack Traces
+
+Q comes with optional support for “long stack traces,” wherein the `stack`
+property of `Error` rejection reasons is rewritten to be traced along
+asynchronous jumps instead of stopping at the most recent one. As an example:
+
+```js
+function theDepthsOfMyProgram() {
+  Q.delay(100).done(function explode() {
+    throw new Error("boo!");
+  });
+}
+
+theDepthsOfMyProgram();
+```
+
+usually would give a rather unhelpful stack trace looking something like
+
+```
+Error: boo!
+    at explode (/path/to/test.js:3:11)
+    at _fulfilled (/path/to/test.js:q:54)
+    at resolvedValue.promiseDispatch.done (/path/to/q.js:823:30)
+    at makePromise.promise.promiseDispatch (/path/to/q.js:496:13)
+    at pending (/path/to/q.js:397:39)
+    at process.startup.processNextTick.process._tickCallback (node.js:244:9)
+```
+
+But, if you turn this feature on by setting
+
+```js
+Q.longStackSupport = true;
+```
+
+then the above code gives a nice stack trace to the tune of
+
+```
+Error: boo!
+    at explode (/path/to/test.js:3:11)
+From previous event:
+    at theDepthsOfMyProgram (/path/to/test.js:2:16)
+    at Object.<anonymous> (/path/to/test.js:7:1)
+```
+
+Note how you can see the function that triggered the async operation in the
+stack trace! This is very helpful for debugging, as otherwise you end up getting
+only the first line, plus a bunch of Q internals, with no sign of where the
+operation started.
+
+In node.js, this feature can also be enabled through the Q_DEBUG environment
+variable:
+
+```
+Q_DEBUG=1 node server.js
+```
+
+This will enable long stack support in every instance of Q.
+
+This feature does come with somewhat-serious performance and memory overhead,
+however. If you're working with lots of promises, or trying to scale a server
+to many users, you should probably keep it off. But in development, go for it!
+
+## Tests
+
+You can view the results of the Q test suite [in your browser][tests]!
+
+[tests]: https://rawgithub.com/kriskowal/q/v1/spec/q-spec.html
+
+## License
+
+Copyright 2009–2015 Kristopher Michael Kowal and contributors
+MIT License (enclosed)
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/q/package.json b/config/tizen/tpk-tools/cli/node_modules/q/package.json
new file mode 100644 (file)
index 0000000..1124db0
--- /dev/null
@@ -0,0 +1,153 @@
+{
+  "_args": [
+    [
+      {
+        "raw": "q@1.4.1",
+        "scope": null,
+        "escapedName": "q",
+        "name": "q",
+        "rawSpec": "1.4.1",
+        "spec": "1.4.1",
+        "type": "version"
+      },
+      "/home/sumin/iotjs-tpk/cli"
+    ]
+  ],
+  "_from": "q@1.4.1",
+  "_id": "q@1.4.1",
+  "_inCache": true,
+  "_location": "/q",
+  "_nodeVersion": "1.8.1",
+  "_npmUser": {
+    "name": "kriskowal",
+    "email": "kris.kowal@cixar.com"
+  },
+  "_npmVersion": "2.8.3",
+  "_phantomChildren": {},
+  "_requested": {
+    "raw": "q@1.4.1",
+    "scope": null,
+    "escapedName": "q",
+    "name": "q",
+    "rawSpec": "1.4.1",
+    "spec": "1.4.1",
+    "type": "version"
+  },
+  "_requiredBy": [
+    "/"
+  ],
+  "_resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz",
+  "_shasum": "55705bcd93c5f3673530c2c2cbc0c2b3addc286e",
+  "_shrinkwrap": null,
+  "_spec": "q@1.4.1",
+  "_where": "/home/sumin/iotjs-tpk/cli",
+  "author": {
+    "name": "Kris Kowal",
+    "email": "kris@cixar.com",
+    "url": "https://github.com/kriskowal"
+  },
+  "bugs": {
+    "url": "http://github.com/kriskowal/q/issues"
+  },
+  "contributors": [
+    {
+      "name": "Kris Kowal",
+      "email": "kris@cixar.com",
+      "url": "https://github.com/kriskowal"
+    },
+    {
+      "name": "Irakli Gozalishvili",
+      "email": "rfobic@gmail.com",
+      "url": "http://jeditoolkit.com"
+    },
+    {
+      "name": "Domenic Denicola",
+      "email": "domenic@domenicdenicola.com",
+      "url": "http://domenicdenicola.com"
+    }
+  ],
+  "dependencies": {},
+  "description": "A library for promises (CommonJS/Promises/A,B,D)",
+  "devDependencies": {
+    "cover": "*",
+    "grunt": "~0.4.1",
+    "grunt-cli": "~0.1.9",
+    "grunt-contrib-uglify": "~0.9.1",
+    "jasmine-node": "1.11.0",
+    "jshint": "~2.1.9",
+    "matcha": "~0.2.0",
+    "opener": "*",
+    "promises-aplus-tests": "1.x"
+  },
+  "directories": {
+    "test": "./spec"
+  },
+  "dist": {
+    "shasum": "55705bcd93c5f3673530c2c2cbc0c2b3addc286e",
+    "tarball": "https://registry.npmjs.org/q/-/q-1.4.1.tgz"
+  },
+  "engines": {
+    "node": ">=0.6.0",
+    "teleport": ">=0.2.0"
+  },
+  "files": [
+    "LICENSE",
+    "q.js",
+    "queue.js"
+  ],
+  "gitHead": "d373079d3620152e3d60e82f27265a09ee0e81bd",
+  "homepage": "https://github.com/kriskowal/q",
+  "keywords": [
+    "q",
+    "promise",
+    "promises",
+    "promises-a",
+    "promises-aplus",
+    "deferred",
+    "future",
+    "async",
+    "flow control",
+    "fluent",
+    "browser",
+    "node"
+  ],
+  "license": {
+    "type": "MIT",
+    "url": "http://github.com/kriskowal/q/raw/master/LICENSE"
+  },
+  "main": "q.js",
+  "maintainers": [
+    {
+      "name": "kriskowal",
+      "email": "kris.kowal@cixar.com"
+    },
+    {
+      "name": "domenic",
+      "email": "domenic@domenicdenicola.com"
+    }
+  ],
+  "name": "q",
+  "optionalDependencies": {},
+  "overlay": {
+    "teleport": {
+      "dependencies": {
+        "system": ">=0.0.4"
+      }
+    }
+  },
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/kriskowal/q.git"
+  },
+  "scripts": {
+    "benchmark": "matcha",
+    "cover": "cover run jasmine-node spec && cover report html && opener cover_html/index.html",
+    "lint": "jshint q.js",
+    "minify": "grunt",
+    "prepublish": "grunt",
+    "test": "jasmine-node spec && promises-aplus-tests spec/aplus-adapter",
+    "test-browser": "opener spec/q-spec.html"
+  },
+  "version": "1.4.1"
+}
diff --git a/config/tizen/tpk-tools/cli/node_modules/q/q.js b/config/tizen/tpk-tools/cli/node_modules/q/q.js
new file mode 100644 (file)
index 0000000..cf5339e
--- /dev/null
@@ -0,0 +1,2048 @@
+// vim:ts=4:sts=4:sw=4:
+/*!
+ *
+ * Copyright 2009-2012 Kris Kowal under the terms of the MIT
+ * license found at http://github.com/kriskowal/q/raw/master/LICENSE
+ *
+ * With parts by Tyler Close
+ * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found
+ * at http://www.opensource.org/licenses/mit-license.html
+ * Forked at ref_send.js version: 2009-05-11
+ *
+ * With parts by Mark Miller
+ * Copyright (C) 2011 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+(function (definition) {
+    "use strict";
+
+    // This file will function properly as a <script> tag, or a module
+    // using CommonJS and NodeJS or RequireJS module formats.  In
+    // Common/Node/RequireJS, the module exports the Q API and when
+    // executed as a simple <script>, it creates a Q global instead.
+
+    // Montage Require
+    if (typeof bootstrap === "function") {
+        bootstrap("promise", definition);
+
+    // CommonJS
+    } else if (typeof exports === "object" && typeof module === "object") {
+        module.exports = definition();
+
+    // RequireJS
+    } else if (typeof define === "function" && define.amd) {
+        define(definition);
+
+    // SES (Secure EcmaScript)
+    } else if (typeof ses !== "undefined") {
+        if (!ses.ok()) {
+            return;
+        } else {
+            ses.makeQ = definition;
+        }
+
+    // <script>
+    } else if (typeof window !== "undefined" || typeof self !== "undefined") {
+        // Prefer window over self for add-on scripts. Use self for
+        // non-windowed contexts.
+        var global = typeof window !== "undefined" ? window : self;
+
+        // Get the `window` object, save the previous Q global
+        // and initialize Q as a global.
+        var previousQ = global.Q;
+        global.Q = definition();
+
+        // Add a noConflict function so Q can be removed from the
+        // global namespace.
+        global.Q.noConflict = function () {
+            global.Q = previousQ;
+            return this;
+        };
+
+    } else {
+        throw new Error("This environment was not anticipated by Q. Please file a bug.");
+    }
+
+})(function () {
+"use strict";
+
+var hasStacks = false;
+try {
+    throw new Error();
+} catch (e) {
+    hasStacks = !!e.stack;
+}
+
+// All code after this point will be filtered from stack traces reported
+// by Q.
+var qStartingLine = captureLine();
+var qFileName;
+
+// shims
+
+// used for fallback in "allResolved"
+var noop = function () {};
+
+// Use the fastest possible means to execute a task in a future turn
+// of the event loop.
+var nextTick =(function () {
+    // linked list of tasks (single, with head node)
+    var head = {task: void 0, next: null};
+    var tail = head;
+    var flushing = false;
+    var requestTick = void 0;
+    var isNodeJS = false;
+    // queue for late tasks, used by unhandled rejection tracking
+    var laterQueue = [];
+
+    function flush() {
+        /* jshint loopfunc: true */
+        var task, domain;
+
+        while (head.next) {
+            head = head.next;
+            task = head.task;
+            head.task = void 0;
+            domain = head.domain;
+
+            if (domain) {
+                head.domain = void 0;
+                domain.enter();
+            }
+            runSingle(task, domain);
+
+        }
+        while (laterQueue.length) {
+            task = laterQueue.pop();
+            runSingle(task);
+        }
+        flushing = false;
+    }
+    // runs a single function in the async queue
+    function runSingle(task, domain) {
+        try {
+            task();
+
+        } catch (e) {
+            if (isNodeJS) {
+                // In node, uncaught exceptions are considered fatal errors.
+                // Re-throw them synchronously to interrupt flushing!
+
+                // Ensure continuation if the uncaught exception is suppressed
+                // listening "uncaughtException" events (as domains does).
+                // Continue in next event to avoid tick recursion.
+                if (domain) {
+                    domain.exit();
+                }
+                setTimeout(flush, 0);
+                if (domain) {
+                    domain.enter();
+                }
+
+                throw e;
+
+            } else {
+                // In browsers, uncaught exceptions are not fatal.
+                // Re-throw them asynchronously to avoid slow-downs.
+                setTimeout(function () {
+                    throw e;
+                }, 0);
+            }
+        }
+
+        if (domain) {
+            domain.exit();
+        }
+    }
+
+    nextTick = function (task) {
+        tail = tail.next = {
+            task: task,
+            domain: isNodeJS && process.domain,
+            next: null
+        };
+
+        if (!flushing) {
+            flushing = true;
+            requestTick();
+        }
+    };
+
+    if (typeof process === "object" &&
+        process.toString() === "[object process]" && process.nextTick) {
+        // Ensure Q is in a real Node environment, with a `process.nextTick`.
+        // To see through fake Node environments:
+        // * Mocha test runner - exposes a `process` global without a `nextTick`
+        // * Browserify - exposes a `process.nexTick` function that uses
+        //   `setTimeout`. In this case `setImmediate` is preferred because
+        //    it is faster. Browserify's `process.toString()` yields
+        //   "[object Object]", while in a real Node environment
+        //   `process.nextTick()` yields "[object process]".
+        isNodeJS = true;
+
+        requestTick = function () {
+            process.nextTick(flush);
+        };
+
+    } else if (typeof setImmediate === "function") {
+        // In IE10, Node.js 0.9+, or https://github.com/NobleJS/setImmediate
+        if (typeof window !== "undefined") {
+            requestTick = setImmediate.bind(window, flush);
+        } else {
+            requestTick = function () {
+                setImmediate(flush);
+            };
+        }
+
+    } else if (typeof MessageChannel !== "undefined") {
+        // modern browsers
+        // http://www.nonblocking.io/2011/06/windownexttick.html
+        var channel = new MessageChannel();
+        // At least Safari Version 6.0.5 (8536.30.1) intermittently cannot create
+        // working message ports the first time a page loads.
+        channel.port1.onmessage = function () {
+            requestTick = requestPortTick;
+            channel.port1.onmessage = flush;
+            flush();
+        };
+        var requestPortTick = function () {
+            // Opera requires us to provide a message payload, regardless of
+            // whether we use it.
+            channel.port2.postMessage(0);
+        };
+        requestTick = function () {
+            setTimeout(flush, 0);
+            requestPortTick();
+        };
+
+    } else {
+        // old browsers
+        requestTick = function () {
+            setTimeout(flush, 0);
+        };
+    }
+    // runs a task after all other tasks have been run
+    // this is useful for unhandled rejection tracking that needs to happen
+    // after all `then`d tasks have been run.
+    nextTick.runAfter = function (task) {
+        laterQueue.push(task);
+        if (!flushing) {
+            flushing = true;
+            requestTick();
+        }
+    };
+    return nextTick;
+})();
+
+// Attempt to make generics safe in the face of downstream
+// modifications.
+// There is no situation where this is necessary.
+// If you need a security guarantee, these primordials need to be
+// deeply frozen anyway, and if you don’t need a security guarantee,
+// this is just plain paranoid.
+// However, this **might** have the nice side-effect of reducing the size of
+// the minified code by reducing x.call() to merely x()
+// See Mark Miller’s explanation of what this does.
+// http://wiki.ecmascript.org/doku.php?id=conventions:safe_meta_programming
+var call = Function.call;
+function uncurryThis(f) {
+    return function () {
+        return call.apply(f, arguments);
+    };
+}
+// This is equivalent, but slower:
+// uncurryThis = Function_bind.bind(Function_bind.call);
+// http://jsperf.com/uncurrythis
+
+var array_slice = uncurryThis(Array.prototype.slice);
+
+var array_reduce = uncurryThis(
+    Array.prototype.reduce || function (callback, basis) {
+        var index = 0,
+            length = this.length;
+        // concerning the initial value, if one is not provided
+        if (arguments.length === 1) {
+            // seek to the first value in the array, accounting
+            // for the possibility that is is a sparse array
+            do {
+                if (index in this) {
+                    basis = this[index++];
+                    break;
+                }
+                if (++index >= length) {
+                    throw new TypeError();
+                }
+            } while (1);
+        }
+        // reduce
+        for (; index < length; index++) {
+            // account for the possibility that the array is sparse
+            if (index in this) {
+                basis = callback(basis, this[index], index);
+            }
+        }
+        return basis;
+    }
+);
+
+var array_indexOf = uncurryThis(
+    Array.prototype.indexOf || function (value) {
+        // not a very good shim, but good enough for our one use of it
+        for (var i = 0; i < this.length; i++) {
+            if (this[i] === value) {
+                return i;
+            }
+        }
+        return -1;
+    }
+);
+
+var array_map = uncurryThis(
+    Array.prototype.map || function (callback, thisp) {
+        var self = this;
+        var collect = [];
+        array_reduce(self, function (undefined, value, index) {
+            collect.push(callback.call(thisp, value, index, self));
+        }, void 0);
+        return collect;
+    }
+);
+
+var object_create = Object.create || function (prototype) {
+    function Type() { }
+    Type.prototype = prototype;
+    return new Type();
+};
+
+var object_hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);
+
+var object_keys = Object.keys || function (object) {
+    var keys = [];
+    for (var key in object) {
+        if (object_hasOwnProperty(object, key)) {
+            keys.push(key);
+        }
+    }
+    return keys;
+};
+
+var object_toString = uncurryThis(Object.prototype.toString);
+
+function isObject(value) {
+    return value === Object(value);
+}
+
+// generator related shims
+
+// FIXME: Remove this function once ES6 generators are in SpiderMonkey.
+function isStopIteration(exception) {
+    return (
+        object_toString(exception) === "[object StopIteration]" ||
+        exception instanceof QReturnValue
+    );
+}
+
+// FIXME: Remove this helper and Q.return once ES6 generators are in
+// SpiderMonkey.
+var QReturnValue;
+if (typeof ReturnValue !== "undefined") {
+    QReturnValue = ReturnValue;
+} else {
+    QReturnValue = function (value) {
+        this.value = value;
+    };
+}
+
+// long stack traces
+
+var STACK_JUMP_SEPARATOR = "From previous event:";
+
+function makeStackTraceLong(error, promise) {
+    // If possible, transform the error stack trace by removing Node and Q
+    // cruft, then concatenating with the stack trace of `promise`. See #57.
+    if (hasStacks &&
+        promise.stack &&
+        typeof error === "object" &&
+        error !== null &&
+        error.stack &&
+        error.stack.indexOf(STACK_JUMP_SEPARATOR) === -1
+    ) {
+        var stacks = [];
+        for (var p = promise; !!p; p = p.source) {
+            if (p.stack) {
+                stacks.unshift(p.stack);
+            }
+        }
+        stacks.unshift(error.stack);
+
+        var concatedStacks = stacks.join("\n" + STACK_JUMP_SEPARATOR + "\n");
+        error.stack = filterStackString(concatedStacks);
+    }
+}
+
+function filterStackString(stackString) {
+    var lines = stackString.split("\n");
+    var desiredLines = [];
+    for (var i = 0; i < lines.length; ++i) {
+        var line = lines[i];
+
+        if (!isInternalFrame(line) && !isNodeFrame(line) && line) {
+            desiredLines.push(line);
+        }
+    }
+    return desiredLines.join("\n");
+}
+
+function isNodeFrame(stackLine) {
+    return stackLine.indexOf("(module.js:") !== -1 ||
+           stackLine.indexOf("(node.js:") !== -1;
+}
+
+function getFileNameAndLineNumber(stackLine) {
+    // Named functions: "at functionName (filename:lineNumber:columnNumber)"
+    // In IE10 function name can have spaces ("Anonymous function") O_o
+    var attempt1 = /at .+ \((.+):(\d+):(?:\d+)\)$/.exec(stackLine);
+    if (attempt1) {
+        return [attempt1[1], Number(attempt1[2])];
+    }
+
+    // Anonymous functions: "at filename:lineNumber:columnNumber"
+    var attempt2 = /at ([^ ]+):(\d+):(?:\d+)$/.exec(stackLine);
+    if (attempt2) {
+        return [attempt2[1], Number(attempt2[2])];
+    }
+
+    // Firefox style: "function@filename:lineNumber or @filename:lineNumber"
+    var attempt3 = /.*@(.+):(\d+)$/.exec(stackLine);
+    if (attempt3) {
+        return [attempt3[1], Number(attempt3[2])];
+    }
+}
+
+function isInternalFrame(stackLine) {
+    var fileNameAndLineNumber = getFileNameAndLineNumber(stackLine);
+
+    if (!fileNameAndLineNumber) {
+        return false;
+    }
+
+    var fileName = fileNameAndLineNumber[0];
+    var lineNumber = fileNameAndLineNumber[1];
+
+    return fileName === qFileName &&
+        lineNumber >= qStartingLine &&
+        lineNumber <= qEndingLine;
+}
+
+// discover own file name and line number range for filtering stack
+// traces
+function captureLine() {
+    if (!hasStacks) {
+        return;
+    }
+
+    try {
+        throw new Error();
+    } catch (e) {
+        var lines = e.stack.split("\n");
+        var firstLine = lines[0].indexOf("@") > 0 ? lines[1] : lines[2];
+        var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine);
+        if (!fileNameAndLineNumber) {
+            return;
+        }
+
+        qFileName = fileNameAndLineNumber[0];
+        return fileNameAndLineNumber[1];
+    }
+}
+
+function deprecate(callback, name, alternative) {
+    return function () {
+        if (typeof console !== "undefined" &&
+            typeof console.warn === "function") {
+            console.warn(name + " is deprecated, use " + alternative +
+                         " instead.", new Error("").stack);
+        }
+        return callback.apply(callback, arguments);
+    };
+}
+
+// end of shims
+// beginning of real work
+
+/**
+ * Constructs a promise for an immediate reference, passes promises through, or
+ * coerces promises from different systems.
+ * @param value immediate reference or promise
+ */
+function Q(value) {
+    // If the object is already a Promise, return it directly.  This enables
+    // the resolve function to both be used to created references from objects,
+    // but to tolerably coerce non-promises to promises.
+    if (value instanceof Promise) {
+        return value;
+    }
+
+    // assimilate thenables
+    if (isPromiseAlike(value)) {
+        return coerce(value);
+    } else {
+        return fulfill(value);
+    }
+}
+Q.resolve = Q;
+
+/**
+ * Performs a task in a future turn of the event loop.
+ * @param {Function} task
+ */
+Q.nextTick = nextTick;
+
+/**
+ * Controls whether or not long stack traces will be on
+ */
+Q.longStackSupport = false;
+
+// enable long stacks if Q_DEBUG is set
+if (typeof process === "object" && process && process.env && process.env.Q_DEBUG) {
+    Q.longStackSupport = true;
+}
+
+/**
+ * Constructs a {promise, resolve, reject} object.
+ *
+ * `resolve` is a callback to invoke with a more resolved value for the
+ * promise. To fulfill the promise, invoke `resolve` with any value that is
+ * not a thenable. To reject the promise, invoke `resolve` with a rejected
+ * thenable, or invoke `reject` with the reason directly. To resolve the
+ * promise to another thenable, thus putting it in the same state, invoke
+ * `resolve` with that other thenable.
+ */
+Q.defer = defer;
+function defer() {
+    // if "messages" is an "Array", that indicates that the promise has not yet
+    // been resolved.  If it is "undefined", it has been resolved.  Each
+    // element of the messages array is itself an array of complete arguments to
+    // forward to the resolved promise.  We coerce the resolution value to a
+    // promise using the `resolve` function because it handles both fully
+    // non-thenable values and other thenables gracefully.
+    var messages = [], progressListeners = [], resolvedPromise;
+
+    var deferred = object_create(defer.prototype);
+    var promise = object_create(Promise.prototype);
+
+    promise.promiseDispatch = function (resolve, op, operands) {
+        var args = array_slice(arguments);
+        if (messages) {
+            messages.push(args);
+            if (op === "when" && operands[1]) { // progress operand
+                progressListeners.push(operands[1]);
+            }
+        } else {
+            Q.nextTick(function () {
+                resolvedPromise.promiseDispatch.apply(resolvedPromise, args);
+            });
+        }
+    };
+
+    // XXX deprecated
+    promise.valueOf = function () {
+        if (messages) {
+            return promise;
+        }
+        var nearerValue = nearer(resolvedPromise);
+        if (isPromise(nearerValue)) {
+            resolvedPromise = nearerValue; // shorten chain
+        }
+        return nearerValue;
+    };
+
+    promise.inspect = function () {
+        if (!resolvedPromise) {
+            return { state: "pending" };
+        }
+        return resolvedPromise.inspect();
+    };
+
+    if (Q.longStackSupport && hasStacks) {
+        try {
+            throw new Error();
+        } catch (e) {
+            // NOTE: don't try to use `Error.captureStackTrace` or transfer the
+            // accessor around; that causes memory leaks as per GH-111. Just
+            // reify the stack trace as a string ASAP.
+            //
+            // At the same time, cut off the first line; it's always just
+            // "[object Promise]\n", as per the `toString`.
+            promise.stack = e.stack.substring(e.stack.indexOf("\n") + 1);
+        }
+    }
+
+    // NOTE: we do the checks for `resolvedPromise` in each method, instead of
+    // consolidating them into `become`, since otherwise we'd create new
+    // promises with the lines `become(whatever(value))`. See e.g. GH-252.
+
+    function become(newPromise) {
+        resolvedPromise = newPromise;
+        promise.source = newPromise;
+
+        array_reduce(messages, function (undefined, message) {
+            Q.nextTick(function () {
+                newPromise.promiseDispatch.apply(newPromise, message);
+            });
+        }, void 0);
+
+        messages = void 0;
+        progressListeners = void 0;
+    }
+
+    deferred.promise = promise;
+    deferred.resolve = function (value) {
+        if (resolvedPromise) {
+            return;
+        }
+
+        become(Q(value));
+    };
+
+    deferred.fulfill = function (value) {
+        if (resolvedPromise) {
+            return;
+        }
+
+        become(fulfill(value));
+    };
+    deferred.reject = function (reason) {
+        if (resolvedPromise) {
+            return;
+        }
+
+        become(reject(reason));
+    };
+    deferred.notify = function (progress) {
+        if (resolvedPromise) {
+            return;
+        }
+
+        array_reduce(progressListeners, function (undefined, progressListener) {
+            Q.nextTick(function () {
+                progressListener(progress);
+            });
+        }, void 0);
+    };
+
+    return deferred;
+}
+
+/**
+ * Creates a Node-style callback that will resolve or reject the deferred
+ * promise.
+ * @returns a nodeback
+ */
+defer.prototype.makeNodeResolver = function () {
+    var self = this;
+    return function (error, value) {
+        if (error) {
+            self.reject(error);
+        } else if (arguments.length > 2) {
+            self.resolve(array_slice(arguments, 1));
+        } else {
+            self.resolve(value);
+        }
+    };
+};
+
+/**
+ * @param resolver {Function} a function that returns nothing and accepts
+ * the resolve, reject, and notify functions for a deferred.
+ * @returns a promise that may be resolved with the given resolve and reject
+ * functions, or rejected by a thrown exception in resolver
+ */
+Q.Promise = promise; // ES6
+Q.promise = promise;
+function promise(resolver) {
+    if (typeof resolver !== "function") {
+        throw new TypeError("resolver must be a function.");
+    }
+    var deferred = defer();
+    try {
+        resolver(deferred.resolve, deferred.reject, deferred.notify);
+    } catch (reason) {
+        deferred.reject(reason);
+    }
+    return deferred.promise;
+}
+
+promise.race = race; // ES6
+promise.all = all; // ES6
+promise.reject = reject; // ES6
+promise.resolve = Q; // ES6
+
+// XXX experimental.  This method is a way to denote that a local value is
+// serializable and should be immediately dispatched to a remote upon request,
+// instead of passing a reference.
+Q.passByCopy = function (object) {
+    //freeze(object);
+    //passByCopies.set(object, true);
+    return object;
+};
+
+Promise.prototype.passByCopy = function () {
+    //freeze(object);
+    //passByCopies.set(object, true);
+    return this;
+};
+
+/**
+ * If two promises eventually fulfill to the same value, promises that value,
+ * but otherwise rejects.
+ * @param x {Any*}
+ * @param y {Any*}
+ * @returns {Any*} a promise for x and y if they are the same, but a rejection
+ * otherwise.
+ *
+ */
+Q.join = function (x, y) {
+    return Q(x).join(y);
+};
+
+Promise.prototype.join = function (that) {
+    return Q([this, that]).spread(function (x, y) {
+        if (x === y) {
+            // TODO: "===" should be Object.is or equiv
+            return x;
+        } else {
+            throw new Error("Can't join: not the same: " + x + " " + y);
+        }
+    });
+};
+
+/**
+ * Returns a promise for the first of an array of promises to become settled.
+ * @param answers {Array[Any*]} promises to race
+ * @returns {Any*} the first promise to be settled
+ */
+Q.race = race;
+function race(answerPs) {
+    return promise(function (resolve, reject) {
+        // Switch to this once we can assume at least ES5
+        // answerPs.forEach(function (answerP) {
+        //     Q(answerP).then(resolve, reject);
+        // });
+        // Use this in the meantime
+        for (var i = 0, len = answerPs.length; i < len; i++) {
+            Q(answerPs[i]).then(resolve, reject);
+        }
+    });
+}
+
+Promise.prototype.race = function () {
+    return this.then(Q.race);
+};
+
+/**
+ * Constructs a Promise with a promise descriptor object and optional fallback
+ * function.  The descriptor contains methods like when(rejected), get(name),
+ * set(name, value), post(name, args), and delete(name), which all
+ * return either a value, a promise for a value, or a rejection.  The fallback
+ * accepts the operation name, a resolver, and any further arguments that would
+ * have been forwarded to the appropriate method above had a method been
+ * provided with the proper name.  The API makes no guarantees about the nature
+ * of the returned object, apart from that it is usable whereever promises are
+ * bought and sold.
+ */
+Q.makePromise = Promise;
+function Promise(descriptor, fallback, inspect) {
+    if (fallback === void 0) {
+        fallback = function (op) {
+            return reject(new Error(
+                "Promise does not support operation: " + op
+            ));
+        };
+    }
+    if (inspect === void 0) {
+        inspect = function () {
+            return {state: "unknown"};
+        };
+    }
+
+    var promise = object_create(Promise.prototype);
+
+    promise.promiseDispatch = function (resolve, op, args) {
+        var result;
+        try {
+            if (descriptor[op]) {
+                result = descriptor[op].apply(promise, args);
+            } else {
+                result = fallback.call(promise, op, args);
+            }
+        } catch (exception) {
+            result = reject(exception);
+        }
+        if (resolve) {
+            resolve(result);
+        }
+    };
+
+    promise.inspect = inspect;
+
+    // XXX deprecated `valueOf` and `exception` support
+    if (inspect) {
+        var inspected = inspect();
+        if (inspected.state === "rejected") {
+            promise.exception = inspected.reason;
+        }
+
+        promise.valueOf = function () {
+            var inspected = inspect();
+            if (inspected.state === "pending" ||
+                inspected.state === "rejected") {
+                return promise;
+            }
+            return inspected.value;
+        };
+    }
+
+    return promise;
+}
+
+Promise.prototype.toString = function () {
+    return "[object Promise]";
+};
+
+Promise.prototype.then = function (fulfilled, rejected, progressed) {
+    var self = this;
+    var deferred = defer();
+    var done = false;   // ensure the untrusted promise makes at most a
+                        // single call to one of the callbacks
+
+    function _fulfilled(value) {
+        try {
+            return typeof fulfilled === "function" ? fulfilled(value) : value;
+        } catch (exception) {
+            return reject(exception);
+        }
+    }
+
+    function _rejected(exception) {
+        if (typeof rejected === "function") {
+            makeStackTraceLong(exception, self);
+            try {
+                return rejected(exception);
+            } catch (newException) {
+                return reject(newException);
+            }
+        }
+        return reject(exception);
+    }
+
+    function _progressed(value) {
+        return typeof progressed === "function" ? progressed(value) : value;
+    }
+
+    Q.nextTick(function () {
+        self.promiseDispatch(function (value) {
+            if (done) {
+                return;
+            }
+            done = true;
+
+            deferred.resolve(_fulfilled(value));
+        }, "when", [function (exception) {
+            if (done) {
+                return;
+            }
+            done = true;
+
+            deferred.resolve(_rejected(exception));
+        }]);
+    });
+
+    // Progress propagator need to be attached in the current tick.
+    self.promiseDispatch(void 0, "when", [void 0, function (value) {
+        var newValue;
+        var threw = false;
+        try {
+            newValue = _progressed(value);
+        } catch (e) {
+            threw = true;
+            if (Q.onerror) {
+                Q.onerror(e);
+            } else {
+                throw e;
+            }
+        }
+
+        if (!threw) {
+            deferred.notify(newValue);
+        }
+    }]);
+
+    return deferred.promise;
+};
+
+Q.tap = function (promise, callback) {
+    return Q(promise).tap(callback);
+};
+
+/**
+ * Works almost like "finally", but not called for rejections.
+ * Original resolution value is passed through callback unaffected.
+ * Callback may return a promise that will be awaited for.
+ * @param {Function} callback
+ * @returns {Q.Promise}
+ * @example
+ * doSomething()
+ *   .then(...)
+ *   .tap(console.log)
+ *   .then(...);
+ */
+Promise.prototype.tap = function (callback) {
+    callback = Q(callback);
+
+    return this.then(function (value) {
+        return callback.fcall(value).thenResolve(value);
+    });
+};
+
+/**
+ * Registers an observer on a promise.
+ *
+ * Guarantees:
+ *
+ * 1. that fulfilled and rejected will be called only once.
+ * 2. that either the fulfilled callback or the rejected callback will be
+ *    called, but not both.
+ * 3. that fulfilled and rejected will not be called in this turn.
+ *
+ * @param value      promise or immediate reference to observe
+ * @param fulfilled  function to be called with the fulfilled value
+ * @param rejected   function to be called with the rejection exception
+ * @param progressed function to be called on any progress notifications
+ * @return promise for the return value from the invoked callback
+ */
+Q.when = when;
+function when(value, fulfilled, rejected, progressed) {
+    return Q(value).then(fulfilled, rejected, progressed);
+}
+
+Promise.prototype.thenResolve = function (value) {
+    return this.then(function () { return value; });
+};
+
+Q.thenResolve = function (promise, value) {
+    return Q(promise).thenResolve(value);
+};
+
+Promise.prototype.thenReject = function (reason) {
+    return this.then(function () { throw reason; });
+};
+
+Q.thenReject = function (promise, reason) {
+    return Q(promise).thenReject(reason);
+};
+
+/**
+ * If an object is not a promise, it is as "near" as possible.
+ * If a promise is rejected, it is as "near" as possible too.
+ * If it’s a fulfilled promise, the fulfillment value is nearer.
+ * If it’s a deferred promise and the deferred has been resolved, the
+ * resolution is "nearer".
+ * @param object
+ * @returns most resolved (nearest) form of the object
+ */
+
+// XXX should we re-do this?
+Q.nearer = nearer;
+function nearer(value) {
+    if (isPromise(value)) {
+        var inspected = value.inspect();
+        if (inspected.state === "fulfilled") {
+            return inspected.value;
+        }
+    }
+    return value;
+}
+
+/**
+ * @returns whether the given object is a promise.
+ * Otherwise it is a fulfilled value.
+ */
+Q.isPromise = isPromise;
+function isPromise(object) {
+    return object instanceof Promise;
+}
+
+Q.isPromiseAlike = isPromiseAlike;
+function isPromiseAlike(object) {
+    return isObject(object) && typeof object.then === "function";
+}
+
+/**
+ * @returns whether the given object is a pending promise, meaning not
+ * fulfilled or rejected.
+ */
+Q.isPending = isPending;
+function isPending(object) {
+    return isPromise(object) && object.inspect().state === "pending";
+}
+
+Promise.prototype.isPending = function () {
+    return this.inspect().state === "pending";
+};
+
+/**
+ * @returns whether the given object is a value or fulfilled
+ * promise.
+ */
+Q.isFulfilled = isFulfilled;
+function isFulfilled(object) {
+    return !isPromise(object) || object.inspect().state === "fulfilled";
+}
+
+Promise.prototype.isFulfilled = function () {
+    return this.inspect().state === "fulfilled";
+};
+
+/**
+ * @returns whether the given object is a rejected promise.
+ */
+Q.isRejected = isRejected;
+function isRejected(object) {
+    return isPromise(object) && object.inspect().state === "rejected";
+}
+
+Promise.prototype.isRejected = function () {
+    return this.inspect().state === "rejected";
+};
+
+//// BEGIN UNHANDLED REJECTION TRACKING
+
+// This promise library consumes exceptions thrown in handlers so they can be
+// handled by a subsequent promise.  The exceptions get added to this array when
+// they are created, and removed when they are handled.  Note that in ES6 or
+// shimmed environments, this would naturally be a `Set`.
+var unhandledReasons = [];
+var unhandledRejections = [];
+var reportedUnhandledRejections = [];
+var trackUnhandledRejections = true;
+
+function resetUnhandledRejections() {
+    unhandledReasons.length = 0;
+    unhandledRejections.length = 0;
+
+    if (!trackUnhandledRejections) {
+        trackUnhandledRejections = true;
+    }
+}
+
+function trackRejection(promise, reason) {
+    if (!trackUnhandledRejections) {
+        return;
+    }
+    if (typeof process === "object" && typeof process.emit === "function") {
+        Q.nextTick.runAfter(function () {
+            if (array_indexOf(unhandledRejections, promise) !== -1) {
+                process.emit("unhandledRejection", reason, promise);
+                reportedUnhandledRejections.push(promise);
+            }
+        });
+    }
+
+    unhandledRejections.push(promise);
+    if (reason && typeof reason.stack !== "undefined") {
+        unhandledReasons.push(reason.stack);
+    } else {
+        unhandledReasons.push("(no stack) " + reason);
+    }
+}
+
+function untrackRejection(promise) {
+    if (!trackUnhandledRejections) {
+        return;
+    }
+
+    var at = array_indexOf(unhandledRejections, promise);
+    if (at !== -1) {
+        if (typeof process === "object" && typeof process.emit === "function") {
+            Q.nextTick.runAfter(function () {
+                var atReport = array_indexOf(reportedUnhandledRejections, promise);
+                if (atReport !== -1) {
+                    process.emit("rejectionHandled", unhandledReasons[at], promise);
+                    reportedUnhandledRejections.splice(atReport, 1);
+                }
+            });
+        }
+        unhandledRejections.splice(at, 1);
+        unhandledReasons.splice(at, 1);
+    }
+}
+
+Q.resetUnhandledRejections = resetUnhandledRejections;
+
+Q.getUnhandledReasons = function () {
+    // Make a copy so that consumers can't interfere with our internal state.
+    return unhandledReasons.slice();
+};
+
+Q.stopUnhandledRejectionTracking = function () {
+    resetUnhandledRejections();
+    trackUnhandledRejections = false;
+};
+
+resetUnhandledRejections();
+
+//// END UNHANDLED REJECTION TRACKING
+
+/**
+ * Constructs a rejected promise.
+ * @param reason value describing the failure
+ */
+Q.reject = reject;
+function reject(reason) {
+    var rejection = Promise({
+        "when": function (rejected) {
+            // note that the error has been handled
+            if (rejected) {
+                untrackRejection(this);
+            }
+            return rejected ? rejected(reason) : this;
+        }
+    }, function fallback() {
+        return this;
+    }, function inspect() {
+        return { state: "rejected", reason: reason };
+    });
+
+    // Note that the reason has not been handled.
+    trackRejection(rejection, reason);
+
+    return rejection;
+}
+
+/**
+ * Constructs a fulfilled promise for an immediate reference.
+ * @param value immediate reference
+ */
+Q.fulfill = fulfill;
+function fulfill(value) {
+    return Promise({
+        "when": function () {
+            return value;
+        },
+        "get": function (name) {
+            return value[name];
+        },
+        "set": function (name, rhs) {
+            value[name] = rhs;
+        },
+        "delete": function (name) {
+            delete value[name];
+        },
+        "post": function (name, args) {
+            // Mark Miller proposes that post with no name should apply a
+            // promised function.
+            if (name === null || name === void 0) {
+                return value.apply(void 0, args);
+            } else {
+                return value[name].apply(value, args);
+            }
+        },
+        "apply": function (thisp, args) {
+            return value.apply(thisp, args);
+        },
+        "keys": function () {
+            return object_keys(value);
+        }
+    }, void 0, function inspect() {
+        return { state: "fulfilled", value: value };
+    });
+}
+
+/**
+ * Converts thenables to Q promises.
+ * @param promise thenable promise
+ * @returns a Q promise
+ */
+function coerce(promise) {
+    var deferred = defer();
+    Q.nextTick(function () {
+        try {
+            promise.then(deferred.resolve, deferred.reject, deferred.notify);
+        } catch (exception) {
+            deferred.reject(exception);
+        }
+    });
+    return deferred.promise;
+}
+
+/**
+ * Annotates an object such that it will never be
+ * transferred away from this process over any promise
+ * communication channel.
+ * @param object
+ * @returns promise a wrapping of that object that
+ * additionally responds to the "isDef" message
+ * without a rejection.
+ */
+Q.master = master;
+function master(object) {
+    return Promise({
+        "isDef": function () {}
+    }, function fallback(op, args) {
+        return dispatch(object, op, args);
+    }, function () {
+        return Q(object).inspect();
+    });
+}
+
+/**
+ * Spreads the values of a promised array of arguments into the
+ * fulfillment callback.
+ * @param fulfilled callback that receives variadic arguments from the
+ * promised array
+ * @param rejected callback that receives the exception if the promise
+ * is rejected.
+ * @returns a promise for the return value or thrown exception of
+ * either callback.
+ */
+Q.spread = spread;
+function spread(value, fulfilled, rejected) {
+    return Q(value).spread(fulfilled, rejected);
+}
+
+Promise.prototype.spread = function (fulfilled, rejected) {
+    return this.all().then(function (array) {
+        return fulfilled.apply(void 0, array);
+    }, rejected);
+};
+
+/**
+ * The async function is a decorator for generator functions, turning
+ * them into asynchronous generators.  Although generators are only part
+ * of the newest ECMAScript 6 drafts, this code does not cause syntax
+ * errors in older engines.  This code should continue to work and will
+ * in fact improve over time as the language improves.
+ *
+ * ES6 generators are currently part of V8 version 3.19 with the
+ * --harmony-generators runtime flag enabled.  SpiderMonkey has had them
+ * for longer, but under an older Python-inspired form.  This function
+ * works on both kinds of generators.
+ *
+ * Decorates a generator function such that:
+ *  - it may yield promises
+ *  - execution will continue when that promise is fulfilled
+ *  - the value of the yield expression will be the fulfilled value
+ *  - it returns a promise for the return value (when the generator
+ *    stops iterating)
+ *  - the decorated function returns a promise for the return value
+ *    of the generator or the first rejected promise among those
+ *    yielded.
+ *  - if an error is thrown in the generator, it propagates through
+ *    every following yield until it is caught, or until it escapes
+ *    the generator function altogether, and is translated into a
+ *    rejection for the promise returned by the decorated generator.
+ */
+Q.async = async;
+function async(makeGenerator) {
+    return function () {
+        // when verb is "send", arg is a value
+        // when verb is "throw", arg is an exception
+        function continuer(verb, arg) {
+            var result;
+
+            // Until V8 3.19 / Chromium 29 is released, SpiderMonkey is the only
+            // engine that has a deployed base of browsers that support generators.
+            // However, SM's generators use the Python-inspired semantics of
+            // outdated ES6 drafts.  We would like to support ES6, but we'd also
+            // like to make it possible to use generators in deployed browsers, so
+            // we also support Python-style generators.  At some point we can remove
+            // this block.
+
+            if (typeof StopIteration === "undefined") {
+                // ES6 Generators
+                try {
+                    result = generator[verb](arg);
+                } catch (exception) {
+                    return reject(exception);
+                }
+                if (result.done) {
+                    return Q(result.value);
+                } else {
+                    return when(result.value, callback, errback);
+                }
+            } else {
+                // SpiderMonkey Generators
+                // FIXME: Remove this case when SM does ES6 generators.
+                try {
+                    result = generator[verb](arg);
+                } catch (exception) {
+                    if (isStopIteration(exception)) {
+                        return Q(exception.value);
+                    } else {
+                        return reject(exception);
+                    }
+                }
+                return when(result, callback, errback);
+            }
+        }
+        var generator = makeGenerator.apply(this, arguments);
+        var callback = continuer.bind(continuer, "next");
+        var errback = continuer.bind(continuer, "throw");
+        return callback();
+    };
+}
+
+/**
+ * The spawn function is a small wrapper around async that immediately
+ * calls the generator and also ends the promise chain, so that any
+ * unhandled errors are thrown instead of forwarded to the error
+ * handler. This is useful because it's extremely common to run
+ * generators at the top-level to work with libraries.
+ */
+Q.spawn = spawn;
+function spawn(makeGenerator) {
+    Q.done(Q.async(makeGenerator)());
+}
+
+// FIXME: Remove this interface once ES6 generators are in SpiderMonkey.
+/**
+ * Throws a ReturnValue exception to stop an asynchronous generator.
+ *
+ * This interface is a stop-gap measure to support generator return
+ * values in older Firefox/SpiderMonkey.  In browsers that support ES6
+ * generators like Chromium 29, just use "return" in your generator
+ * functions.
+ *
+ * @param value the return value for the surrounding generator
+ * @throws ReturnValue exception with the value.
+ * @example
+ * // ES6 style
+ * Q.async(function* () {
+ *      var foo = yield getFooPromise();
+ *      var bar = yield getBarPromise();
+ *      return foo + bar;
+ * })
+ * // Older SpiderMonkey style
+ * Q.async(function () {
+ *      var foo = yield getFooPromise();
+ *      var bar = yield getBarPromise();
+ *      Q.return(foo + bar);
+ * })
+ */
+Q["return"] = _return;
+function _return(value) {
+    throw new QReturnValue(value);
+}
+
+/**
+ * The promised function decorator ensures that any promise arguments
+ * are settled and passed as values (`this` is also settled and passed
+ * as a value).  It will also ensure that the result of a function is
+ * always a promise.
+ *
+ * @example
+ * var add = Q.promised(function (a, b) {
+ *     return a + b;
+ * });
+ * add(Q(a), Q(B));
+ *
+ * @param {function} callback The function to decorate
+ * @returns {function} a function that has been decorated.
+ */
+Q.promised = promised;
+function promised(callback) {
+    return function () {
+        return spread([this, all(arguments)], function (self, args) {
+            return callback.apply(self, args);
+        });
+    };
+}
+
+/**
+ * sends a message to a value in a future turn
+ * @param object* the recipient
+ * @param op the name of the message operation, e.g., "when",
+ * @param args further arguments to be forwarded to the operation
+ * @returns result {Promise} a promise for the result of the operation
+ */
+Q.dispatch = dispatch;
+function dispatch(object, op, args) {
+    return Q(object).dispatch(op, args);
+}
+
+Promise.prototype.dispatch = function (op, args) {
+    var self = this;
+    var deferred = defer();
+    Q.nextTick(function () {
+        self.promiseDispatch(deferred.resolve, op, args);
+    });
+    return deferred.promise;
+};
+
+/**
+ * Gets the value of a property in a future turn.
+ * @param object    promise or immediate reference for target object
+ * @param name      name of property to get
+ * @return promise for the property value
+ */
+Q.get = function (object, key) {
+    return Q(object).dispatch("get", [key]);
+};
+
+Promise.prototype.get = function (key) {
+    return this.dispatch("get", [key]);
+};
+
+/**
+ * Sets the value of a property in a future turn.
+ * @param object    promise or immediate reference for object object
+ * @param name      name of property to set
+ * @param value     new value of property
+ * @return promise for the return value
+ */
+Q.set = function (object, key, value) {
+    return Q(object).dispatch("set", [key, value]);
+};
+
+Promise.prototype.set = function (key, value) {
+    return this.dispatch("set", [key, value]);
+};
+
+/**
+ * Deletes a property in a future turn.
+ * @param object    promise or immediate reference for target object
+ * @param name      name of property to delete
+ * @return promise for the return value
+ */
+Q.del = // XXX legacy
+Q["delete"] = function (object, key) {
+    return Q(object).dispatch("delete", [key]);
+};
+
+Promise.prototype.del = // XXX legacy
+Promise.prototype["delete"] = function (key) {
+    return this.dispatch("delete", [key]);
+};
+
+/**
+ * Invokes a method in a future turn.
+ * @param object    promise or immediate reference for target object
+ * @param name      name of method to invoke
+ * @param value     a value to post, typically an array of
+ *                  invocation arguments for promises that
+ *                  are ultimately backed with `resolve` values,
+ *                  as opposed to those backed with URLs
+ *                  wherein the posted value can be any
+ *                  JSON serializable object.
+ * @return promise for the return value
+ */
+// bound locally because it is used by other methods
+Q.mapply = // XXX As proposed by "Redsandro"
+Q.post = function (object, name, args) {
+    return Q(object).dispatch("post", [name, args]);
+};
+
+Promise.prototype.mapply = // XXX As proposed by "Redsandro"
+Promise.prototype.post = function (name, args) {
+    return this.dispatch("post", [name, args]);
+};
+
+/**
+ * Invokes a method in a future turn.
+ * @param object    promise or immediate reference for target object
+ * @param name      name of method to invoke
+ * @param ...args   array of invocation arguments
+ * @return promise for the return value
+ */
+Q.send = // XXX Mark Miller's proposed parlance
+Q.mcall = // XXX As proposed by "Redsandro"
+Q.invoke = function (object, name /*...args*/) {
+    return Q(object).dispatch("post", [name, array_slice(arguments, 2)]);
+};
+
+Promise.prototype.send = // XXX Mark Miller's proposed parlance
+Promise.prototype.mcall = // XXX As proposed by "Redsandro"
+Promise.prototype.invoke = function (name /*...args*/) {
+    return this.dispatch("post", [name, array_slice(arguments, 1)]);
+};
+
+/**
+ * Applies the promised function in a future turn.
+ * @param object    promise or immediate reference for target function
+ * @param args      array of application arguments
+ */
+Q.fapply = function (object, args) {
+    return Q(object).dispatch("apply", [void 0, args]);
+};
+
+Promise.prototype.fapply = function (args) {
+    return this.dispatch("apply", [void 0, args]);
+};
+
+/**
+ * Calls the promised function in a future turn.
+ * @param object    promise or immediate reference for target function
+ * @param ...args   array of application arguments
+ */
+Q["try"] =
+Q.fcall = function (object /* ...args*/) {
+    return Q(object).dispatch("apply", [void 0, array_slice(arguments, 1)]);
+};
+
+Promise.prototype.fcall = function (/*...args*/) {
+    return this.dispatch("apply", [void 0, array_slice(arguments)]);
+};
+
+/**
+ * Binds the promised function, transforming return values into a fulfilled
+ * promise and thrown errors into a rejected one.
+ * @param object    promise or immediate reference for target function
+ * @param ...args   array of application arguments
+ */
+Q.fbind = function (object /*...args*/) {
+    var promise = Q(object);
+    var args = array_slice(arguments, 1);
+    return function fbound() {
+        return promise.dispatch("apply", [
+            this,
+            args.concat(array_slice(arguments))
+        ]);
+    };
+};
+Promise.prototype.fbind = function (/*...args*/) {
+    var promise = this;
+    var args = array_slice(arguments);
+    return function fbound() {
+        return promise.dispatch("apply", [
+            this,
+            args.concat(array_slice(arguments))
+        ]);
+    };
+};
+
+/**
+ * Requests the names of the owned properties of a promised
+ * object in a future turn.
+ * @param object    promise or immediate reference for target object
+ * @return promise for the keys of the eventually settled object
+ */
+Q.keys = function (object) {
+    return Q(object).dispatch("keys", []);
+};
+
+Promise.prototype.keys = function () {
+    return this.dispatch("keys", []);
+};
+
+/**
+ * Turns an array of promises into a promise for an array.  If any of
+ * the promises gets rejected, the whole array is rejected immediately.
+ * @param {Array*} an array (or promise for an array) of values (or
+ * promises for values)
+ * @returns a promise for an array of the corresponding values
+ */
+// By Mark Miller
+// http://wiki.ecmascript.org/doku.php?id=strawman:concurrency&rev=1308776521#allfulfilled
+Q.all = all;
+function all(promises) {
+    return when(promises, function (promises) {
+        var pendingCount = 0;
+        var deferred = defer();
+        array_reduce(promises, function (undefined, promise, index) {
+            var snapshot;
+            if (
+                isPromise(promise) &&
+                (snapshot = promise.inspect()).state === "fulfilled"
+            ) {
+                promises[index] = snapshot.value;
+            } else {
+                ++pendingCount;
+                when(
+                    promise,
+                    function (value) {
+                        promises[index] = value;
+                        if (--pendingCount === 0) {
+                            deferred.resolve(promises);
+                        }
+                    },
+                    deferred.reject,
+                    function (progress) {
+                        deferred.notify({ index: index, value: progress });
+                    }
+                );
+            }
+        }, void 0);
+        if (pendingCount === 0) {
+            deferred.resolve(promises);
+        }
+        return deferred.promise;
+    });
+}
+
+Promise.prototype.all = function () {
+    return all(this);
+};
+
+/**
+ * Returns the first resolved promise of an array. Prior rejected promises are
+ * ignored.  Rejects only if all promises are rejected.
+ * @param {Array*} an array containing values or promises for values
+ * @returns a promise fulfilled with the value of the first resolved promise,
+ * or a rejected promise if all promises are rejected.
+ */
+Q.any = any;
+
+function any(promises) {
+    if (promises.length === 0) {
+        return Q.resolve();
+    }
+
+    var deferred = Q.defer();
+    var pendingCount = 0;
+    array_reduce(promises, function (prev, current, index) {
+        var promise = promises[index];
+
+        pendingCount++;
+
+        when(promise, onFulfilled, onRejected, onProgress);
+        function onFulfilled(result) {
+            deferred.resolve(result);
+        }
+        function onRejected() {
+            pendingCount--;
+            if (pendingCount === 0) {
+                deferred.reject(new Error(
+                    "Can't get fulfillment value from any promise, all " +
+                    "promises were rejected."
+                ));
+            }
+        }
+        function onProgress(progress) {
+            deferred.notify({
+                index: index,
+                value: progress
+            });
+        }
+    }, undefined);
+
+    return deferred.promise;
+}
+
+Promise.prototype.any = function () {
+    return any(this);
+};
+
+/**
+ * Waits for all promises to be settled, either fulfilled or
+ * rejected.  This is distinct from `all` since that would stop
+ * waiting at the first rejection.  The promise returned by
+ * `allResolved` will never be rejected.
+ * @param promises a promise for an array (or an array) of promises
+ * (or values)
+ * @return a promise for an array of promises
+ */
+Q.allResolved = deprecate(allResolved, "allResolved", "allSettled");
+function allResolved(promises) {
+    return when(promises, function (promises) {
+        promises = array_map(promises, Q);
+        return when(all(array_map(promises, function (promise) {
+            return when(promise, noop, noop);
+        })), function () {
+            return promises;
+        });
+    });
+}
+
+Promise.prototype.allResolved = function () {
+    return allResolved(this);
+};
+
+/**
+ * @see Promise#allSettled
+ */
+Q.allSettled = allSettled;
+function allSettled(promises) {
+    return Q(promises).allSettled();
+}
+
+/**
+ * Turns an array of promises into a promise for an array of their states (as
+ * returned by `inspect`) when they have all settled.
+ * @param {Array[Any*]} values an array (or promise for an array) of values (or
+ * promises for values)
+ * @returns {Array[State]} an array of states for the respective values.
+ */
+Promise.prototype.allSettled = function () {
+    return this.then(function (promises) {
+        return all(array_map(promises, function (promise) {
+            promise = Q(promise);
+            function regardless() {
+                return promise.inspect();
+            }
+            return promise.then(regardless, regardless);
+        }));
+    });
+};
+
+/**
+ * Captures the failure of a promise, giving an oportunity to recover
+ * with a callback.  If the given promise is fulfilled, the returned
+ * promise is fulfilled.
+ * @param {Any*} promise for something
+ * @param {Function} callback to fulfill the returned promise if the
+ * given promise is rejected
+ * @returns a promise for the return value of the callback
+ */
+Q.fail = // XXX legacy
+Q["catch"] = function (object, rejected) {
+    return Q(object).then(void 0, rejected);
+};
+
+Promise.prototype.fail = // XXX legacy
+Promise.prototype["catch"] = function (rejected) {
+    return this.then(void 0, rejected);
+};
+
+/**
+ * Attaches a listener that can respond to progress notifications from a
+ * promise's originating deferred. This listener receives the exact arguments
+ * passed to ``deferred.notify``.
+ * @param {Any*} promise for something
+ * @param {Function} callback to receive any progress notifications
+ * @returns the given promise, unchanged
+ */
+Q.progress = progress;
+function progress(object, progressed) {
+    return Q(object).then(void 0, void 0, progressed);
+}
+
+Promise.prototype.progress = function (progressed) {
+    return this.then(void 0, void 0, progressed);
+};
+
+/**
+ * Provides an opportunity to observe the settling of a promise,
+ * regardless of whether the promise is fulfilled or rejected.  Forwards
+ * the resolution to the returned promise when the callback is done.
+ * The callback can return a promise to defer completion.
+ * @param {Any*} promise
+ * @param {Function} callback to observe the resolution of the given
+ * promise, takes no arguments.
+ * @returns a promise for the resolution of the given promise when
+ * ``fin`` is done.
+ */
+Q.fin = // XXX legacy
+Q["finally"] = function (object, callback) {
+    return Q(object)["finally"](callback);
+};
+
+Promise.prototype.fin = // XXX legacy
+Promise.prototype["finally"] = function (callback) {
+    callback = Q(callback);
+    return this.then(function (value) {
+        return callback.fcall().then(function () {
+            return value;
+        });
+    }, function (reason) {
+        // TODO attempt to recycle the rejection with "this".
+        return callback.fcall().then(function () {
+            throw reason;
+        });
+    });
+};
+
+/**
+ * Terminates a chain of promises, forcing rejections to be
+ * thrown as exceptions.
+ * @param {Any*} promise at the end of a chain of promises
+ * @returns nothing
+ */
+Q.done = function (object, fulfilled, rejected, progress) {
+    return Q(object).done(fulfilled, rejected, progress);
+};
+
+Promise.prototype.done = function (fulfilled, rejected, progress) {
+    var onUnhandledError = function (error) {
+        // forward to a future turn so that ``when``
+        // does not catch it and turn it into a rejection.
+        Q.nextTick(function () {
+            makeStackTraceLong(error, promise);
+            if (Q.onerror) {
+                Q.onerror(error);
+            } else {
+                throw error;
+            }
+        });
+    };
+
+    // Avoid unnecessary `nextTick`ing via an unnecessary `when`.
+    var promise = fulfilled || rejected || progress ?
+        this.then(fulfilled, rejected, progress) :
+        this;
+
+    if (typeof process === "object" && process && process.domain) {
+        onUnhandledError = process.domain.bind(onUnhandledError);
+    }
+
+    promise.then(void 0, onUnhandledError);
+};
+
+/**
+ * Causes a promise to be rejected if it does not get fulfilled before
+ * some milliseconds time out.
+ * @param {Any*} promise
+ * @param {Number} milliseconds timeout
+ * @param {Any*} custom error message or Error object (optional)
+ * @returns a promise for the resolution of the given promise if it is
+ * fulfilled before the timeout, otherwise rejected.
+ */
+Q.timeout = function (object, ms, error) {
+    return Q(object).timeout(ms, error);
+};
+
+Promise.prototype.timeout = function (ms, error) {
+    var deferred = defer();
+    var timeoutId = setTimeout(function () {
+        if (!error || "string" === typeof error) {
+            error = new Error(error || "Timed out after " + ms + " ms");
+            error.code = "ETIMEDOUT";
+        }
+        deferred.reject(error);
+    }, ms);
+
+    this.then(function (value) {
+        clearTimeout(timeoutId);
+        deferred.resolve(value);
+    }, function (exception) {
+        clearTimeout(timeoutId);
+        deferred.reject(exception);
+    }, deferred.notify);
+
+    return deferred.promise;
+};
+
+/**
+ * Returns a promise for the given value (or promised value), some
+ * milliseconds after it resolved. Passes rejections immediately.
+ * @param {Any*} promise
+ * @param {Number} milliseconds
+ * @returns a promise for the resolution of the given promise after milliseconds
+ * time has elapsed since the resolution of the given promise.
+ * If the given promise rejects, that is passed immediately.
+ */
+Q.delay = function (object, timeout) {
+    if (timeout === void 0) {
+        timeout = object;
+        object = void 0;
+    }
+    return Q(object).delay(timeout);
+};
+
+Promise.prototype.delay = function (timeout) {
+    return this.then(function (value) {
+        var deferred = defer();
+        setTimeout(function () {
+            deferred.resolve(value);
+        }, timeout);
+        return deferred.promise;
+    });
+};
+
+/**
+ * Passes a continuation to a Node function, which is called with the given
+ * arguments provided as an array, and returns a promise.
+ *
+ *      Q.nfapply(FS.readFile, [__filename])
+ *      .then(function (content) {
+ *      })
+ *
+ */
+Q.nfapply = function (callback, args) {
+    return Q(callback).nfapply(args);
+};
+
+Promise.prototype.nfapply = function (args) {
+    var deferred = defer();
+    var nodeArgs = array_slice(args);
+    nodeArgs.push(deferred.makeNodeResolver());
+    this.fapply(nodeArgs).fail(deferred.reject);
+    return deferred.promise;
+};
+
+/**
+ * Passes a continuation to a Node function, which is called with the given
+ * arguments provided individually, and returns a promise.
+ * @example
+ * Q.nfcall(FS.readFile, __filename)
+ * .then(function (content) {
+ * })
+ *
+ */
+Q.nfcall = function (callback /*...args*/) {
+    var args = array_slice(arguments, 1);
+    return Q(callback).nfapply(args);
+};
+
+Promise.prototype.nfcall = function (/*...args*/) {
+    var nodeArgs = array_slice(arguments);
+    var deferred = defer();
+    nodeArgs.push(deferred.makeNodeResolver());
+    this.fapply(nodeArgs).fail(deferred.reject);
+    return deferred.promise;
+};
+
+/**
+ * Wraps a NodeJS continuation passing function and returns an equivalent
+ * version that returns a promise.
+ * @example
+ * Q.nfbind(FS.readFile, __filename)("utf-8")
+ * .then(console.log)
+ * .done()
+ */
+Q.nfbind =
+Q.denodeify = function (callback /*...args*/) {
+    var baseArgs = array_slice(arguments, 1);
+    return function () {
+        var nodeArgs = baseArgs.concat(array_slice(arguments));
+        var deferred = defer();
+        nodeArgs.push(deferred.makeNodeResolver());
+        Q(callback).fapply(nodeArgs).fail(deferred.reject);
+        return deferred.promise;
+    };
+};
+
+Promise.prototype.nfbind =
+Promise.prototype.denodeify = function (/*...args*/) {
+    var args = array_slice(arguments);
+    args.unshift(this);
+    return Q.denodeify.apply(void 0, args);
+};
+
+Q.nbind = function (callback, thisp /*...args*/) {
+    var baseArgs = array_slice(arguments, 2);
+    return function () {
+        var nodeArgs = baseArgs.concat(array_slice(arguments));
+        var deferred = defer();
+        nodeArgs.push(deferred.makeNodeResolver());
+        function bound() {
+            return callback.apply(thisp, arguments);
+        }
+        Q(bound).fapply(nodeArgs).fail(deferred.reject);
+        return deferred.promise;
+    };
+};
+
+Promise.prototype.nbind = function (/*thisp, ...args*/) {
+    var args = array_slice(arguments, 0);
+    args.unshift(this);
+    return Q.nbind.apply(void 0, args);
+};
+
+/**
+ * Calls a method of a Node-style object that accepts a Node-style
+ * callback with a given array of arguments, plus a provided callback.
+ * @param object an object that has the named method
+ * @param {String} name name of the method of object
+ * @param {Array} args arguments to pass to the method; the callback
+ * will be provided by Q and appended to these arguments.
+ * @returns a promise for the value or error
+ */
+Q.nmapply = // XXX As proposed by "Redsandro"
+Q.npost = function (object, name, args) {
+    return Q(object).npost(name, args);
+};
+
+Promise.prototype.nmapply = // XXX As proposed by "Redsandro"
+Promise.prototype.npost = function (name, args) {
+    var nodeArgs = array_slice(args || []);
+    var deferred = defer();
+    nodeArgs.push(deferred.makeNodeResolver());
+    this.dispatch("post", [name, nodeArgs]).fail(deferred.reject);
+    return deferred.promise;
+};
+
+/**
+ * Calls a method of a Node-style object that accepts a Node-style
+ * callback, forwarding the given variadic arguments, plus a provided
+ * callback argument.
+ * @param object an object that has the named method
+ * @param {String} name name of the method of object
+ * @param ...args arguments to pass to the method; the callback will
+ * be provided by Q and appended to these arguments.
+ * @returns a promise for the value or error
+ */
+Q.nsend = // XXX Based on Mark Miller's proposed "send"
+Q.nmcall = // XXX Based on "Redsandro's" proposal
+Q.ninvoke = function (object, name /*...args*/) {
+    var nodeArgs = array_slice(arguments, 2);
+    var deferred = defer();
+    nodeArgs.push(deferred.makeNodeResolver());
+    Q(object).dispatch("post", [name, nodeArgs]).fail(deferred.reject);
+    return deferred.promise;
+};
+
+Promise.prototype.nsend = // XXX Based on Mark Miller's proposed "send"
+Promise.prototype.nmcall = // XXX Based on "Redsandro's" proposal
+Promise.prototype.ninvoke = function (name /*...args*/) {
+    var nodeArgs = array_slice(arguments, 1);
+    var deferred = defer();
+    nodeArgs.push(deferred.makeNodeResolver());
+    this.dispatch("post", [name, nodeArgs]).fail(deferred.reject);
+    return deferred.promise;
+};
+
+/**
+ * If a function would like to support both Node continuation-passing-style and
+ * promise-returning-style, it can end its internal promise chain with
+ * `nodeify(nodeback)`, forwarding the optional nodeback argument.  If the user
+ * elects to use a nodeback, the result will be sent there.  If they do not
+ * pass a nodeback, they will receive the result promise.
+ * @param object a result (or a promise for a result)
+ * @param {Function} nodeback a Node.js-style callback
+ * @returns either the promise or nothing
+ */
+Q.nodeify = nodeify;
+function nodeify(object, nodeback) {
+    return Q(object).nodeify(nodeback);
+}
+
+Promise.prototype.nodeify = function (nodeback) {
+    if (nodeback) {
+        this.then(function (value) {
+            Q.nextTick(function () {
+                nodeback(null, value);
+            });
+        }, function (error) {
+            Q.nextTick(function () {
+                nodeback(error);
+            });
+        });
+    } else {
+        return this;
+    }
+};
+
+Q.noConflict = function() {
+    throw new Error("Q.noConflict only works when Q is used as a global");
+};
+
+// All code before this point will be filtered from stack traces.
+var qEndingLine = captureLine();
+
+return Q;
+
+});
diff --git a/config/tizen/tpk-tools/cli/node_modules/q/queue.js b/config/tizen/tpk-tools/cli/node_modules/q/queue.js
new file mode 100644 (file)
index 0000000..1505fd0
--- /dev/null
@@ -0,0 +1,35 @@
+
+var Q = require("./q");
+
+module.exports = Queue;
+function Queue() {
+    var ends = Q.defer();
+    var closed = Q.defer();
+    return {
+        put: function (value) {
+            var next = Q.defer();
+            ends.resolve({
+                head: value,
+                tail: next.promise
+            });
+            ends.resolve = next.resolve;
+        },
+        get: function () {
+            var result = ends.promise.get("head");
+            ends.promise = ends.promise.get("tail");
+            return result.fail(function (error) {
+                closed.resolve(error);
+                throw error;
+            });
+        },
+        closed: closed.promise,
+        close: function (error) {
+            error = error || new Error("Can't get value from closed queue");
+            var end = {head: Q.reject(error)};
+            end.tail = end;
+            ends.resolve(end);
+            return closed.promise;
+        }
+    };
+}
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/AUTHORS b/config/tizen/tpk-tools/cli/node_modules/sax/AUTHORS
new file mode 100644 (file)
index 0000000..26d8659
--- /dev/null
@@ -0,0 +1,9 @@
+# contributors sorted by whether or not they're me.
+Isaac Z. Schlueter <i@izs.me>
+Stein Martin Hustad <stein@hustad.com>
+Mikeal Rogers <mikeal.rogers@gmail.com>
+Laurie Harper <laurie@holoweb.net>
+Jann Horn <jann@Jann-PC.fritz.box>
+Elijah Insua <tmpvar@gmail.com>
+Henry Rawas <henryr@schakra.com>
+Justin Makeig <jmpublic@makeig.com>
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/LICENSE b/config/tizen/tpk-tools/cli/node_modules/sax/LICENSE
new file mode 100644 (file)
index 0000000..05a4010
--- /dev/null
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+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/config/tizen/tpk-tools/cli/node_modules/sax/README.md b/config/tizen/tpk-tools/cli/node_modules/sax/README.md
new file mode 100644 (file)
index 0000000..9c63dc4
--- /dev/null
@@ -0,0 +1,213 @@
+# sax js
+
+A sax-style parser for XML and HTML.
+
+Designed with [node](http://nodejs.org/) in mind, but should work fine in
+the browser or other CommonJS implementations.
+
+## What This Is
+
+* A very simple tool to parse through an XML string.
+* A stepping stone to a streaming HTML parser.
+* A handy way to deal with RSS and other mostly-ok-but-kinda-broken XML 
+  docs.
+
+## What This Is (probably) Not
+
+* An HTML Parser - That's a fine goal, but this isn't it.  It's just
+  XML.
+* A DOM Builder - You can use it to build an object model out of XML,
+  but it doesn't do that out of the box.
+* XSLT - No DOM = no querying.
+* 100% Compliant with (some other SAX implementation) - Most SAX
+  implementations are in Java and do a lot more than this does.
+* An XML Validator - It does a little validation when in strict mode, but
+  not much.
+* A Schema-Aware XSD Thing - Schemas are an exercise in fetishistic 
+  masochism.
+* A DTD-aware Thing - Fetching DTDs is a much bigger job.
+
+## Regarding `<!DOCTYPE`s and `<!ENTITY`s
+
+The parser will handle the basic XML entities in text nodes and attribute
+values: `&amp; &lt; &gt; &apos; &quot;`. It's possible to define additional
+entities in XML by putting them in the DTD. This parser doesn't do anything
+with that. If you want to listen to the `ondoctype` event, and then fetch
+the doctypes, and read the entities and add them to `parser.ENTITIES`, then
+be my guest.
+
+Unknown entities will fail in strict mode, and in loose mode, will pass
+through unmolested.
+
+## Usage
+
+    var sax = require("./lib/sax"),
+      strict = true, // set to false for html-mode
+      parser = sax.parser(strict);
+
+    parser.onerror = function (e) {
+      // an error happened.
+    };
+    parser.ontext = function (t) {
+      // got some text.  t is the string of text.
+    };
+    parser.onopentag = function (node) {
+      // opened a tag.  node has "name" and "attributes"
+    };
+    parser.onattribute = function (attr) {
+      // an attribute.  attr has "name" and "value"
+    };
+    parser.onend = function () {
+      // parser stream is done, and ready to have more stuff written to it.
+    };
+
+    parser.write('<xml>Hello, <who name="world">world</who>!</xml>').close();
+
+    // stream usage
+    // takes the same options as the parser
+    var saxStream = require("sax").createStream(strict, options)
+    saxStream.on("error", function (e) {
+      // unhandled errors will throw, since this is a proper node
+      // event emitter.
+      console.error("error!", e)
+      // clear the error
+      this._parser.error = null
+      this._parser.resume()
+    })
+    saxStream.on("opentag", function (node) {
+      // same object as above
+    })
+    // pipe is supported, and it's readable/writable
+    // same chunks coming in also go out.
+    fs.createReadStream("file.xml")
+      .pipe(saxStream)
+      .pipe(fs.createReadStream("file-copy.xml"))
+
+
+
+## Arguments
+
+Pass the following arguments to the parser function.  All are optional.
+
+`strict` - Boolean. Whether or not to be a jerk. Default: `false`.
+
+`opt` - Object bag of settings regarding string formatting.  All default to `false`.
+
+Settings supported:
+
+* `trim` - Boolean. Whether or not to trim text and comment nodes.
+* `normalize` - Boolean. If true, then turn any whitespace into a single
+  space.
+* `lowercasetags` - Boolean. If true, then lowercase tags in loose mode, 
+  rather than uppercasing them.
+* `xmlns` - Boolean. If true, then namespaces are supported.
+
+## Methods
+
+`write` - Write bytes onto the stream. You don't have to do this all at
+once. You can keep writing as much as you want.
+
+`close` - Close the stream. Once closed, no more data may be written until
+it is done processing the buffer, which is signaled by the `end` event.
+
+`resume` - To gracefully handle errors, assign a listener to the `error`
+event. Then, when the error is taken care of, you can call `resume` to
+continue parsing. Otherwise, the parser will not continue while in an error
+state.
+
+## Members
+
+At all times, the parser object will have the following members:
+
+`line`, `column`, `position` - Indications of the position in the XML
+document where the parser currently is looking.
+
+`startTagPosition` - Indicates the position where the current tag starts.
+
+`closed` - Boolean indicating whether or not the parser can be written to.
+If it's `true`, then wait for the `ready` event to write again.
+
+`strict` - Boolean indicating whether or not the parser is a jerk.
+
+`opt` - Any options passed into the constructor.
+
+`tag` - The current tag being dealt with.
+
+And a bunch of other stuff that you probably shouldn't touch.
+
+## Events
+
+All events emit with a single argument. To listen to an event, assign a
+function to `on<eventname>`. Functions get executed in the this-context of
+the parser object. The list of supported events are also in the exported
+`EVENTS` array.
+
+When using the stream interface, assign handlers using the EventEmitter
+`on` function in the normal fashion.
+
+`error` - Indication that something bad happened. The error will be hanging
+out on `parser.error`, and must be deleted before parsing can continue. By
+listening to this event, you can keep an eye on that kind of stuff. Note:
+this happens *much* more in strict mode. Argument: instance of `Error`.
+
+`text` - Text node. Argument: string of text.
+
+`doctype` - The `<!DOCTYPE` declaration. Argument: doctype string.
+
+`processinginstruction` - Stuff like `<?xml foo="blerg" ?>`. Argument:
+object with `name` and `body` members. Attributes are not parsed, as
+processing instructions have implementation dependent semantics.
+
+`sgmldeclaration` - Random SGML declarations. Stuff like `<!ENTITY p>`
+would trigger this kind of event. This is a weird thing to support, so it
+might go away at some point. SAX isn't intended to be used to parse SGML,
+after all.
+
+`opentag` - An opening tag. Argument: object with `name` and `attributes`.
+In non-strict mode, tag names are uppercased, unless the `lowercasetags`
+option is set.  If the `xmlns` option is set, then it will contain
+namespace binding information on the `ns` member, and will have a
+`local`, `prefix`, and `uri` member.
+
+`closetag` - A closing tag. In loose mode, tags are auto-closed if their
+parent closes. In strict mode, well-formedness is enforced. Note that
+self-closing tags will have `closeTag` emitted immediately after `openTag`.
+Argument: tag name.
+
+`attribute` - An attribute node.  Argument: object with `name` and `value`,
+and also namespace information if the `xmlns` option flag is set.
+
+`comment` - A comment node.  Argument: the string of the comment.
+
+`opencdata` - The opening tag of a `<![CDATA[` block.
+
+`cdata` - The text of a `<![CDATA[` block. Since `<![CDATA[` blocks can get
+quite large, this event may fire multiple times for a single block, if it
+is broken up into multiple `write()`s. Argument: the string of random
+character data.
+
+`closecdata` - The closing tag (`]]>`) of a `<![CDATA[` block.
+
+`opennamespace` - If the `xmlns` option is set, then this event will
+signal the start of a new namespace binding.
+
+`closenamespace` - If the `xmlns` option is set, then this event will
+signal the end of a namespace binding.
+
+`end` - Indication that the closed stream has ended.
+
+`ready` - Indication that the stream has reset, and is ready to be written
+to.
+
+`noscript` - In non-strict mode, `<script>` tags trigger a `"script"`
+event, and their contents are not checked for special xml characters.
+If you pass `noscript: true`, then this behavior is suppressed.
+
+## Reporting Problems
+
+It's best to write a failing test if you find an issue.  I will always
+accept pull requests with failing tests if they demonstrate intended
+behavior, but it is very hard to figure out what issue you're describing
+without a test.  Writing a test is also the best way for you yourself
+to figure out if you really understand the issue you think you have with
+sax-js.
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/examples/big-not-pretty.xml b/config/tizen/tpk-tools/cli/node_modules/sax/examples/big-not-pretty.xml
new file mode 100644 (file)
index 0000000..fb5265d
--- /dev/null
@@ -0,0 +1,8002 @@
+<big>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
+</big>
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/examples/example.js b/config/tizen/tpk-tools/cli/node_modules/sax/examples/example.js
new file mode 100644 (file)
index 0000000..e7f81e6
--- /dev/null
@@ -0,0 +1,41 @@
+
+var fs = require("fs"),
+  sys = require("sys"),
+  path = require("path"),
+  xml = fs.cat(path.join(__dirname, "test.xml")),
+  sax = require("../lib/sax"),
+  strict = sax.parser(true),
+  loose = sax.parser(false, {trim:true}),
+  inspector = function (ev) { return function (data) {
+    // sys.error("");
+    // sys.error(ev+": "+sys.inspect(data));
+    // for (var i in data) sys.error(i+ " "+sys.inspect(data[i]));
+    // sys.error(this.line+":"+this.column);
+  }};
+
+xml.addCallback(function (xml) {
+  // strict.write(xml);
+  
+  sax.EVENTS.forEach(function (ev) {
+    loose["on"+ev] = inspector(ev);
+  });
+  loose.onend = function () {
+    // sys.error("end");
+    // sys.error(sys.inspect(loose));
+  };
+  
+  // do this one char at a time to verify that it works.
+  // (function () {
+  //   if (xml) {
+  //     loose.write(xml.substr(0,1000));
+  //     xml = xml.substr(1000);
+  //     process.nextTick(arguments.callee);
+  //   } else loose.close();
+  // })();
+  
+  for (var i = 0; i < 1000; i ++) {
+    loose.write(xml);
+    loose.close();
+  }
+
+});
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/examples/get-products.js b/config/tizen/tpk-tools/cli/node_modules/sax/examples/get-products.js
new file mode 100644 (file)
index 0000000..9e8d74a
--- /dev/null
@@ -0,0 +1,58 @@
+// pull out /GeneralSearchResponse/categories/category/items/product tags
+// the rest we don't care about.
+
+var sax = require("../lib/sax.js")
+var fs = require("fs")
+var path = require("path")
+var xmlFile = path.resolve(__dirname, "shopping.xml")
+var util = require("util")
+var http = require("http")
+
+fs.readFile(xmlFile, function (er, d) {
+  http.createServer(function (req, res) {
+    if (er) throw er
+    var xmlstr = d.toString("utf8")
+
+    var parser = sax.parser(true)
+    var products = []
+    var product = null
+    var currentTag = null
+
+    parser.onclosetag = function (tagName) {
+      if (tagName === "product") {
+        products.push(product)
+        currentTag = product = null
+        return
+      }
+      if (currentTag && currentTag.parent) {
+        var p = currentTag.parent
+        delete currentTag.parent
+        currentTag = p
+      }
+    }
+
+    parser.onopentag = function (tag) {
+      if (tag.name !== "product" && !product) return
+      if (tag.name === "product") {
+        product = tag
+      }
+      tag.parent = currentTag
+      tag.children = []
+      tag.parent && tag.parent.children.push(tag)
+      currentTag = tag
+    }
+
+    parser.ontext = function (text) {
+      if (currentTag) currentTag.children.push(text)
+    }
+
+    parser.onend = function () {
+      var out = util.inspect(products, false, 3, true)
+      res.writeHead(200, {"content-type":"application/json"})
+      res.end("{\"ok\":true}")
+      // res.end(JSON.stringify(products))
+    }
+
+    parser.write(xmlstr).end()
+  }).listen(1337)
+})
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/examples/hello-world.js b/config/tizen/tpk-tools/cli/node_modules/sax/examples/hello-world.js
new file mode 100644 (file)
index 0000000..cbfa518
--- /dev/null
@@ -0,0 +1,4 @@
+require("http").createServer(function (req, res) {
+  res.writeHead(200, {"content-type":"application/json"})
+  res.end(JSON.stringify({ok: true}))
+}).listen(1337)
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/examples/not-pretty.xml b/config/tizen/tpk-tools/cli/node_modules/sax/examples/not-pretty.xml
new file mode 100644 (file)
index 0000000..9592852
--- /dev/null
@@ -0,0 +1,8 @@
+<root>
+               something<else>  blerm <slurm 
+               
+               
+       attrib = 
+       "blorg"       ></else><!-- COMMENT!
+       
+--><![CDATA[processing...]]>  <selfclosing tag="blr>&quot;"/> a bit down here</root>
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/examples/pretty-print.js b/config/tizen/tpk-tools/cli/node_modules/sax/examples/pretty-print.js
new file mode 100644 (file)
index 0000000..cd6aca9
--- /dev/null
@@ -0,0 +1,74 @@
+var sax = require("../lib/sax")
+  , printer = sax.createStream(false, {lowercasetags:true, trim:true})
+  , fs = require("fs")
+
+function entity (str) {
+  return str.replace('"', '&quot;')
+}
+
+printer.tabstop = 2
+printer.level = 0
+printer.indent = function () {
+  print("\n")
+  for (var i = this.level; i > 0; i --) {
+    for (var j = this.tabstop; j > 0; j --) {
+      print(" ")
+    }
+  }
+}
+printer.on("opentag", function (tag) {
+  this.indent()
+  this.level ++
+  print("<"+tag.name)
+  for (var i in tag.attributes) {
+    print(" "+i+"=\""+entity(tag.attributes[i])+"\"")
+  }
+  print(">")
+})
+
+printer.on("text", ontext)
+printer.on("doctype", ontext)
+function ontext (text) {
+  this.indent()
+  print(text)
+}
+
+printer.on("closetag", function (tag) {
+  this.level --
+  this.indent()
+  print("</"+tag+">")
+})
+
+printer.on("cdata", function (data) {
+  this.indent()
+  print("<![CDATA["+data+"]]>")
+})
+
+printer.on("comment", function (comment) {
+  this.indent()
+  print("<!--"+comment+"-->")
+})
+
+printer.on("error", function (error) {
+  console.error(error)
+  throw error
+})
+
+if (!process.argv[2]) {
+  throw new Error("Please provide an xml file to prettify\n"+
+    "TODO: read from stdin or take a file")
+}
+var xmlfile = require("path").join(process.cwd(), process.argv[2])
+var fstr = fs.createReadStream(xmlfile, { encoding: "utf8" })
+
+function print (c) {
+  if (!process.stdout.write(c)) {
+    fstr.pause()
+  }
+}
+
+process.stdout.on("drain", function () {
+  fstr.resume()
+})
+
+fstr.pipe(printer)
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/examples/shopping.xml b/config/tizen/tpk-tools/cli/node_modules/sax/examples/shopping.xml
new file mode 100644 (file)
index 0000000..223c6c6
--- /dev/null
@@ -0,0 +1,2 @@
+
+<GeneralSearchResponse xmlns="urn:types.partner.api.shopping.com"><serverDetail><apiEnv>sandbox</apiEnv><apiVersion>3.1 r31.Kadu4DC.phase3</apiVersion><buildNumber>5778</buildNumber><buildTimestamp>2011.10.06 15:37:23 PST</buildTimestamp><requestId>p2.a121bc2aaf029435dce6</requestId><timestamp>2011-10-21T18:38:45.982-04:00</timestamp><responseTime>P0Y0M0DT0H0M0.169S</responseTime></serverDetail><exceptions exceptionCount="1"><exception type="warning"><code>1112</code><message>You are currently using the SDC API sandbox environment!  No clicks to merchant URLs from this response will be paid.  Please change the host of your API requests to 'publisher.api.shopping.com' when you have finished development and testing</message></exception></exceptions><clientTracking height="19" type="logo" width="106"><sourceURL>http://statTest.dealtime.com/pixel/noscript?PV_EvnTyp=APPV&amp;APPV_APITSP=10%2F21%2F11_06%3A38%3A45_PM&amp;APPV_DSPRQSID=p2.a121bc2aaf029435dce6&amp;APPV_IMGURL=http://img.shopping.com/sc/glb/sdc_logo_106x19.gif&amp;APPV_LI_LNKINID=7000610&amp;APPV_LI_SBMKYW=nikon&amp;APPV_MTCTYP=1000&amp;APPV_PRTID=2002&amp;APPV_BrnID=14804</sourceURL><hrefURL>http://www.shopping.com/digital-cameras/products</hrefURL><titleText>Digital Cameras</titleText><altText>Digital Cameras</altText></clientTracking><searchHistory><categorySelection id="3"><name>Electronics</name><categoryURL>http://www.shopping.com/xCH-electronics-nikon~linkin_id-7000610?oq=nikon</categoryURL></categorySelection><categorySelection id="449"><name>Cameras and Photography</name><categoryURL>http://www.shopping.com/xCH-cameras_and_photography-nikon~linkin_id-7000610?oq=nikon</categoryURL></categorySelection><categorySelection id="7185"><name>Digital Cameras</name><categoryURL>http://www.shopping.com/digital-cameras/nikon/products?oq=nikon&amp;linkin_id=7000610</categoryURL></categorySelection><dynamicNavigationHistory><keywordSearch dropped="false" modified="false"><originalKeyword>nikon</originalKeyword><resultKeyword>nikon</resultKeyword></keywordSearch></dynamicNavigationHistory></searchHistory><categories matchedCategoryCount="1" returnedCategoryCount="1"><category id="7185"><name>Digital Cameras</name><categoryURL>http://www.shopping.com/digital-cameras/nikon/products?oq=nikon&amp;linkin_id=7000610</categoryURL><items matchedItemCount="322" pageNumber="1" returnedItemCount="5"><product id="101677489"><name>Nikon D3100 Digital Camera</name><shortDescription>14.2 Megapixel, SLR Camera, 3 in. LCD Screen, With High Definition Video, Weight: 1 lb.</shortDescription><fullDescription>The Nikon D3100 digital SLR camera speaks to the growing ranks of enthusiastic D-SLR users and aspiring photographers by providing an easy-to-use and affordable entrance to the world of Nikon D-SLR’s. The 14.2-megapixel D3100 has powerful features, such as the enhanced Guide Mode that makes it easy to unleash creative potential and capture memories with still images and full HD video. Like having a personal photo tutor at your fingertips, this unique feature provides a simple graphical interface on the camera’s LCD that guides users by suggesting and/or adjusting camera settings to achieve the desired end result images. The D3100 is also the world’s first D-SLR to introduce full time auto focus (AF) in Live View and D-Movie mode to effortlessly achieve the critical focus needed when shooting Full HD 1080p video.</fullDescription><images><image available="true" height="100" width="100"><sourceURL>http://di1.shopping.com/images/pi/93/bc/04/101677489-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di1.shopping.com/images/pi/93/bc/04/101677489-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di1.shopping.com/images/pi/93/bc/04/101677489-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di1.shopping.com/images/pi/93/bc/04/101677489-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="true" height="500" width="606"><sourceURL>http://di1.shopping.com/images/pi/93/bc/04/101677489-606x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image></images><rating><reviewCount>9</reviewCount><rating>4.56</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/pr/sdc_stars_sm_4.5.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/Nikon-D3100/reviews~linkin_id-7000610</reviewURL></rating><minPrice>429.00</minPrice><maxPrice>1360.00</maxPrice><productOffersURL>http://www.shopping.com/Nikon-D3100/prices~linkin_id-7000610</productOffersURL><productSpecsURL>http://www.shopping.com/Nikon-D3100/info~linkin_id-7000610</productSpecsURL><offers matchedOfferCount="64" pageNumber="1" returnedOfferCount="5"><offer featured="false" id="-ZW6BMZqz6fbS-aULwga_g==" smartBuy="false" used="false"><name>Nikon D3100 Digital SLR Camera with 18-55mm NIKKOR VR Lens</name><description>The Nikon D3100 Digital SLR Camera is an affordable  compact  and lightweight photographic power-house. It features the all-purpose 18-55mm VR lens  a high-resolution 14.2 MP CMOS sensor along with a feature set that's comprehensive yet easy to navigate - the intuitive onboard learn-as-you grow guide mode allows the photographer to understand what the 3100 can do quickly and easily. Capture beautiful pictures and amazing Full HD 1080p movies with sound and full-time autofocus.  Availabilty: In Stock!</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="true" height="350" width="350"><sourceURL>http://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-350x350-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>Free Shipping with Any Purchase!</storeNotes><basePrice currency="USD">529.00</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">799.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=647&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=475674&amp;crawler_id=475674&amp;dealId=-ZW6BMZqz6fbS-aULwga_g%3D%3D&amp;url=http%3A%2F%2Fwww.fumfie.com%2Fproduct%2F343.5%2Fshopping-com%3F&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=Nikon+D3100+Digital+SLR+Camera+with+18-55mm+NIKKOR+VR+Lens&amp;dlprc=529.0&amp;crn=&amp;istrsmrc=1&amp;isathrsl=0&amp;AR=1&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=101677489&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=1&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=1&amp;SL=1&amp;FS=1&amp;code=&amp;acode=658&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="475674" trusted="true"><name>FumFie</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/475674.gif</sourceURL></logo><phoneNumber>866 666 9198</phoneNumber><ratingInfo><reviewCount>560</reviewCount><rating>4.27</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_45.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_fumfie~MRD-475674~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>F343C5</sku></offer><offer featured="false" id="md1e9lD8vdOu4FHQfJqKng==" smartBuy="false" used="false"><name>Nikon Nikon D3100 14.2MP Digital SLR Camera with 18-55mm f/3.5-5.6 AF-S DX VR, Cameras</name><description>Nikon D3100 14.2MP Digital SLR Camera with 18-55mm f/3.5-5.6 AF-S DX VR</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="true" height="352" width="385"><sourceURL>http://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-385x352-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">549.00</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">549.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=779&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=305814&amp;crawler_id=305814&amp;dealId=md1e9lD8vdOu4FHQfJqKng%3D%3D&amp;url=http%3A%2F%2Fwww.electronics-expo.com%2Findex.php%3Fpage%3Ditem%26id%3DNIKD3100%26source%3DSideCar%26scpid%3D8%26scid%3Dscsho318727%26&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=Nikon+Nikon+D3100+14.2MP+Digital+SLR+Camera+with+18-55mm+f%2F3.5-5.6+AF-S+DX+VR%2C+Cameras&amp;dlprc=549.0&amp;crn=&amp;istrsmrc=1&amp;isathrsl=0&amp;AR=9&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=101677489&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=9&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=0&amp;SL=0&amp;FS=1&amp;code=&amp;acode=771&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="305814" trusted="true"><name>Electronics Expo</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/305814.gif</sourceURL></logo><phoneNumber>1-888-707-EXPO</phoneNumber><ratingInfo><reviewCount>371</reviewCount><rating>3.90</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_4.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_electronics_expo~MRD-305814~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>NIKD3100</sku></offer><offer featured="false" id="yYuaXnDFtCY7rDUjkY2aaw==" smartBuy="false" used="false"><name>Nikon D3100 14.2-Megapixel Digital SLR Camera With 18-55mm Zoom-Nikkor Lens, Black</name><description>Split-second shutter response captures shots other cameras may have missed Helps eliminate the frustration of shutter delay! 14.2-megapixels for enlargements worth framing and hanging. Takes breathtaking 1080p HD movies. ISO sensitivity from 100-1600 for bright or dimly lit settings. 3.0in. color LCD for beautiful, wide-angle framing and viewing. In-camera image editing lets you retouch with no PC. Automatic scene modes include Child, Sports, Night Portrait and more. Accepts SDHC memory cards. Nikon D3100 14.2-Megapixel Digital SLR Camera With 18-55mm Zoom-Nikkor Lens, Black is one of many Digital SLR Cameras available through Office Depot. Made by Nikon.</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di109.shopping.com/images/di/79/59/75/61586e4446744359377244556a6b5932616177-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di109.shopping.com/images/di/79/59/75/61586e4446744359377244556a6b5932616177-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="false" height="300" width="300"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="true" height="250" width="250"><sourceURL>http://di109.shopping.com/images/di/79/59/75/61586e4446744359377244556a6b5932616177-250x250-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">549.99</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">699.99</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=698&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=467671&amp;crawler_id=467671&amp;dealId=yYuaXnDFtCY7rDUjkY2aaw%3D%3D&amp;url=http%3A%2F%2Flink.mercent.com%2Fredirect.ashx%3Fmr%3AmerchantID%3DOfficeDepot%26mr%3AtrackingCode%3DCEC9669E-6ABC-E011-9F24-0019B9C043EB%26mr%3AtargetUrl%3Dhttp%3A%2F%2Fwww.officedepot.com%2Fa%2Fproducts%2F486292%2FNikon-D3100-142-Megapixel-Digital-SLR%2F%253fcm_mmc%253dMercent-_-Shopping-_-Cameras_and_Camcorders-_-486292&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=Nikon+D3100+14.2-Megapixel+Digital+SLR+Camera+With+18-55mm+Zoom-Nikkor+Lens%2C+Black&amp;dlprc=549.99&amp;crn=&amp;istrsmrc=1&amp;isathrsl=0&amp;AR=10&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=101677489&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=10&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=1&amp;SL=1&amp;FS=1&amp;code=&amp;acode=690&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="467671" trusted="true"><name>Office Depot</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/467671.gif</sourceURL></logo><phoneNumber>1-800-GO-DEPOT</phoneNumber><ratingInfo><reviewCount>135</reviewCount><rating>2.37</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_25.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_office_depot_4158555~MRD-467671~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>486292</sku></offer><offer featured="false" id="Rl56U7CuiTYsH4MGZ02lxQ==" smartBuy="false" used="false"><name>Nikon® D3100™ 14.2MP Digital SLR with 18-55mm Lens</name><description>The Nikon D3100 DSLR will surprise you with its simplicity and impress you with superb results.</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di103.shopping.com/images/di/52/6c/35/36553743756954597348344d475a30326c7851-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di103.shopping.com/images/di/52/6c/35/36553743756954597348344d475a30326c7851-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image><image available="false" height="300" width="300"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image><image available="true" height="220" width="220"><sourceURL>http://di103.shopping.com/images/di/52/6c/35/36553743756954597348344d475a30326c7851-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">549.99</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">6.05</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">549.99</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=332477&amp;crawler_id=332477&amp;dealId=Rl56U7CuiTYsH4MGZ02lxQ%3D%3D&amp;url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D903483107%26&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=Nikon%C2%AE+D3100%E2%84%A2+14.2MP+Digital+SLR+with+18-55mm+Lens&amp;dlprc=549.99&amp;crn=&amp;istrsmrc=0&amp;isathrsl=0&amp;AR=11&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=101677489&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=11&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=0&amp;SL=0&amp;FS=0&amp;code=&amp;acode=496&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="332477" trusted="false"><name>RadioShack</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/332477.gif</sourceURL></logo><ratingInfo><reviewCount>24</reviewCount><rating>2.25</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_25.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>9614867</sku></offer><offer featured="false" id="huS6xZKDKaKMTMP71eI6DA==" smartBuy="false" used="false"><name>Nikon D3100 SLR w/Nikon 18-55mm VR &amp; 55-200mm VR Lenses</name><description>14.2 Megapixels3" LCDLive ViewHD 1080p Video w/ Sound &amp; Autofocus11-point Autofocus3 Frames per Second ShootingISO 100 to 3200 (Expand to 12800-Hi2)Self Cleaning SensorEXPEED 2, Image Processing EngineScene Recognition System</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="true" height="345" width="345"><sourceURL>http://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-345x345-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">695.00</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">695.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=371&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=487342&amp;crawler_id=487342&amp;dealId=huS6xZKDKaKMTMP71eI6DA%3D%3D&amp;url=http%3A%2F%2Fwww.rythercamera.com%2Fcatalog%2Fproduct_info.php%3Fcsv%3Dsh%26products_id%3D32983%26&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=Nikon+D3100+SLR+w%2FNikon+18-55mm+VR+%26+55-200mm+VR+Lenses&amp;dlprc=695.0&amp;crn=&amp;istrsmrc=0&amp;isathrsl=0&amp;AR=15&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=101677489&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=15&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=0&amp;SL=0&amp;FS=1&amp;code=&amp;acode=379&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="487342" trusted="false"><name>RytherCamera.com</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/487342.gif</sourceURL></logo><phoneNumber>1-877-644-7593</phoneNumber><ratingInfo><reviewCount>0</reviewCount></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>32983</sku></offer></offers></product><product id="95397883"><name>Nikon COOLPIX S203 Digital Camera</name><shortDescription>10 Megapixel, Ultra-Compact Camera, 2.5 in. LCD Screen, 3x Optical Zoom, With Video Capability, Weight: 0.23 lb.</shortDescription><fullDescription>With 10.34 mega pixel, electronic VR vibration reduction, 5-level brightness adjustment, 3x optical zoom, and TFT LCD, Nikon Coolpix s203 fulfills all the demands of any photographer. The digital camera has an inbuilt memory of 44MB and an external memory slot made for all kinds of SD (Secure Digital) cards.</fullDescription><images><image available="true" height="100" width="100"><sourceURL>http://di1.shopping.com/images/pi/c4/ef/1b/95397883-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di1.shopping.com/images/pi/c4/ef/1b/95397883-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di1.shopping.com/images/pi/c4/ef/1b/95397883-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di1.shopping.com/images/pi/c4/ef/1b/95397883-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="true" height="499" width="500"><sourceURL>http://di1.shopping.com/images/pi/c4/ef/1b/95397883-500x499-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image></images><rating><reviewCount>0</reviewCount></rating><minPrice>139.00</minPrice><maxPrice>139.00</maxPrice><productOffersURL>http://www.shopping.com/Nikon-Coolpix-S203/prices~linkin_id-7000610</productOffersURL><productSpecsURL>http://www.shopping.com/Nikon-Coolpix-S203/info~linkin_id-7000610</productSpecsURL><offers matchedOfferCount="1" pageNumber="1" returnedOfferCount="1"><offer featured="false" id="sBd2JnIEPM-A_lBAM1RZgQ==" smartBuy="false" used="false"><name>Nikon Coolpix S203 Digital Camera (Red)</name><description>With 10.34 mega pixel, electronic VR vibration reduction, 5-level brightness adjustment, 3x optical zoom, and TFT LCD, Nikon Coolpix s203 fulfills all the demands of any photographer. The digital camera has an inbuilt memory of 44MB and an external memory slot made for all kinds of SD (Secure Digital) cards.</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="true" height="500" width="500"><sourceURL>http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>Fantastic prices with ease &amp; comfort of Amazon.com!</storeNotes><basePrice currency="USD">139.00</basePrice><shippingCost currency="USD">9.50</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">139.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=566&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=301531&amp;crawler_id=1903313&amp;dealId=sBd2JnIEPM-A_lBAM1RZgQ%3D%3D&amp;url=http%3A%2F%2Fwww.amazon.com%2Fdp%2FB002T964IM%2Fref%3Dasc_df_B002T964IM1751618%3Fsmid%3DA22UHVNXG98FAT%26tag%3Ddealtime-ce-mp01feed-20%26linkCode%3Dasn%26creative%3D395105%26creativeASIN%3DB002T964IM&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=Nikon+Coolpix+S203+Digital+Camera+%28Red%29&amp;dlprc=139.0&amp;crn=&amp;istrsmrc=0&amp;isathrsl=0&amp;AR=63&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=95397883&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=63&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=0&amp;SL=0&amp;FS=0&amp;code=&amp;acode=518&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="301531" trusted="false"><name>Amazon Marketplace</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/301531.gif</sourceURL></logo><ratingInfo><reviewCount>213</reviewCount><rating>2.73</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_25.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_amazon_marketplace_9689~MRD-301531~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>B002T964IM</sku></offer></offers></product><product id="106834268"><name>Nikon S3100 Digital Camera</name><shortDescription>14.5 Megapixel, Compact Camera, 2.7 in. LCD Screen, 5x Optical Zoom, With High Definition Video, Weight: 0.23 lb.</shortDescription><fullDescription>This digital camera features a wide-angle optical Zoom-NIKKOR glass lens that allows you to capture anything from landscapes to portraits to action shots. The high-definition movie mode with one-touch recording makes it easy to capture video clips.</fullDescription><images><image available="true" height="100" width="100"><sourceURL>http://di1.shopping.com/images/pi/66/2d/33/106834268-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di1.shopping.com/images/pi/66/2d/33/106834268-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di1.shopping.com/images/pi/66/2d/33/106834268-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di1.shopping.com/images/pi/66/2d/33/106834268-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="true" height="387" width="507"><sourceURL>http://di1.shopping.com/images/pi/66/2d/33/106834268-507x387-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image></images><rating><reviewCount>1</reviewCount><rating>2.00</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/pr/sdc_stars_sm_2.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/nikon-s3100/reviews~linkin_id-7000610</reviewURL></rating><minPrice>99.95</minPrice><maxPrice>134.95</maxPrice><productOffersURL>http://www.shopping.com/nikon-s3100/prices~linkin_id-7000610</productOffersURL><productSpecsURL>http://www.shopping.com/nikon-s3100/info~linkin_id-7000610</productSpecsURL><offers matchedOfferCount="67" pageNumber="1" returnedOfferCount="5"><offer featured="false" id="UUyGoqV8r0-xrkn-rnGNbg==" smartBuy="false" used="false"><name>CoolPix S3100 14 Megapixel Compact Digital Camera- Red</name><description>Nikon Coolpix S3100 - Digital camera - compact - 14.0 Mpix - optical zoom: 5 x - supported memory: SD, SDXC, SDHC - red</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>Get 30 days FREE SHIPPING w/ ShipVantage</storeNotes><basePrice currency="USD">119.95</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">6.95</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">139.95</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=485615&amp;crawler_id=485615&amp;dealId=UUyGoqV8r0-xrkn-rnGNbg%3D%3D&amp;url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBJpFHJ3Yx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmDAJeU1oyGG0GcBdhGwUGCAVqYF9SO0xSN1sZdmA7dmMdBQAJB24qX1NbQxI6AjA2ME5dVFULPDsGPFcQTTdaLTA6SR0OFlQvPAwMDxYcYlxIVkcoLTcCDA%3D%3D%26nAID%3D13736960%26&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=CoolPix+S3100+14+Megapixel+Compact+Digital+Camera-+Red&amp;dlprc=119.95&amp;crn=&amp;istrsmrc=1&amp;isathrsl=0&amp;AR=28&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=106834268&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=28&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=0&amp;SL=1&amp;FS=0&amp;code=&amp;acode=583&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="485615" trusted="true"><name>Sears</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/485615.gif</sourceURL></logo><phoneNumber>1-800-349-4358</phoneNumber><ratingInfo><reviewCount>888</reviewCount><rating>2.85</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_3.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>00337013000</sku></offer><offer featured="false" id="X87AwXlW1dXoMXk4QQDToQ==" smartBuy="false" used="false"><name>COOLPIX S3100 Pink</name><description>Nikon Coolpix S3100 - Digital camera - compact - 14.0 Mpix - optical zoom: 5 x - supported memory: SD, SDXC, SDHC - pink</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>Get 30 days FREE SHIPPING w/ ShipVantage</storeNotes><basePrice currency="USD">119.95</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">6.95</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">139.95</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=485615&amp;crawler_id=485615&amp;dealId=X87AwXlW1dXoMXk4QQDToQ%3D%3D&amp;url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBJpFHJxYx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmb2JcUFxDEGsPc3QDEkFZVQ0WFhdRW0MWbgYWDlxzdGMdAVQWRi0xDAwPFhw9TSobb05eWVVYKzsLTFVVQi5RICs3SA8MU1s2MQQKD1wf%26nAID%3D13736960%26&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=COOLPIX+S3100+Pink&amp;dlprc=119.95&amp;crn=&amp;istrsmrc=1&amp;isathrsl=0&amp;AR=31&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=106834268&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=31&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=0&amp;SL=1&amp;FS=0&amp;code=&amp;acode=583&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="485615" trusted="true"><name>Sears</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/485615.gif</sourceURL></logo><phoneNumber>1-800-349-4358</phoneNumber><ratingInfo><reviewCount>888</reviewCount><rating>2.85</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_3.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>00337015000</sku></offer><offer featured="false" id="nvFwnpfA4rlA1Dbksdsa0w==" smartBuy="false" used="false"><name>Nikon Coolpix S3100 14.0 MP Digital Camera - Silver</name><description>Nikon Coolpix S3100 14.0 MP Digital Camera - Silver</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di109.shopping.com/images/di/6e/76/46/776e70664134726c413144626b736473613077-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di109.shopping.com/images/di/6e/76/46/776e70664134726c413144626b736473613077-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="false" height="300" width="300"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="true" height="270" width="270"><sourceURL>http://di109.shopping.com/images/di/6e/76/46/776e70664134726c413144626b736473613077-270x270-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">109.97</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">109.97</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=803&amp;BEFID=7185&amp;aon=%5E&amp;MerchantID=475774&amp;crawler_id=475774&amp;dealId=nvFwnpfA4rlA1Dbksdsa0w%3D%3D&amp;url=http%3A%2F%2Fwww.thewiz.com%2Fcatalog%2Fproduct.jsp%3FmodelNo%3DS3100SILVER%26gdftrk%3DgdfV2677_a_7c996_a_7c4049_a_7c26262&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=Nikon+Coolpix+S3100+14.0+MP+Digital+Camera+-+Silver&amp;dlprc=109.97&amp;crn=&amp;istrsmrc=0&amp;isathrsl=0&amp;AR=33&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=106834268&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=33&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=0&amp;SL=0&amp;FS=1&amp;code=&amp;acode=797&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="475774" trusted="false"><name>TheWiz.com</name><logo available="false" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/475774.gif</sourceURL></logo><phoneNumber>877-542-6988</phoneNumber><ratingInfo><reviewCount>0</reviewCount></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>26262</sku></offer><offer featured="false" id="5GtaN2NeryKwps-Se2l-4g==" smartBuy="false" used="false"><name>Nikon� COOLPIX� S3100 14MP Digital Camera (Silver)</name><description>The Nikon COOLPIX S3100 is the easy way to share your life and stay connected.</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di102.shopping.com/images/di/35/47/74/614e324e6572794b7770732d5365326c2d3467-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di102.shopping.com/images/di/35/47/74/614e324e6572794b7770732d5365326c2d3467-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image><image available="false" height="300" width="300"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image><image available="true" height="220" width="220"><sourceURL>http://di102.shopping.com/images/di/35/47/74/614e324e6572794b7770732d5365326c2d3467-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">119.99</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">6.05</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">119.99</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=332477&amp;crawler_id=332477&amp;dealId=5GtaN2NeryKwps-Se2l-4g%3D%3D&amp;url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D848064082%26&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=Nikon%C3%AF%C2%BF%C2%BD+COOLPIX%C3%AF%C2%BF%C2%BD+S3100+14MP+Digital+Camera+%28Silver%29&amp;dlprc=119.99&amp;crn=&amp;istrsmrc=0&amp;isathrsl=0&amp;AR=37&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=106834268&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=37&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=0&amp;SL=0&amp;FS=0&amp;code=&amp;acode=509&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="332477" trusted="false"><name>RadioShack</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/332477.gif</sourceURL></logo><ratingInfo><reviewCount>24</reviewCount><rating>2.25</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_25.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>10101095</sku></offer><offer featured="false" id="a43m0RXulX38zCnQjU59jw==" smartBuy="false" used="false"><name>COOLPIX S3100 Yellow</name><description>Nikon Coolpix S3100 - Digital camera - compact - 14.0 Mpix - optical zoom: 5 x - supported memory: SD, SDXC, SDHC - yellow</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>Get 30 days FREE SHIPPING w/ ShipVantage</storeNotes><basePrice currency="USD">119.95</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">6.95</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">139.95</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=485615&amp;crawler_id=485615&amp;dealId=a43m0RXulX38zCnQjU59jw%3D%3D&amp;url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBJpFHJwYx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmb2JcUFxDEGoPc3QDEkFZVQ0WFhdRW0MWbgYWDlxzdGMdAVQWRi0xDAwPFhw9TSobb05eWVVYKzsLTFVVQi5RICs3SA8MU1s2MQQKD1wf%26nAID%3D13736960%26&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=COOLPIX+S3100+Yellow&amp;dlprc=119.95&amp;crn=&amp;istrsmrc=1&amp;isathrsl=0&amp;AR=38&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=106834268&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=38&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=0&amp;SL=1&amp;FS=0&amp;code=&amp;acode=583&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="485615" trusted="true"><name>Sears</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/485615.gif</sourceURL></logo><phoneNumber>1-800-349-4358</phoneNumber><ratingInfo><reviewCount>888</reviewCount><rating>2.85</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_3.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>00337014000</sku></offer></offers></product><product id="99671132"><name>Nikon D90 Digital Camera</name><shortDescription>12.3 Megapixel, Point and Shoot Camera, 3 in. LCD Screen, With Video Capability, Weight: 1.36 lb.</shortDescription><fullDescription>Untitled Document Nikon D90 SLR Digital Camera With 28-80mm 75-300mm Lens Kit The Nikon D90 SLR Digital Camera, with its 12.3-megapixel DX-format CMOS, 3" High resolution LCD display, Scene Recognition System, Picture Control, Active D-Lighting, and one-button Live View, provides photo enthusiasts with the image quality and performance they need to pursue their own vision while still being intuitive enough for use as an everyday camera.</fullDescription><images><image available="true" height="100" width="100"><sourceURL>http://di1.shopping.com/images/pi/52/fb/d3/99671132-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di1.shopping.com/images/pi/52/fb/d3/99671132-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di1.shopping.com/images/pi/52/fb/d3/99671132-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di1.shopping.com/images/pi/52/fb/d3/99671132-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image><image available="true" height="255" width="499"><sourceURL>http://di1.shopping.com/images/pi/52/fb/d3/99671132-499x255-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image></images><rating><reviewCount>7</reviewCount><rating>5.00</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/pr/sdc_stars_sm_5.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/Nikon-D90-with-18-270mm-Lens/reviews~linkin_id-7000610</reviewURL></rating><minPrice>689.00</minPrice><maxPrice>2299.00</maxPrice><productOffersURL>http://www.shopping.com/Nikon-D90-with-18-270mm-Lens/prices~linkin_id-7000610</productOffersURL><productSpecsURL>http://www.shopping.com/Nikon-D90-with-18-270mm-Lens/info~linkin_id-7000610</productSpecsURL><offers matchedOfferCount="43" pageNumber="1" returnedOfferCount="5"><offer featured="false" id="GU5JJkpUAxe5HujB7fkwAA==" smartBuy="false" used="false"><name>Nikon® D90 12.3MP Digital SLR Camera (Body Only)</name><description>The Nikon D90 will make you rethink what a digital SLR camera can achieve.</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di106.shopping.com/images/di/47/55/35/4a4a6b70554178653548756a4237666b774141-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di106.shopping.com/images/di/47/55/35/4a4a6b70554178653548756a4237666b774141-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="false" height="300" width="300"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="true" height="220" width="220"><sourceURL>http://di106.shopping.com/images/di/47/55/35/4a4a6b70554178653548756a4237666b774141-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">1015.99</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">6.05</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">1015.99</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=332477&amp;crawler_id=332477&amp;dealId=GU5JJkpUAxe5HujB7fkwAA%3D%3D&amp;url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D851830266%26&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=Nikon%C2%AE+D90+12.3MP+Digital+SLR+Camera+%28Body+Only%29&amp;dlprc=1015.99&amp;crn=&amp;istrsmrc=0&amp;isathrsl=0&amp;AR=14&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=99671132&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=14&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=0&amp;SL=0&amp;FS=0&amp;code=&amp;acode=496&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="332477" trusted="false"><name>RadioShack</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/332477.gif</sourceURL></logo><ratingInfo><reviewCount>24</reviewCount><rating>2.25</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_25.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>10148659</sku></offer><offer featured="false" id="XhURuSC-spBbTIDfo4qfzQ==" smartBuy="false" used="false"><name>Nikon D90 SLR Digital Camera (Camera Body)</name><description>The Nikon D90 SLR Digital Camera  with its 12.3-megapixel DX-format CCD  3" High resolution LCD display  Scene Recognition System  Picture Control  Active D-Lighting  and one-button Live View  provides photo enthusiasts with the image quality and performance they need to pursue their own vision while still being intuitive enough for use as an everyday camera. In addition  the D90 introduces the D-Movie mode  allowing for the first time  an interchangeable lens SLR camera that is capable of recording 720p HD movie clips.  Availabilty: In Stock</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="true" height="350" width="350"><sourceURL>http://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-350x350-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>Free Shipping with Any Purchase!</storeNotes><basePrice currency="USD">689.00</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">900.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=647&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=475674&amp;crawler_id=475674&amp;dealId=XhURuSC-spBbTIDfo4qfzQ%3D%3D&amp;url=http%3A%2F%2Fwww.fumfie.com%2Fproduct%2F169.5%2Fshopping-com%3F&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=Nikon+D90+SLR+Digital+Camera+%28Camera+Body%29&amp;dlprc=689.0&amp;crn=&amp;istrsmrc=1&amp;isathrsl=0&amp;AR=16&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=99671132&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=16&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=1&amp;SL=1&amp;FS=1&amp;code=&amp;acode=658&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="475674" trusted="true"><name>FumFie</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/475674.gif</sourceURL></logo><phoneNumber>866 666 9198</phoneNumber><ratingInfo><reviewCount>560</reviewCount><rating>4.27</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_45.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_fumfie~MRD-475674~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>F169C5</sku></offer><offer featured="false" id="o0Px_XLWDbrxAYRy3rCmyQ==" smartBuy="false" used="false"><name>Nikon D90 SLR w/Nikon 18-105mm VR &amp; 55-200mm VR Lenses</name><description>12.3 MegapixelDX Format CMOS Sensor3" VGA LCD DisplayLive ViewSelf Cleaning SensorD-Movie ModeHigh Sensitivity (ISO 3200)4.5 fps BurstIn-Camera Image Editing</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="true" height="500" width="500"><sourceURL>http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">1189.00</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">1189.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=371&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=487342&amp;crawler_id=487342&amp;dealId=o0Px_XLWDbrxAYRy3rCmyQ%3D%3D&amp;url=http%3A%2F%2Fwww.rythercamera.com%2Fcatalog%2Fproduct_info.php%3Fcsv%3Dsh%26products_id%3D30619%26&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=Nikon+D90+SLR+w%2FNikon+18-105mm+VR+%26+55-200mm+VR+Lenses&amp;dlprc=1189.0&amp;crn=&amp;istrsmrc=0&amp;isathrsl=0&amp;AR=20&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=99671132&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=20&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=0&amp;SL=0&amp;FS=1&amp;code=&amp;acode=379&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="487342" trusted="false"><name>RytherCamera.com</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/487342.gif</sourceURL></logo><phoneNumber>1-877-644-7593</phoneNumber><ratingInfo><reviewCount>0</reviewCount></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>30619</sku></offer><offer featured="false" id="4HgbWJSJ8ssgIf8B0MXIwA==" smartBuy="false" used="false"><name>Nikon D90 12.3 Megapixel Digital SLR Camera (Body Only)</name><description>Fusing 12.3 megapixel image quality and a cinematic 24fps D-Movie Mode, the Nikon D90 exceeds the demands of passionate photographers. Coupled with Nikon's EXPEED image processing technologies and NIKKOR optics, breathtaking image fidelity is assured. Combined with fast 0.15ms power-up and split-second 65ms shooting lag, dramatic action and decisive moments are captured easily. Effective 4-frequency, ultrasonic sensor cleaning frees image degrading dust particles from the sensor's optical low pass filter.</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di110.shopping.com/images/di/34/48/67/62574a534a3873736749663842304d58497741-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di110.shopping.com/images/di/34/48/67/62574a534a3873736749663842304d58497741-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di110.shopping.com/images/di/34/48/67/62574a534a3873736749663842304d58497741-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>FREE FEDEX 2-3 DAY DELIVERY</storeNotes><basePrice currency="USD">899.95</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">899.95</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=269&amp;BEFID=7185&amp;aon=%5E&amp;MerchantID=9296&amp;crawler_id=811558&amp;dealId=4HgbWJSJ8ssgIf8B0MXIwA%3D%3D&amp;url=http%3A%2F%2Fwww.pcnation.com%2Foptics-gallery%2Fdetails.asp%3Faffid%3D305%26item%3D2N145P&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=Nikon+D90+12.3+Megapixel+Digital+SLR+Camera+%28Body+Only%29&amp;dlprc=899.95&amp;crn=&amp;istrsmrc=1&amp;isathrsl=0&amp;AR=21&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=99671132&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=21&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=0&amp;SL=0&amp;FS=1&amp;code=&amp;acode=257&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="9296" trusted="true"><name>PCNation</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/9296.gif</sourceURL></logo><phoneNumber>800-470-7079</phoneNumber><ratingInfo><reviewCount>1622</reviewCount><rating>4.43</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_45.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_pcnation_9689~MRD-9296~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>2N145P</sku></offer><offer featured="false" id="UNDa3uMDZXOnvD_7sTILYg==" smartBuy="false" used="false"><name>Nikon D90 12.3MP Digital SLR Camera (Body Only)</name><description>Fusing 12.3-megapixel image quality inherited from the award-winning D300 with groundbreaking features, the D90's breathtaking, low-noise image quality is further advanced with EXPEED image processing. Split-second shutter response and continuous shooting at up to 4.5 frames-per-second provide the power to capture fast action and precise moments perfectly, while Nikon's exclusive Scene Recognition System contributes to faster 11-area autofocus performance, finer white balance detection and more. The D90 delivers the control passionate photographers demand, utilizing comprehensive exposure functions and the intelligence of 3D Color Matrix Metering II. Stunning results come to life on a 3-inch 920,000-dot color LCD monitor, providing accurate image review, Live View composition and brilliant playback of the D90's cinematic-quality 24-fps HD D-Movie mode.</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="true" height="500" width="500"><sourceURL>http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>Fantastic prices with ease &amp; comfort of Amazon.com!</storeNotes><basePrice currency="USD">780.00</basePrice><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">780.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=566&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=301531&amp;crawler_id=1903313&amp;dealId=UNDa3uMDZXOnvD_7sTILYg%3D%3D&amp;url=http%3A%2F%2Fwww.amazon.com%2Fdp%2FB001ET5U92%2Fref%3Dasc_df_B001ET5U921751618%3Fsmid%3DAHF4SYKP09WBH%26tag%3Ddealtime-ce-mp01feed-20%26linkCode%3Dasn%26creative%3D395105%26creativeASIN%3DB001ET5U92&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=Nikon+D90+12.3MP+Digital+SLR+Camera+%28Body+Only%29&amp;dlprc=780.0&amp;crn=&amp;istrsmrc=0&amp;isathrsl=0&amp;AR=29&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=99671132&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=29&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=0&amp;SL=0&amp;FS=1&amp;code=&amp;acode=520&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="301531" trusted="false"><name>Amazon Marketplace</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/301531.gif</sourceURL></logo><ratingInfo><reviewCount>213</reviewCount><rating>2.73</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_25.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_amazon_marketplace_9689~MRD-301531~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>B001ET5U92</sku></offer></offers></product><product id="70621646"><name>Nikon D90 Digital Camera with 18-105mm lens</name><shortDescription>12.9 Megapixel, SLR Camera, 3 in. LCD Screen, 5.8x Optical Zoom, With Video Capability, Weight: 2.3 lb.</shortDescription><fullDescription>Its 12.3 megapixel DX-format CMOS image sensor and EXPEED image processing system offer outstanding image quality across a wide ISO light sensitivity range. Live View mode lets you compose and shoot via the high-resolution 3-inch LCD monitor, and an advanced Scene Recognition System and autofocus performance help capture images with astounding accuracy. Movies can be shot in Motion JPEG format using the D-Movie function. The camera’s large image sensor ensures exceptional movie image quality and you can create dramatic effects by shooting with a wide range of interchangeable NIKKOR lenses, from wide-angle to macro to fisheye, or by adjusting the lens aperture and experimenting with depth-of-field. The D90 – designed to fuel your passion for photography.</fullDescription><images><image available="true" height="100" width="100"><sourceURL>http://di1.shopping.com/images/pi/57/6a/4f/70621646-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di1.shopping.com/images/pi/57/6a/4f/70621646-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di1.shopping.com/images/pi/57/6a/4f/70621646-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di1.shopping.com/images/pi/57/6a/4f/70621646-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="true" height="489" width="490"><sourceURL>http://di1.shopping.com/images/pi/57/6a/4f/70621646-490x489-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=2&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image></images><rating><reviewCount>32</reviewCount><rating>4.81</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/pr/sdc_stars_sm_5.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/Nikon-D90-with-18-105mm-lens/reviews~linkin_id-7000610</reviewURL></rating><minPrice>849.95</minPrice><maxPrice>1599.95</maxPrice><productOffersURL>http://www.shopping.com/Nikon-D90-with-18-105mm-lens/prices~linkin_id-7000610</productOffersURL><productSpecsURL>http://www.shopping.com/Nikon-D90-with-18-105mm-lens/info~linkin_id-7000610</productSpecsURL><offers matchedOfferCount="25" pageNumber="1" returnedOfferCount="5"><offer featured="false" id="3o5e1VghgJPfhLvT1JFKTA==" smartBuy="false" used="false"><name>Nikon D90 18-105mm VR Lens</name><description>The Nikon D90 SLR Digital Camera  with its 12.3-megapixel DX-format CMOS  3" High resolution LCD display  Scene Recognition System  Picture Control  Active D-Lighting  and one-button Live View  prov</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di111.shopping.com/images/di/33/6f/35/6531566768674a5066684c7654314a464b5441-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di111.shopping.com/images/di/33/6f/35/6531566768674a5066684c7654314a464b5441-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="false" height="300" width="300"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image><image available="true" height="260" width="260"><sourceURL>http://di111.shopping.com/images/di/33/6f/35/6531566768674a5066684c7654314a464b5441-260x260-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=1</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">849.95</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">849.95</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=419&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=9390&amp;crawler_id=1905054&amp;dealId=3o5e1VghgJPfhLvT1JFKTA%3D%3D&amp;url=http%3A%2F%2Fwww.ajrichard.com%2FNikon-D90-18-105mm-VR-Lens%2Fp-292%3Frefid%3DShopping%26&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=Nikon+D90+18-105mm+VR+Lens&amp;dlprc=849.95&amp;crn=&amp;istrsmrc=0&amp;isathrsl=0&amp;AR=2&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=70621646&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=2&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=0&amp;SL=0&amp;FS=1&amp;code=&amp;acode=425&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="9390" trusted="false"><name>AJRichard</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/9390.gif</sourceURL></logo><phoneNumber>1-888-871-1256</phoneNumber><ratingInfo><reviewCount>3124</reviewCount><rating>4.48</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_45.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_ajrichard~MRD-9390~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>292</sku></offer><offer featured="false" id="_lYWj_jbwfsSkfcwUcDuww==" smartBuy="false" used="false"><name>Nikon D90 SLR w/Nikon 18-105mm VR Lens</name><description>12.3 MegapixelDX Format CMOS Sensor3" VGA LCD DisplayLive ViewSelf Cleaning SensorD-Movie ModeHigh Sensitivity (ISO 3200)4.5 fps BurstIn-Camera Image Editing</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image><image available="true" height="500" width="500"><sourceURL>http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=2</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">909.00</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">909.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=371&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=487342&amp;crawler_id=487342&amp;dealId=_lYWj_jbwfsSkfcwUcDuww%3D%3D&amp;url=http%3A%2F%2Fwww.rythercamera.com%2Fcatalog%2Fproduct_info.php%3Fcsv%3Dsh%26products_id%3D30971%26&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=Nikon+D90+SLR+w%2FNikon+18-105mm+VR+Lens&amp;dlprc=909.0&amp;crn=&amp;istrsmrc=0&amp;isathrsl=0&amp;AR=3&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=70621646&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=3&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=0&amp;SL=0&amp;FS=1&amp;code=&amp;acode=379&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="487342" trusted="false"><name>RytherCamera.com</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/487342.gif</sourceURL></logo><phoneNumber>1-877-644-7593</phoneNumber><ratingInfo><reviewCount>0</reviewCount></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>30971</sku></offer><offer featured="false" id="1KCclCGuWvty2XKU9skadg==" smartBuy="false" used="false"><name>25448/D90 12.3 Megapixel Digital Camera 18-105mm Zoom Lens w/ 3" Screen - Black</name><description>Nikon D90 - Digital camera - SLR - 12.3 Mpix - Nikon AF-S DX 18-105mm lens - optical zoom: 5.8 x - supported memory: SD, SDHC</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=3</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>Get 30 days FREE SHIPPING w/ ShipVantage</storeNotes><basePrice currency="USD">1199.00</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">8.20</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">1199.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=485615&amp;crawler_id=485615&amp;dealId=1KCclCGuWvty2XKU9skadg%3D%3D&amp;url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBRtFXpzYx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmb2JcVlhCGGkPc3QDEkFZVQ0WFhdRW0MWbgYWDlxzdGMdAVQWRi0xDAwPFhw9TSobb05eWVVYKzsLTFVVQi5RICs3SA8MU1s2MQQKD1wf%26nAID%3D13736960%26&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=25448%2FD90+12.3+Megapixel+Digital+Camera+18-105mm+Zoom+Lens+w%2F+3%22+Screen+-+Black&amp;dlprc=1199.0&amp;crn=&amp;istrsmrc=1&amp;isathrsl=0&amp;AR=4&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=70621646&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=4&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=0&amp;SL=0&amp;FS=0&amp;code=&amp;acode=586&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="485615" trusted="true"><name>Sears</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/485615.gif</sourceURL></logo><phoneNumber>1-800-349-4358</phoneNumber><ratingInfo><reviewCount>888</reviewCount><rating>2.85</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_3.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>00353197000</sku></offer><offer featured="false" id="3-VOSfVV5Jo7HlA4kJtanA==" smartBuy="false" used="false"><name>Nikon® D90 12.3MP Digital SLR with 18-105mm Lens</name><description>The Nikon D90 will make you rethink what a digital SLR camera can achieve.</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di101.shopping.com/images/di/33/2d/56/4f53665656354a6f37486c41346b4a74616e41-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di101.shopping.com/images/di/33/2d/56/4f53665656354a6f37486c41346b4a74616e41-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image><image available="false" height="300" width="300"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image><image available="true" height="220" width="220"><sourceURL>http://di101.shopping.com/images/di/33/2d/56/4f53665656354a6f37486c41346b4a74616e41-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=4</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">1350.99</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">6.05</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">1350.99</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=332477&amp;crawler_id=332477&amp;dealId=3-VOSfVV5Jo7HlA4kJtanA%3D%3D&amp;url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D982673361%26&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=Nikon%C2%AE+D90+12.3MP+Digital+SLR+with+18-105mm+Lens&amp;dlprc=1350.99&amp;crn=&amp;istrsmrc=0&amp;isathrsl=0&amp;AR=5&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=70621646&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=5&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=0&amp;SL=0&amp;FS=0&amp;code=&amp;acode=496&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="332477" trusted="false"><name>RadioShack</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/332477.gif</sourceURL></logo><ratingInfo><reviewCount>24</reviewCount><rating>2.25</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_25.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>11148905</sku></offer><offer featured="false" id="kQnB6rS4AjN5dx5h2_631g==" smartBuy="false" used="false"><name>Nikon D90 Kit 12.3-megapixel Digital SLR with 18-105mm VR Lens</name><description>Photographers, take your passion further!Now is the time for new creativity, and to rethink what a digital SLR camera can achieve. It's time for the D90, a camera with everything you would expect from Nikon's next-generation D-SLRs, and some unexpected surprises, as well. The stunning image quality is inherited from the D300, Nikon's DX-format flagship. The D90 also has Nikon's unmatched ergonomics and high performance, and now takes high-quality movies with beautifully cinematic results. The world of photography has changed, and with the D90 in your hands, it's time to make your own rules.AF-S DX NIKKOR 18-105mm f/3.5-5.6G ED VR LensWide-ratio 5.8x zoom Compact, versatile and ideal for a broad range of shooting situations, ranging from interiors and landscapes to beautiful portraits� a perfect everyday zoom. Nikon VR (Vibration Reduction) image stabilization Vibration Reduction is engineered specifically for each VR NIKKOR lens and enables handheld shooting at up to 3 shutter speeds slower than would</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di110.shopping.com/images/di/6b/51/6e/4236725334416a4e3564783568325f36333167-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di110.shopping.com/images/di/6b/51/6e/4236725334416a4e3564783568325f36333167-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di110.shopping.com/images/di/6b/51/6e/4236725334416a4e3564783568325f36333167-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image><image available="true" height="232" width="300"><sourceURL>http://di110.shopping.com/images/di/6b/51/6e/4236725334416a4e3564783568325f36333167-300x232-0-0.jpg?p=p2.a121bc2aaf029435dce6&amp;a=1&amp;c=1&amp;l=7000610&amp;t=111021183845&amp;r=5</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>Shipping Included!</storeNotes><basePrice currency="USD">1050.00</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">1199.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=135&amp;BEFID=7185&amp;aon=%5E1&amp;MerchantID=313162&amp;crawler_id=313162&amp;dealId=kQnB6rS4AjN5dx5h2_631g%3D%3D&amp;url=http%3A%2F%2Fonecall.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1pZSxNoWHFwLx8GTAICa2ZeH1sPXTZLNzRpAh1HR0BxPQEGCBJNMhFHUElsFCFCVkVTTHAcBggEHQ4aHXNpGERGH3RQODsbAgdechJtbBt8fx8JAwhtZFAzJj1oGgIWCxRlNyFOUV9UUGIxBgo0T0IyTSYqJ0RWHw4QPCIBAAQXRGMDICg6TllZVBhh%26nAID%3D13736960&amp;linkin_id=7000610&amp;Issdt=111021183845&amp;searchID=p2.a121bc2aaf029435dce6&amp;DealName=Nikon+D90+Kit+12.3-megapixel+Digital+SLR+with+18-105mm+VR+Lens&amp;dlprc=1050.0&amp;crn=&amp;istrsmrc=1&amp;isathrsl=0&amp;AR=6&amp;NG=20&amp;NDP=200&amp;PN=1&amp;ST=7&amp;DB=sdcprod&amp;MT=phx-pkadudc2&amp;FPT=DSP&amp;NDS=&amp;NMS=&amp;MRS=&amp;PD=70621646&amp;brnId=14804&amp;IsFtr=0&amp;IsSmart=0&amp;DMT=&amp;op=&amp;CM=&amp;DlLng=1&amp;RR=6&amp;cid=&amp;semid1=&amp;semid2=&amp;IsLps=0&amp;CC=0&amp;SL=1&amp;FS=1&amp;code=&amp;acode=143&amp;category=&amp;HasLink=&amp;frameId=&amp;ND=&amp;MN=&amp;PT=&amp;prjID=&amp;GR=&amp;lnkId=&amp;VK=</offerURL><store authorizedReseller="false" id="313162" trusted="true"><name>OneCall</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/313162.gif</sourceURL></logo><phoneNumber>1.800.398.0766</phoneNumber><ratingInfo><reviewCount>180</reviewCount><rating>4.44</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_45.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_onecall_9689~MRD-313162~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>92826</sku></offer></offers></product></items><attributes matchedAttributeCount="5" returnedAttributeCount="5"><attribute id="Dynamic_Price_Range"><name>Price range</name><attributeURL>http://www.shopping.com/digital-cameras/nikon/products?oq=nikon&amp;linkin_id=7000610</attributeURL><attributeValues matchedValueCount="2" returnedValueCount="2"><attributeValue id="price_range_24_4012" matchingItemsCount="1"><name>$24 - $4012</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon/products?minPrice=24&amp;maxPrice=4012&amp;linkin_id=7000610</attributeValueURL></attributeValue><attributeValue id="price_range_4012_7999" matchingItemsCount="1"><name>$4012 - $7999</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon/products?minPrice=4012&amp;maxPrice=7999&amp;linkin_id=7000610</attributeValueURL></attributeValue></attributeValues></attribute><attribute id="9688_brand"><name>Brand</name><attributeURL>http://www.shopping.com/digital-cameras/nikon/products~all-9688-brand~MS-1?oq=nikon&amp;linkin_id=7000610</attributeURL><attributeValues matchedValueCount="7" returnedValueCount="5"><attributeValue id="brand_nikon" matchingItemsCount="2261"><name>Nikon</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+brand-nikon/products~linkin_id-7000610</attributeValueURL></attributeValue><attributeValue id="9688_brand_crane" matchingItemsCount="17"><name>Crane</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+9688-brand-crane/products~linkin_id-7000610</attributeValueURL></attributeValue><attributeValue id="ikelite" matchingItemsCount="2"><name>Ikelite</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+ikelite/products~linkin_id-7000610</attributeValueURL></attributeValue><attributeValue id="bower" matchingItemsCount="1"><name>Bower</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+bower/products~linkin_id-7000610</attributeValueURL></attributeValue><attributeValue id="brand_fuji" matchingItemsCount="2"><name>FUJIFILM</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+brand-fuji/products~linkin_id-7000610</attributeValueURL></attributeValue></attributeValues></attribute><attribute id="store"><name>Store</name><attributeURL>http://www.shopping.com/digital-cameras/nikon/products~all-store~MS-1?oq=nikon&amp;linkin_id=7000610</attributeURL><attributeValues matchedValueCount="35" returnedValueCount="5"><attributeValue id="store_amazon_marketplace_9689" matchingItemsCount="808"><name>Amazon Marketplace</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+store-amazon-marketplace-9689/products~linkin_id-7000610</attributeValueURL></attributeValue><attributeValue id="store_amazon" matchingItemsCount="83"><name>Amazon</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+store-amazon/products~linkin_id-7000610</attributeValueURL></attributeValue><attributeValue id="store_adorama" matchingItemsCount="81"><name>Adorama</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+store-adorama/products~linkin_id-7000610</attributeValueURL></attributeValue><attributeValue id="store_j_r_music_and_computer_world" matchingItemsCount="78"><name>J&amp;R Music and Computer World</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+store-j-r-music-and-computer-world/products~linkin_id-7000610</attributeValueURL></attributeValue><attributeValue id="store_rythercamera_com" matchingItemsCount="78"><name>RytherCamera.com</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+store-rythercamera-com/products~linkin_id-7000610</attributeValueURL></attributeValue></attributeValues></attribute><attribute id="21885_resolution"><name>Resolution</name><attributeURL>http://www.shopping.com/digital-cameras/nikon/products~all-21885-resolution~MS-1?oq=nikon&amp;linkin_id=7000610</attributeURL><attributeValues matchedValueCount="13" returnedValueCount="5"><attributeValue id="under_4_megapixel" matchingItemsCount="3"><name>Under 4 Megapixel</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+under-4-megapixel/products~linkin_id-7000610</attributeValueURL></attributeValue><attributeValue id="5_megapixel_digital_cameras" matchingItemsCount="1085"><name>At least 5 Megapixel</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+5-megapixel-digital-cameras/products~linkin_id-7000610</attributeValueURL></attributeValue><attributeValue id="6_megapixel_digital_cameras" matchingItemsCount="1080"><name>At least 6 Megapixel</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+6-megapixel-digital-cameras/products~linkin_id-7000610</attributeValueURL></attributeValue><attributeValue id="7_megapixel_digital_cameras" matchingItemsCount="1066"><name>At least 7 Megapixel</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+7-megapixel-digital-cameras/products~linkin_id-7000610</attributeValueURL></attributeValue><attributeValue id="8_megapixel_digital_cameras" matchingItemsCount="1056"><name>At least 8 Megapixel</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+8-megapixel-digital-cameras/products~linkin_id-7000610</attributeValueURL></attributeValue></attributeValues></attribute><attribute id="32804-features"><name>Features</name><attributeURL>http://www.shopping.com/digital-cameras/nikon/products~all-32804-features~MS-1?oq=nikon&amp;linkin_id=7000610</attributeURL><attributeValues matchedValueCount="12" returnedValueCount="5"><attributeValue id="32804_features_shockproof" matchingItemsCount="7"><name>Shockproof</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+32804-features-shockproof/products~linkin_id-7000610</attributeValueURL></attributeValue><attributeValue id="32804_features_waterproof" matchingItemsCount="32"><name>Waterproof</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+32804-features-waterproof/products~linkin_id-7000610</attributeValueURL></attributeValue><attributeValue id="32804_features_freezeproof" matchingItemsCount="7"><name>Freezeproof</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+32804-features-freezeproof/products~linkin_id-7000610</attributeValueURL></attributeValue><attributeValue id="32804_features_dust_proof" matchingItemsCount="23"><name>Dust proof</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+32804-features-dust-proof/products~linkin_id-7000610</attributeValueURL></attributeValue><attributeValue id="32804_features_image_stabilization" matchingItemsCount="797"><name>Image Stabilization</name><attributeValueURL>http://www.shopping.com/digital-cameras/nikon+32804-features-image-stabilization/products~linkin_id-7000610</attributeValueURL></attributeValue></attributeValues></attribute></attributes><contentType>hybrid</contentType></category></categories><relatedTerms><term>digital camera</term><term>g1</term><term>sony</term><term>camera</term><term>canon</term><term>nikon</term><term>kodak digital camera</term><term>kodak</term><term>sony cybershot</term><term>kodak easyshare digital camera</term><term>nikon coolpix</term><term>olympus</term><term>pink digital camera</term><term>canon powershot</term></relatedTerms></GeneralSearchResponse>
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/examples/strict.dtd b/config/tizen/tpk-tools/cli/node_modules/sax/examples/strict.dtd
new file mode 100644 (file)
index 0000000..b274559
--- /dev/null
@@ -0,0 +1,870 @@
+<!--
+    This is HTML 4.01 Strict DTD, which excludes the presentation 
+    attributes and elements that W3C expects to phase out as 
+    support for style sheets matures. Authors should use the Strict
+    DTD when possible, but may use the Transitional DTD when support
+    for presentation attribute and elements is required.
+    
+    HTML 4 includes mechanisms for style sheets, scripting,
+    embedding objects, improved support for right to left and mixed
+    direction text, and enhancements to forms for improved
+    accessibility for people with disabilities.
+
+          Draft: $Date: 1999/12/24 23:37:48 $
+
+          Authors:
+              Dave Raggett <dsr@w3.org>
+              Arnaud Le Hors <lehors@w3.org>
+              Ian Jacobs <ij@w3.org>
+
+    Further information about HTML 4.01 is available at:
+
+        http://www.w3.org/TR/1999/REC-html401-19991224
+
+
+    The HTML 4.01 specification includes additional
+    syntactic constraints that cannot be expressed within
+    the DTDs.
+
+-->
+<!--
+    Typical usage:
+
+    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+            "http://www.w3.org/TR/html4/strict.dtd">
+    <html>
+    <head>
+    ...
+    </head>
+    <body>
+    ...
+    </body>
+    </html>
+
+    The URI used as a system identifier with the public identifier allows
+    the user agent to download the DTD and entity sets as needed.
+
+    The FPI for the Transitional HTML 4.01 DTD is:
+
+        "-//W3C//DTD HTML 4.01 Transitional//EN"
+
+    This version of the transitional DTD is:
+
+        http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd
+
+    If you are writing a document that includes frames, use 
+    the following FPI:
+
+        "-//W3C//DTD HTML 4.01 Frameset//EN"
+
+    This version of the frameset DTD is:
+
+        http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd
+
+    Use the following (relative) URIs to refer to 
+    the DTDs and entity definitions of this specification:
+
+    "strict.dtd"
+    "loose.dtd"
+    "frameset.dtd"
+    "HTMLlat1.ent"
+    "HTMLsymbol.ent"
+    "HTMLspecial.ent"
+
+-->
+
+<!--================== Imported Names ====================================-->
+<!-- Feature Switch for frameset documents -->
+<!ENTITY % HTML.Frameset "IGNORE">
+
+<!ENTITY % ContentType "CDATA"
+    -- media type, as per [RFC2045]
+    -->
+
+<!ENTITY % ContentTypes "CDATA"
+    -- comma-separated list of media types, as per [RFC2045]
+    -->
+
+<!ENTITY % Charset "CDATA"
+    -- a character encoding, as per [RFC2045]
+    -->
+
+<!ENTITY % Charsets "CDATA"
+    -- a space-separated list of character encodings, as per [RFC2045]
+    -->
+
+<!ENTITY % LanguageCode "NAME"
+    -- a language code, as per [RFC1766]
+    -->
+
+<!ENTITY % Character "CDATA"
+    -- a single character from [ISO10646] 
+    -->
+
+<!ENTITY % LinkTypes "CDATA"
+    -- space-separated list of link types
+    -->
+
+<!ENTITY % MediaDesc "CDATA"
+    -- single or comma-separated list of media descriptors
+    -->
+
+<!ENTITY % URI "CDATA"
+    -- a Uniform Resource Identifier,
+       see [URI]
+    -->
+
+<!ENTITY % Datetime "CDATA" -- date and time information. ISO date format -->
+
+
+<!ENTITY % Script "CDATA" -- script expression -->
+
+<!ENTITY % StyleSheet "CDATA" -- style sheet data -->
+
+
+
+<!ENTITY % Text "CDATA">
+
+
+<!-- Parameter Entities -->
+
+<!ENTITY % head.misc "SCRIPT|STYLE|META|LINK|OBJECT" -- repeatable head elements -->
+
+<!ENTITY % heading "H1|H2|H3|H4|H5|H6">
+
+<!ENTITY % list "UL | OL">
+
+<!ENTITY % preformatted "PRE">
+
+
+<!--================ Character mnemonic entities =========================-->
+
+<!ENTITY % HTMLlat1 PUBLIC
+   "-//W3C//ENTITIES Latin1//EN//HTML"
+   "HTMLlat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+   "-//W3C//ENTITIES Symbols//EN//HTML"
+   "HTMLsymbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+   "-//W3C//ENTITIES Special//EN//HTML"
+   "HTMLspecial.ent">
+%HTMLspecial;
+<!--=================== Generic Attributes ===============================-->
+
+<!ENTITY % coreattrs
+ "id          ID             #IMPLIED  -- document-wide unique id --
+  class       CDATA          #IMPLIED  -- space-separated list of classes --
+  style       %StyleSheet;   #IMPLIED  -- associated style info --
+  title       %Text;         #IMPLIED  -- advisory title --"
+  >
+
+<!ENTITY % i18n
+ "lang        %LanguageCode; #IMPLIED  -- language code --
+  dir         (ltr|rtl)      #IMPLIED  -- direction for weak/neutral text --"
+  >
+
+<!ENTITY % events
+ "onclick     %Script;       #IMPLIED  -- a pointer button was clicked --
+  ondblclick  %Script;       #IMPLIED  -- a pointer button was double clicked--
+  onmousedown %Script;       #IMPLIED  -- a pointer button was pressed down --
+  onmouseup   %Script;       #IMPLIED  -- a pointer button was released --
+  onmouseover %Script;       #IMPLIED  -- a pointer was moved onto --
+  onmousemove %Script;       #IMPLIED  -- a pointer was moved within --
+  onmouseout  %Script;       #IMPLIED  -- a pointer was moved away --
+  onkeypress  %Script;       #IMPLIED  -- a key was pressed and released --
+  onkeydown   %Script;       #IMPLIED  -- a key was pressed down --
+  onkeyup     %Script;       #IMPLIED  -- a key was released --"
+  >
+
+<!-- Reserved Feature Switch -->
+<!ENTITY % HTML.Reserved "IGNORE">
+
+<!-- The following attributes are reserved for possible future use -->
+<![ %HTML.Reserved; [
+<!ENTITY % reserved
+ "datasrc     %URI;          #IMPLIED  -- a single or tabular Data Source --
+  datafld     CDATA          #IMPLIED  -- the property or column name --
+  dataformatas (plaintext|html) plaintext -- text or html --"
+  >
+]]>
+
+<!ENTITY % reserved "">
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+
+<!--=================== Text Markup ======================================-->
+
+<!ENTITY % fontstyle
+ "TT | I | B | BIG | SMALL">
+
+<!ENTITY % phrase "EM | STRONG | DFN | CODE |
+                   SAMP | KBD | VAR | CITE | ABBR | ACRONYM" >
+
+<!ENTITY % special
+   "A | IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO">
+
+<!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON">
+
+<!-- %inline; covers inline or "text-level" elements -->
+<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;">
+
+<!ELEMENT (%fontstyle;|%phrase;) - - (%inline;)*>
+<!ATTLIST (%fontstyle;|%phrase;)
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  >
+
+<!ELEMENT (SUB|SUP) - - (%inline;)*    -- subscript, superscript -->
+<!ATTLIST (SUB|SUP)
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  >
+
+<!ELEMENT SPAN - - (%inline;)*         -- generic language/style container -->
+<!ATTLIST SPAN
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  %reserved;                          -- reserved for possible future use --
+  >
+
+<!ELEMENT BDO - - (%inline;)*          -- I18N BiDi over-ride -->
+<!ATTLIST BDO
+  %coreattrs;                          -- id, class, style, title --
+  lang        %LanguageCode; #IMPLIED  -- language code --
+  dir         (ltr|rtl)      #REQUIRED -- directionality --
+  >
+
+
+<!ELEMENT BR - O EMPTY                 -- forced line break -->
+<!ATTLIST BR
+  %coreattrs;                          -- id, class, style, title --
+  >
+
+<!--================== HTML content models ===============================-->
+
+<!--
+    HTML has two basic content models:
+
+        %inline;     character level elements and text strings
+        %block;      block-like elements e.g. paragraphs and lists
+-->
+
+<!ENTITY % block
+     "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
+      BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">
+
+<!ENTITY % flow "%block; | %inline;">
+
+<!--=================== Document Body ====================================-->
+
+<!ELEMENT BODY O O (%block;|SCRIPT)+ +(INS|DEL) -- document body -->
+<!ATTLIST BODY
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  onload          %Script;   #IMPLIED  -- the document has been loaded --
+  onunload        %Script;   #IMPLIED  -- the document has been removed --
+  >
+
+<!ELEMENT ADDRESS - - (%inline;)* -- information on author -->
+<!ATTLIST ADDRESS
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  >
+
+<!ELEMENT DIV - - (%flow;)*            -- generic language/style container -->
+<!ATTLIST DIV
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  %reserved;                           -- reserved for possible future use --
+  >
+
+
+<!--================== The Anchor Element ================================-->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+<!ENTITY % Coords "CDATA" -- comma-separated list of lengths -->
+
+<!ELEMENT A - - (%inline;)* -(A)       -- anchor -->
+<!ATTLIST A
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  charset     %Charset;      #IMPLIED  -- char encoding of linked resource --
+  type        %ContentType;  #IMPLIED  -- advisory content type --
+  name        CDATA          #IMPLIED  -- named link end --
+  href        %URI;          #IMPLIED  -- URI for linked resource --
+  hreflang    %LanguageCode; #IMPLIED  -- language code --
+  rel         %LinkTypes;    #IMPLIED  -- forward link types --
+  rev         %LinkTypes;    #IMPLIED  -- reverse link types --
+  accesskey   %Character;    #IMPLIED  -- accessibility key character --
+  shape       %Shape;        rect      -- for use with client-side image maps --
+  coords      %Coords;       #IMPLIED  -- for use with client-side image maps --
+  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
+  onfocus     %Script;       #IMPLIED  -- the element got the focus --
+  onblur      %Script;       #IMPLIED  -- the element lost the focus --
+  >
+
+<!--================== Client-side image maps ============================-->
+
+<!-- These can be placed in the same document or grouped in a
+     separate document although this isn't yet widely supported -->
+
+<!ELEMENT MAP - - ((%block;) | AREA)+ -- client-side image map -->
+<!ATTLIST MAP
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  name        CDATA          #REQUIRED -- for reference by usemap --
+  >
+
+<!ELEMENT AREA - O EMPTY               -- client-side image map area -->
+<!ATTLIST AREA
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  shape       %Shape;        rect      -- controls interpretation of coords --
+  coords      %Coords;       #IMPLIED  -- comma-separated list of lengths --
+  href        %URI;          #IMPLIED  -- URI for linked resource --
+  nohref      (nohref)       #IMPLIED  -- this region has no action --
+  alt         %Text;         #REQUIRED -- short description --
+  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
+  accesskey   %Character;    #IMPLIED  -- accessibility key character --
+  onfocus     %Script;       #IMPLIED  -- the element got the focus --
+  onblur      %Script;       #IMPLIED  -- the element lost the focus --
+  >
+
+<!--================== The LINK Element ==================================-->
+
+<!--
+  Relationship values can be used in principle:
+
+   a) for document specific toolbars/menus when used
+      with the LINK element in document head e.g.
+        start, contents, previous, next, index, end, help
+   b) to link to a separate style sheet (rel=stylesheet)
+   c) to make a link to a script (rel=script)
+   d) by stylesheets to control how collections of
+      html nodes are rendered into printed documents
+   e) to make a link to a printable version of this document
+      e.g. a postscript or pdf version (rel=alternate media=print)
+-->
+
+<!ELEMENT LINK - O EMPTY               -- a media-independent link -->
+<!ATTLIST LINK
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  charset     %Charset;      #IMPLIED  -- char encoding of linked resource --
+  href        %URI;          #IMPLIED  -- URI for linked resource --
+  hreflang    %LanguageCode; #IMPLIED  -- language code --
+  type        %ContentType;  #IMPLIED  -- advisory content type --
+  rel         %LinkTypes;    #IMPLIED  -- forward link types --
+  rev         %LinkTypes;    #IMPLIED  -- reverse link types --
+  media       %MediaDesc;    #IMPLIED  -- for rendering on these media --
+  >
+
+<!--=================== Images ===========================================-->
+
+<!-- Length defined in strict DTD for cellpadding/cellspacing -->
+<!ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length -->
+<!ENTITY % MultiLength "CDATA" -- pixel, percentage, or relative -->
+
+<![ %HTML.Frameset; [
+<!ENTITY % MultiLengths "CDATA" -- comma-separated list of MultiLength -->
+]]>
+
+<!ENTITY % Pixels "CDATA" -- integer representing length in pixels -->
+
+
+<!-- To avoid problems with text-only UAs as well as 
+   to make image content understandable and navigable 
+   to users of non-visual UAs, you need to provide
+   a description with ALT, and avoid server-side image maps -->
+<!ELEMENT IMG - O EMPTY                -- Embedded image -->
+<!ATTLIST IMG
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  src         %URI;          #REQUIRED -- URI of image to embed --
+  alt         %Text;         #REQUIRED -- short description --
+  longdesc    %URI;          #IMPLIED  -- link to long description
+                                          (complements alt) --
+  name        CDATA          #IMPLIED  -- name of image for scripting --
+  height      %Length;       #IMPLIED  -- override height --
+  width       %Length;       #IMPLIED  -- override width --
+  usemap      %URI;          #IMPLIED  -- use client-side image map --
+  ismap       (ismap)        #IMPLIED  -- use server-side image map --
+  >
+
+<!-- USEMAP points to a MAP element which may be in this document
+  or an external document, although the latter is not widely supported -->
+
+<!--==================== OBJECT ======================================-->
+<!--
+  OBJECT is used to embed objects as part of HTML pages 
+  PARAM elements should precede other content. SGML mixed content
+  model technicality precludes specifying this formally ...
+-->
+
+<!ELEMENT OBJECT - - (PARAM | %flow;)*
+ -- generic embedded object -->
+<!ATTLIST OBJECT
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  declare     (declare)      #IMPLIED  -- declare but don't instantiate flag --
+  classid     %URI;          #IMPLIED  -- identifies an implementation --
+  codebase    %URI;          #IMPLIED  -- base URI for classid, data, archive--
+  data        %URI;          #IMPLIED  -- reference to object's data --
+  type        %ContentType;  #IMPLIED  -- content type for data --
+  codetype    %ContentType;  #IMPLIED  -- content type for code --
+  archive     CDATA          #IMPLIED  -- space-separated list of URIs --
+  standby     %Text;         #IMPLIED  -- message to show while loading --
+  height      %Length;       #IMPLIED  -- override height --
+  width       %Length;       #IMPLIED  -- override width --
+  usemap      %URI;          #IMPLIED  -- use client-side image map --
+  name        CDATA          #IMPLIED  -- submit as part of form --
+  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
+  %reserved;                           -- reserved for possible future use --
+  >
+
+<!ELEMENT PARAM - O EMPTY              -- named property value -->
+<!ATTLIST PARAM
+  id          ID             #IMPLIED  -- document-wide unique id --
+  name        CDATA          #REQUIRED -- property name --
+  value       CDATA          #IMPLIED  -- property value --
+  valuetype   (DATA|REF|OBJECT) DATA   -- How to interpret value --
+  type        %ContentType;  #IMPLIED  -- content type for value
+                                          when valuetype=ref --
+  >
+
+
+<!--=================== Horizontal Rule ==================================-->
+
+<!ELEMENT HR - O EMPTY -- horizontal rule -->
+<!ATTLIST HR
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  >
+
+<!--=================== Paragraphs =======================================-->
+
+<!ELEMENT P - O (%inline;)*            -- paragraph -->
+<!ATTLIST P
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  >
+
+<!--=================== Headings =========================================-->
+
+<!--
+  There are six levels of headings from H1 (the most important)
+  to H6 (the least important).
+-->
+
+<!ELEMENT (%heading;)  - - (%inline;)* -- heading -->
+<!ATTLIST (%heading;)
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  >
+
+<!--=================== Preformatted Text ================================-->
+
+<!-- excludes markup for images and changes in font size -->
+<!ENTITY % pre.exclusion "IMG|OBJECT|BIG|SMALL|SUB|SUP">
+
+<!ELEMENT PRE - - (%inline;)* -(%pre.exclusion;) -- preformatted text -->
+<!ATTLIST PRE
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  >
+
+<!--===================== Inline Quotes ==================================-->
+
+<!ELEMENT Q - - (%inline;)*            -- short inline quotation -->
+<!ATTLIST Q
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  cite        %URI;          #IMPLIED  -- URI for source document or msg --
+  >
+
+<!--=================== Block-like Quotes ================================-->
+
+<!ELEMENT BLOCKQUOTE - - (%block;|SCRIPT)+ -- long quotation -->
+<!ATTLIST BLOCKQUOTE
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  cite        %URI;          #IMPLIED  -- URI for source document or msg --
+  >
+
+<!--=================== Inserted/Deleted Text ============================-->
+
+
+<!-- INS/DEL are handled by inclusion on BODY -->
+<!ELEMENT (INS|DEL) - - (%flow;)*      -- inserted text, deleted text -->
+<!ATTLIST (INS|DEL)
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  cite        %URI;          #IMPLIED  -- info on reason for change --
+  datetime    %Datetime;     #IMPLIED  -- date and time of change --
+  >
+
+<!--=================== Lists ============================================-->
+
+<!-- definition lists - DT for term, DD for its definition -->
+
+<!ELEMENT DL - - (DT|DD)+              -- definition list -->
+<!ATTLIST DL
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  >
+
+<!ELEMENT DT - O (%inline;)*           -- definition term -->
+<!ELEMENT DD - O (%flow;)*             -- definition description -->
+<!ATTLIST (DT|DD)
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  >
+
+
+<!ELEMENT OL - - (LI)+                 -- ordered list -->
+<!ATTLIST OL
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  >
+
+<!-- Unordered Lists (UL) bullet styles -->
+<!ELEMENT UL - - (LI)+                 -- unordered list -->
+<!ATTLIST UL
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  >
+
+
+
+<!ELEMENT LI - O (%flow;)*             -- list item -->
+<!ATTLIST LI
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  >
+
+<!--================ Forms ===============================================-->
+<!ELEMENT FORM - - (%block;|SCRIPT)+ -(FORM) -- interactive form -->
+<!ATTLIST FORM
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  action      %URI;          #REQUIRED -- server-side form handler --
+  method      (GET|POST)     GET       -- HTTP method used to submit the form--
+  enctype     %ContentType;  "application/x-www-form-urlencoded"
+  accept      %ContentTypes; #IMPLIED  -- list of MIME types for file upload --
+  name        CDATA          #IMPLIED  -- name of form for scripting --
+  onsubmit    %Script;       #IMPLIED  -- the form was submitted --
+  onreset     %Script;       #IMPLIED  -- the form was reset --
+  accept-charset %Charsets;  #IMPLIED  -- list of supported charsets --
+  >
+
+<!-- Each label must not contain more than ONE field -->
+<!ELEMENT LABEL - - (%inline;)* -(LABEL) -- form field label text -->
+<!ATTLIST LABEL
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  for         IDREF          #IMPLIED  -- matches field ID value --
+  accesskey   %Character;    #IMPLIED  -- accessibility key character --
+  onfocus     %Script;       #IMPLIED  -- the element got the focus --
+  onblur      %Script;       #IMPLIED  -- the element lost the focus --
+  >
+
+<!ENTITY % InputType
+  "(TEXT | PASSWORD | CHECKBOX |
+    RADIO | SUBMIT | RESET |
+    FILE | HIDDEN | IMAGE | BUTTON)"
+   >
+
+<!-- attribute name required for all but submit and reset -->
+<!ELEMENT INPUT - O EMPTY              -- form control -->
+<!ATTLIST INPUT
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  type        %InputType;    TEXT      -- what kind of widget is needed --
+  name        CDATA          #IMPLIED  -- submit as part of form --
+  value       CDATA          #IMPLIED  -- Specify for radio buttons and checkboxes --
+  checked     (checked)      #IMPLIED  -- for radio buttons and check boxes --
+  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
+  readonly    (readonly)     #IMPLIED  -- for text and passwd --
+  size        CDATA          #IMPLIED  -- specific to each type of field --
+  maxlength   NUMBER         #IMPLIED  -- max chars for text fields --
+  src         %URI;          #IMPLIED  -- for fields with images --
+  alt         CDATA          #IMPLIED  -- short description --
+  usemap      %URI;          #IMPLIED  -- use client-side image map --
+  ismap       (ismap)        #IMPLIED  -- use server-side image map --
+  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
+  accesskey   %Character;    #IMPLIED  -- accessibility key character --
+  onfocus     %Script;       #IMPLIED  -- the element got the focus --
+  onblur      %Script;       #IMPLIED  -- the element lost the focus --
+  onselect    %Script;       #IMPLIED  -- some text was selected --
+  onchange    %Script;       #IMPLIED  -- the element value was changed --
+  accept      %ContentTypes; #IMPLIED  -- list of MIME types for file upload --
+  %reserved;                           -- reserved for possible future use --
+  >
+
+<!ELEMENT SELECT - - (OPTGROUP|OPTION)+ -- option selector -->
+<!ATTLIST SELECT
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  name        CDATA          #IMPLIED  -- field name --
+  size        NUMBER         #IMPLIED  -- rows visible --
+  multiple    (multiple)     #IMPLIED  -- default is single selection --
+  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
+  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
+  onfocus     %Script;       #IMPLIED  -- the element got the focus --
+  onblur      %Script;       #IMPLIED  -- the element lost the focus --
+  onchange    %Script;       #IMPLIED  -- the element value was changed --
+  %reserved;                           -- reserved for possible future use --
+  >
+
+<!ELEMENT OPTGROUP - - (OPTION)+ -- option group -->
+<!ATTLIST OPTGROUP
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
+  label       %Text;         #REQUIRED -- for use in hierarchical menus --
+  >
+
+<!ELEMENT OPTION - O (#PCDATA)         -- selectable choice -->
+<!ATTLIST OPTION
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  selected    (selected)     #IMPLIED
+  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
+  label       %Text;         #IMPLIED  -- for use in hierarchical menus --
+  value       CDATA          #IMPLIED  -- defaults to element content --
+  >
+
+<!ELEMENT TEXTAREA - - (#PCDATA)       -- multi-line text field -->
+<!ATTLIST TEXTAREA
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  name        CDATA          #IMPLIED
+  rows        NUMBER         #REQUIRED
+  cols        NUMBER         #REQUIRED
+  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
+  readonly    (readonly)     #IMPLIED
+  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
+  accesskey   %Character;    #IMPLIED  -- accessibility key character --
+  onfocus     %Script;       #IMPLIED  -- the element got the focus --
+  onblur      %Script;       #IMPLIED  -- the element lost the focus --
+  onselect    %Script;       #IMPLIED  -- some text was selected --
+  onchange    %Script;       #IMPLIED  -- the element value was changed --
+  %reserved;                           -- reserved for possible future use --
+  >
+
+<!--
+  #PCDATA is to solve the mixed content problem,
+  per specification only whitespace is allowed there!
+ -->
+<!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group -->
+<!ATTLIST FIELDSET
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  >
+
+<!ELEMENT LEGEND - - (%inline;)*       -- fieldset legend -->
+
+<!ATTLIST LEGEND
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  accesskey   %Character;    #IMPLIED  -- accessibility key character --
+  >
+
+<!ELEMENT BUTTON - -
+     (%flow;)* -(A|%formctrl;|FORM|FIELDSET)
+     -- push button -->
+<!ATTLIST BUTTON
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  name        CDATA          #IMPLIED
+  value       CDATA          #IMPLIED  -- sent to server when submitted --
+  type        (button|submit|reset) submit -- for use as form button --
+  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
+  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
+  accesskey   %Character;    #IMPLIED  -- accessibility key character --
+  onfocus     %Script;       #IMPLIED  -- the element got the focus --
+  onblur      %Script;       #IMPLIED  -- the element lost the focus --
+  %reserved;                           -- reserved for possible future use --
+  >
+
+<!--======================= Tables =======================================-->
+
+<!-- IETF HTML table standard, see [RFC1942] -->
+
+<!--
+ The BORDER attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The FRAME attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the VALIGN attribute.
+
+ The value "border" is included for backwards compatibility with
+ <TABLE BORDER> which yields frame=border and border=implied
+ For <TABLE BORDER=1> you get border=1 and frame=implied. In this
+ case, it is appropriate to treat this as frame=border for backwards
+ compatibility with deployed browsers.
+-->
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
+
+<!--
+ The RULES attribute defines which rules to draw between cells:
+
+ If RULES is absent then assume:
+     "none" if BORDER is absent or BORDER=0 otherwise "all"
+-->
+
+<!ENTITY % TRules "(none | groups | rows | cols | all)">
+  
+<!-- horizontal placement of table relative to document -->
+<!ENTITY % TAlign "(left|center|right)">
+
+<!-- horizontal alignment attributes for cell contents -->
+<!ENTITY % cellhalign
+  "align      (left|center|right|justify|char) #IMPLIED
+   char       %Character;    #IMPLIED  -- alignment char, e.g. char=':' --
+   charoff    %Length;       #IMPLIED  -- offset for alignment char --"
+  >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cellvalign
+  "valign     (top|middle|bottom|baseline) #IMPLIED"
+  >
+
+<!ELEMENT TABLE - -
+     (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
+<!ELEMENT CAPTION  - - (%inline;)*     -- table caption -->
+<!ELEMENT THEAD    - O (TR)+           -- table header -->
+<!ELEMENT TFOOT    - O (TR)+           -- table footer -->
+<!ELEMENT TBODY    O O (TR)+           -- table body -->
+<!ELEMENT COLGROUP - O (COL)*          -- table column group -->
+<!ELEMENT COL      - O EMPTY           -- table column -->
+<!ELEMENT TR       - O (TH|TD)+        -- table row -->
+<!ELEMENT (TH|TD)  - O (%flow;)*       -- table header cell, table data cell-->
+
+<!ATTLIST TABLE                        -- table element --
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  summary     %Text;         #IMPLIED  -- purpose/structure for speech output--
+  width       %Length;       #IMPLIED  -- table width --
+  border      %Pixels;       #IMPLIED  -- controls frame width around table --
+  frame       %TFrame;       #IMPLIED  -- which parts of frame to render --
+  rules       %TRules;       #IMPLIED  -- rulings between rows and cols --
+  cellspacing %Length;       #IMPLIED  -- spacing between cells --
+  cellpadding %Length;       #IMPLIED  -- spacing within cells --
+  %reserved;                           -- reserved for possible future use --
+  datapagesize CDATA         #IMPLIED  -- reserved for possible future use --
+  >
+
+
+<!ATTLIST CAPTION
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  >
+
+<!--
+COLGROUP groups a set of COL elements. It allows you to group
+several semantically related columns together.
+-->
+<!ATTLIST COLGROUP
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  span        NUMBER         1         -- default number of columns in group --
+  width       %MultiLength;  #IMPLIED  -- default width for enclosed COLs --
+  %cellhalign;                         -- horizontal alignment in cells --
+  %cellvalign;                         -- vertical alignment in cells --
+  >
+
+<!--
+ COL elements define the alignment properties for cells in
+ one or more columns.
+
+ The WIDTH attribute specifies the width of the columns, e.g.
+
+     width=64        width in screen pixels
+     width=0.5*      relative width of 0.5
+
+ The SPAN attribute causes the attributes of one
+ COL element to apply to more than one column.
+-->
+<!ATTLIST COL                          -- column groups and properties --
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  span        NUMBER         1         -- COL attributes affect N columns --
+  width       %MultiLength;  #IMPLIED  -- column width specification --
+  %cellhalign;                         -- horizontal alignment in cells --
+  %cellvalign;                         -- vertical alignment in cells --
+  >
+
+<!--
+    Use THEAD to duplicate headers when breaking table
+    across page boundaries, or for static headers when
+    TBODY sections are rendered in scrolling panel.
+
+    Use TFOOT to duplicate footers when breaking table
+    across page boundaries, or for static footers when
+    TBODY sections are rendered in scrolling panel.
+
+    Use multiple TBODY sections when rules are needed
+    between groups of table rows.
+-->
+<!ATTLIST (THEAD|TBODY|TFOOT)          -- table section --
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  %cellhalign;                         -- horizontal alignment in cells --
+  %cellvalign;                         -- vertical alignment in cells --
+  >
+
+<!ATTLIST TR                           -- table row --
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  %cellhalign;                         -- horizontal alignment in cells --
+  %cellvalign;                         -- vertical alignment in cells --
+  >
+
+
+<!-- Scope is simpler than headers attribute for common tables -->
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
+
+<!-- TH is for headers, TD for data, but for cells acting as both use TD -->
+<!ATTLIST (TH|TD)                      -- header or data cell --
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  abbr        %Text;         #IMPLIED  -- abbreviation for header cell --
+  axis        CDATA          #IMPLIED  -- comma-separated list of related headers--
+  headers     IDREFS         #IMPLIED  -- list of id's for header cells --
+  scope       %Scope;        #IMPLIED  -- scope covered by header cells --
+  rowspan     NUMBER         1         -- number of rows spanned by cell --
+  colspan     NUMBER         1         -- number of cols spanned by cell --
+  %cellhalign;                         -- horizontal alignment in cells --
+  %cellvalign;                         -- vertical alignment in cells --
+  >
+
+
+<!--================ Document Head =======================================-->
+<!-- %head.misc; defined earlier on as "SCRIPT|STYLE|META|LINK|OBJECT" -->
+<!ENTITY % head.content "TITLE & BASE?">
+
+<!ELEMENT HEAD O O (%head.content;) +(%head.misc;) -- document head -->
+<!ATTLIST HEAD
+  %i18n;                               -- lang, dir --
+  profile     %URI;          #IMPLIED  -- named dictionary of meta info --
+  >
+
+<!-- The TITLE element is not considered part of the flow of text.
+       It should be displayed, for example as the page header or
+       window title. Exactly one title is required per document.
+    -->
+<!ELEMENT TITLE - - (#PCDATA) -(%head.misc;) -- document title -->
+<!ATTLIST TITLE %i18n>
+
+
+<!ELEMENT BASE - O EMPTY               -- document base URI -->
+<!ATTLIST BASE
+  href        %URI;          #REQUIRED -- URI that acts as base URI --
+  >
+
+<!ELEMENT META - O EMPTY               -- generic metainformation -->
+<!ATTLIST META
+  %i18n;                               -- lang, dir, for use with content --
+  http-equiv  NAME           #IMPLIED  -- HTTP response header name  --
+  name        NAME           #IMPLIED  -- metainformation name --
+  content     CDATA          #REQUIRED -- associated information --
+  scheme      CDATA          #IMPLIED  -- select form of content --
+  >
+
+<!ELEMENT STYLE - - %StyleSheet        -- style info -->
+<!ATTLIST STYLE
+  %i18n;                               -- lang, dir, for use with title --
+  type        %ContentType;  #REQUIRED -- content type of style language --
+  media       %MediaDesc;    #IMPLIED  -- designed for use with these media --
+  title       %Text;         #IMPLIED  -- advisory title --
+  >
+
+<!ELEMENT SCRIPT - - %Script;          -- script statements -->
+<!ATTLIST SCRIPT
+  charset     %Charset;      #IMPLIED  -- char encoding of linked resource --
+  type        %ContentType;  #REQUIRED -- content type of script language --
+  src         %URI;          #IMPLIED  -- URI for an external script --
+  defer       (defer)        #IMPLIED  -- UA may defer execution of script --
+  event       CDATA          #IMPLIED  -- reserved for possible future use --
+  for         %URI;          #IMPLIED  -- reserved for possible future use --
+  >
+
+<!ELEMENT NOSCRIPT - - (%block;)+
+  -- alternate content container for non script-based rendering -->
+<!ATTLIST NOSCRIPT
+  %attrs;                              -- %coreattrs, %i18n, %events --
+  >
+
+<!--================ Document Structure ==================================-->
+<!ENTITY % html.content "HEAD, BODY">
+
+<!ELEMENT HTML O O (%html.content;)    -- document root element -->
+<!ATTLIST HTML
+  %i18n;                               -- lang, dir --
+  >
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/examples/switch-bench.js b/config/tizen/tpk-tools/cli/node_modules/sax/examples/switch-bench.js
new file mode 100755 (executable)
index 0000000..4d3cf14
--- /dev/null
@@ -0,0 +1,45 @@
+#!/usr/local/bin/node-bench
+
+var Promise = require("events").Promise;
+
+var xml = require("posix").cat("test.xml").wait(),
+  path = require("path"),
+  sax = require("../lib/sax"),
+  saxT = require("../lib/sax-trampoline"),
+  
+  parser = sax.parser(false, {trim:true}),
+  parserT = saxT.parser(false, {trim:true}),
+  
+  sys = require("sys");
+
+
+var count = exports.stepsPerLap = 500,
+  l = xml.length,
+  runs = 0;
+exports.countPerLap = 1000;
+exports.compare = {
+  "switch" : function () {
+    // sys.debug("switch runs: "+runs++);
+    // for (var x = 0; x < l; x += 1000) {
+    //   parser.write(xml.substr(x, 1000))
+    // }
+    // for (var i = 0; i < count; i ++) {
+      parser.write(xml);
+      parser.close();
+    // }
+    // done();
+  },
+  trampoline : function () {
+    // sys.debug("trampoline runs: "+runs++);
+    // for (var x = 0; x < l; x += 1000) {
+    //   parserT.write(xml.substr(x, 1000))
+    // }
+    // for (var i = 0; i < count; i ++) {
+      parserT.write(xml);
+      parserT.close();
+    // }
+    // done();
+  },
+};
+
+sys.debug("rock and roll...");
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/examples/test.html b/config/tizen/tpk-tools/cli/node_modules/sax/examples/test.html
new file mode 100644 (file)
index 0000000..61f8f1a
--- /dev/null
@@ -0,0 +1,15 @@
+<!doctype html>
+
+<html lang="en">
+<head>
+       <title>testing the parser</title>
+</head>
+<body>
+
+<p>hello
+
+<script>
+
+</script>
+</body>
+</html>
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/examples/test.xml b/config/tizen/tpk-tools/cli/node_modules/sax/examples/test.xml
new file mode 100644 (file)
index 0000000..801292d
--- /dev/null
@@ -0,0 +1,1254 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE RootElement [
+       <!ENTITY e SYSTEM "001.ent">
+]>
+<RootElement param="value">
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+    <FirstElement>
+        Some Text
+    </FirstElement>
+    <?some_pi some_attr="some_value"?>
+    <!-- this is a comment -- but this isnt part of the comment -->
+    <!-- this is a comment == and this is a part of the comment -->
+    <!-- this is a comment > and this is also part of the thing -->
+    <!invalid comment>
+    <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+    <SecondElement param2="something">
+        Pre-Text &amp; <Inline>Inlined text</Inline> Post-text.
+        &#xF8FF;
+    </SecondElement>
+</RootElement>
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/lib/sax.js b/config/tizen/tpk-tools/cli/node_modules/sax/lib/sax.js
new file mode 100644 (file)
index 0000000..17fb08e
--- /dev/null
@@ -0,0 +1,1006 @@
+// wrapper for non-node envs
+;(function (sax) {
+
+sax.parser = function (strict, opt) { return new SAXParser(strict, opt) }
+sax.SAXParser = SAXParser
+sax.SAXStream = SAXStream
+sax.createStream = createStream
+
+// When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.
+// When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),
+// since that's the earliest that a buffer overrun could occur.  This way, checks are
+// as rare as required, but as often as necessary to ensure never crossing this bound.
+// Furthermore, buffers are only tested at most once per write(), so passing a very
+// large string into write() might have undesirable effects, but this is manageable by
+// the caller, so it is assumed to be safe.  Thus, a call to write() may, in the extreme
+// edge case, result in creating at most one complete copy of the string passed in.
+// Set to Infinity to have unlimited buffers.
+sax.MAX_BUFFER_LENGTH = 64 * 1024
+
+var buffers = [
+  "comment", "sgmlDecl", "textNode", "tagName", "doctype",
+  "procInstName", "procInstBody", "entity", "attribName",
+  "attribValue", "cdata", "script"
+]
+
+sax.EVENTS = // for discoverability.
+  [ "text"
+  , "processinginstruction"
+  , "sgmldeclaration"
+  , "doctype"
+  , "comment"
+  , "attribute"
+  , "opentag"
+  , "closetag"
+  , "opencdata"
+  , "cdata"
+  , "closecdata"
+  , "error"
+  , "end"
+  , "ready"
+  , "script"
+  , "opennamespace"
+  , "closenamespace"
+  ]
+
+function SAXParser (strict, opt) {
+  if (!(this instanceof SAXParser)) return new SAXParser(strict, opt)
+
+  var parser = this
+  clearBuffers(parser)
+  parser.q = parser.c = ""
+  parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH
+  parser.opt = opt || {}
+  parser.tagCase = parser.opt.lowercasetags ? "toLowerCase" : "toUpperCase"
+  parser.tags = []
+  parser.closed = parser.closedRoot = parser.sawRoot = false
+  parser.tag = parser.error = null
+  parser.strict = !!strict
+  parser.noscript = !!(strict || parser.opt.noscript)
+  parser.state = S.BEGIN
+  parser.ENTITIES = Object.create(sax.ENTITIES)
+  parser.attribList = []
+
+  // namespaces form a prototype chain.
+  // it always points at the current tag,
+  // which protos to its parent tag.
+  if (parser.opt.xmlns) parser.ns = Object.create(rootNS)
+
+  // mostly just for error reporting
+  parser.position = parser.line = parser.column = 0
+  emit(parser, "onready")
+}
+
+if (!Object.create) Object.create = function (o) {
+  function f () { this.__proto__ = o }
+  f.prototype = o
+  return new f
+}
+
+if (!Object.getPrototypeOf) Object.getPrototypeOf = function (o) {
+  return o.__proto__
+}
+
+if (!Object.keys) Object.keys = function (o) {
+  var a = []
+  for (var i in o) if (o.hasOwnProperty(i)) a.push(i)
+  return a
+}
+
+function checkBufferLength (parser) {
+  var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10)
+    , maxActual = 0
+  for (var i = 0, l = buffers.length; i < l; i ++) {
+    var len = parser[buffers[i]].length
+    if (len > maxAllowed) {
+      // Text/cdata nodes can get big, and since they're buffered,
+      // we can get here under normal conditions.
+      // Avoid issues by emitting the text node now,
+      // so at least it won't get any bigger.
+      switch (buffers[i]) {
+        case "textNode":
+          closeText(parser)
+        break
+
+        case "cdata":
+          emitNode(parser, "oncdata", parser.cdata)
+          parser.cdata = ""
+        break
+
+        case "script":
+          emitNode(parser, "onscript", parser.script)
+          parser.script = ""
+        break
+
+        default:
+          error(parser, "Max buffer length exceeded: "+buffers[i])
+      }
+    }
+    maxActual = Math.max(maxActual, len)
+  }
+  // schedule the next check for the earliest possible buffer overrun.
+  parser.bufferCheckPosition = (sax.MAX_BUFFER_LENGTH - maxActual)
+                             + parser.position
+}
+
+function clearBuffers (parser) {
+  for (var i = 0, l = buffers.length; i < l; i ++) {
+    parser[buffers[i]] = ""
+  }
+}
+
+SAXParser.prototype =
+  { end: function () { end(this) }
+  , write: write
+  , resume: function () { this.error = null; return this }
+  , close: function () { return this.write(null) }
+  , end: function () { return this.write(null) }
+  }
+
+try {
+  var Stream = require("stream").Stream
+} catch (ex) {
+  var Stream = function () {}
+}
+
+
+var streamWraps = sax.EVENTS.filter(function (ev) {
+  return ev !== "error" && ev !== "end"
+})
+
+function createStream (strict, opt) {
+  return new SAXStream(strict, opt)
+}
+
+function SAXStream (strict, opt) {
+  if (!(this instanceof SAXStream)) return new SAXStream(strict, opt)
+
+  Stream.apply(me)
+
+  this._parser = new SAXParser(strict, opt)
+  this.writable = true
+  this.readable = true
+
+
+  var me = this
+
+  this._parser.onend = function () {
+    me.emit("end")
+  }
+
+  this._parser.onerror = function (er) {
+    me.emit("error", er)
+
+    // if didn't throw, then means error was handled.
+    // go ahead and clear error, so we can write again.
+    me._parser.error = null
+  }
+
+  streamWraps.forEach(function (ev) {
+    Object.defineProperty(me, "on" + ev, {
+      get: function () { return me._parser["on" + ev] },
+      set: function (h) {
+        if (!h) {
+          me.removeAllListeners(ev)
+          return me._parser["on"+ev] = h
+        }
+        me.on(ev, h)
+      },
+      enumerable: true,
+      configurable: false
+    })
+  })
+}
+
+SAXStream.prototype = Object.create(Stream.prototype,
+  { constructor: { value: SAXStream } })
+
+SAXStream.prototype.write = function (data) {
+  this._parser.write(data.toString())
+  this.emit("data", data)
+  return true
+}
+
+SAXStream.prototype.end = function (chunk) {
+  if (chunk && chunk.length) this._parser.write(chunk.toString())
+  this._parser.end()
+  return true
+}
+
+SAXStream.prototype.on = function (ev, handler) {
+  var me = this
+  if (!me._parser["on"+ev] && streamWraps.indexOf(ev) !== -1) {
+    me._parser["on"+ev] = function () {
+      var args = arguments.length === 1 ? [arguments[0]]
+               : Array.apply(null, arguments)
+      args.splice(0, 0, ev)
+      me.emit.apply(me, args)
+    }
+  }
+
+  return Stream.prototype.on.call(me, ev, handler)
+}
+
+
+
+// character classes and tokens
+var whitespace = "\r\n\t "
+  // this really needs to be replaced with character classes.
+  // XML allows all manner of ridiculous numbers and digits.
+  , number = "0124356789"
+  , letter = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+  // (Letter | "_" | ":")
+  , nameStart = letter+"_:"
+  , nameBody = nameStart+number+"-."
+  , quote = "'\""
+  , entity = number+letter+"#"
+  , attribEnd = whitespace + ">"
+  , CDATA = "[CDATA["
+  , DOCTYPE = "DOCTYPE"
+  , XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace"
+  , XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/"
+  , rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }
+
+// turn all the string character sets into character class objects.
+whitespace = charClass(whitespace)
+number = charClass(number)
+letter = charClass(letter)
+nameStart = charClass(nameStart)
+nameBody = charClass(nameBody)
+quote = charClass(quote)
+entity = charClass(entity)
+attribEnd = charClass(attribEnd)
+
+function charClass (str) {
+  return str.split("").reduce(function (s, c) {
+    s[c] = true
+    return s
+  }, {})
+}
+
+function is (charclass, c) {
+  return charclass[c]
+}
+
+function not (charclass, c) {
+  return !charclass[c]
+}
+
+var S = 0
+sax.STATE =
+{ BEGIN                     : S++
+, TEXT                      : S++ // general stuff
+, TEXT_ENTITY               : S++ // &amp and such.
+, OPEN_WAKA                 : S++ // <
+, SGML_DECL                 : S++ // <!BLARG
+, SGML_DECL_QUOTED          : S++ // <!BLARG foo "bar
+, DOCTYPE                   : S++ // <!DOCTYPE
+, DOCTYPE_QUOTED            : S++ // <!DOCTYPE "//blah
+, DOCTYPE_DTD               : S++ // <!DOCTYPE "//blah" [ ...
+, DOCTYPE_DTD_QUOTED        : S++ // <!DOCTYPE "//blah" [ "foo
+, COMMENT_STARTING          : S++ // <!-
+, COMMENT                   : S++ // <!--
+, COMMENT_ENDING            : S++ // <!-- blah -
+, COMMENT_ENDED             : S++ // <!-- blah --
+, CDATA                     : S++ // <![CDATA[ something
+, CDATA_ENDING              : S++ // ]
+, CDATA_ENDING_2            : S++ // ]]
+, PROC_INST                 : S++ // <?hi
+, PROC_INST_BODY            : S++ // <?hi there
+, PROC_INST_QUOTED          : S++ // <?hi "there
+, PROC_INST_ENDING          : S++ // <?hi "there" ?
+, OPEN_TAG                  : S++ // <strong
+, OPEN_TAG_SLASH            : S++ // <strong /
+, ATTRIB                    : S++ // <a
+, ATTRIB_NAME               : S++ // <a foo
+, ATTRIB_NAME_SAW_WHITE     : S++ // <a foo _
+, ATTRIB_VALUE              : S++ // <a foo=
+, ATTRIB_VALUE_QUOTED       : S++ // <a foo="bar
+, ATTRIB_VALUE_UNQUOTED     : S++ // <a foo=bar
+, ATTRIB_VALUE_ENTITY_Q     : S++ // <foo bar="&quot;"
+, ATTRIB_VALUE_ENTITY_U     : S++ // <foo bar=&quot;
+, CLOSE_TAG                 : S++ // </a
+, CLOSE_TAG_SAW_WHITE       : S++ // </a   >
+, SCRIPT                    : S++ // <script> ...
+, SCRIPT_ENDING             : S++ // <script> ... <
+}
+
+sax.ENTITIES =
+{ "apos" : "'"
+, "quot" : "\""
+, "amp"  : "&"
+, "gt"   : ">"
+, "lt"   : "<"
+}
+
+for (var S in sax.STATE) sax.STATE[sax.STATE[S]] = S
+
+// shorthand
+S = sax.STATE
+
+function emit (parser, event, data) {
+  parser[event] && parser[event](data)
+}
+
+function emitNode (parser, nodeType, data) {
+  if (parser.textNode) closeText(parser)
+  emit(parser, nodeType, data)
+}
+
+function closeText (parser) {
+  parser.textNode = textopts(parser.opt, parser.textNode)
+  if (parser.textNode) emit(parser, "ontext", parser.textNode)
+  parser.textNode = ""
+}
+
+function textopts (opt, text) {
+  if (opt.trim) text = text.trim()
+  if (opt.normalize) text = text.replace(/\s+/g, " ")
+  return text
+}
+
+function error (parser, er) {
+  closeText(parser)
+  er += "\nLine: "+parser.line+
+        "\nColumn: "+parser.column+
+        "\nChar: "+parser.c
+  er = new Error(er)
+  parser.error = er
+  emit(parser, "onerror", er)
+  return parser
+}
+
+function end (parser) {
+  if (parser.state !== S.TEXT) error(parser, "Unexpected end")
+  closeText(parser)
+  parser.c = ""
+  parser.closed = true
+  emit(parser, "onend")
+  SAXParser.call(parser, parser.strict, parser.opt)
+  return parser
+}
+
+function strictFail (parser, message) {
+  if (parser.strict) error(parser, message)
+}
+
+function newTag (parser) {
+  if (!parser.strict) parser.tagName = parser.tagName[parser.tagCase]()
+  var parent = parser.tags[parser.tags.length - 1] || parser
+    , tag = parser.tag = { name : parser.tagName, attributes : {} }
+
+  // will be overridden if tag contails an xmlns="foo" or xmlns:foo="bar"
+  if (parser.opt.xmlns) tag.ns = parent.ns
+  parser.attribList.length = 0
+}
+
+function qname (name) {
+  var i = name.indexOf(":")
+    , qualName = i < 0 ? [ "", name ] : name.split(":")
+    , prefix = qualName[0]
+    , local = qualName[1]
+
+  // <x "xmlns"="http://foo">
+  if (name === "xmlns") {
+    prefix = "xmlns"
+    local = ""
+  }
+
+  return { prefix: prefix, local: local }
+}
+
+function attrib (parser) {
+  if (parser.opt.xmlns) {
+    var qn = qname(parser.attribName)
+      , prefix = qn.prefix
+      , local = qn.local
+
+    if (prefix === "xmlns") {
+      // namespace binding attribute; push the binding into scope
+      if (local === "xml" && parser.attribValue !== XML_NAMESPACE) {
+        strictFail( parser
+                  , "xml: prefix must be bound to " + XML_NAMESPACE + "\n"
+                  + "Actual: " + parser.attribValue )
+      } else if (local === "xmlns" && parser.attribValue !== XMLNS_NAMESPACE) {
+        strictFail( parser
+                  , "xmlns: prefix must be bound to " + XMLNS_NAMESPACE + "\n"
+                  + "Actual: " + parser.attribValue )
+      } else {
+        var tag = parser.tag
+          , parent = parser.tags[parser.tags.length - 1] || parser
+        if (tag.ns === parent.ns) {
+          tag.ns = Object.create(parent.ns)
+        }
+        tag.ns[local] = parser.attribValue
+      }
+    }
+
+    // defer onattribute events until all attributes have been seen
+    // so any new bindings can take effect; preserve attribute order
+    // so deferred events can be emitted in document order
+    parser.attribList.push([parser.attribName, parser.attribValue])
+  } else {
+    // in non-xmlns mode, we can emit the event right away
+    parser.tag.attributes[parser.attribName] = parser.attribValue
+    emitNode( parser
+            , "onattribute"
+            , { name: parser.attribName
+              , value: parser.attribValue } )
+  }
+
+  parser.attribName = parser.attribValue = ""
+}
+
+function openTag (parser, selfClosing) {
+  if (parser.opt.xmlns) {
+    // emit namespace binding events
+    var tag = parser.tag
+
+    // add namespace info to tag
+    var qn = qname(parser.tagName)
+    tag.prefix = qn.prefix
+    tag.local = qn.local
+    tag.uri = tag.ns[qn.prefix] || qn.prefix
+
+    if (tag.prefix && !tag.uri) {
+      strictFail(parser, "Unbound namespace prefix: "
+                       + JSON.stringify(parser.tagName))
+    }
+
+    var parent = parser.tags[parser.tags.length - 1] || parser
+    if (tag.ns && parent.ns !== tag.ns) {
+      Object.keys(tag.ns).forEach(function (p) {
+        emitNode( parser
+                , "onopennamespace"
+                , { prefix: p , uri: tag.ns[p] } )
+      })
+    }
+
+    // handle deferred onattribute events
+    for (var i = 0, l = parser.attribList.length; i < l; i ++) {
+      var nv = parser.attribList[i]
+      var name = nv[0]
+        , value = nv[1]
+        , qualName = qname(name)
+        , prefix = qualName.prefix
+        , local = qualName.local
+        , uri = tag.ns[prefix] || ""
+        , a = { name: name
+              , value: value
+              , prefix: prefix
+              , local: local
+              , uri: uri
+              }
+
+      // if there's any attributes with an undefined namespace,
+      // then fail on them now.
+      if (prefix && prefix != "xmlns" && !uri) {
+        strictFail(parser, "Unbound namespace prefix: "
+                         + JSON.stringify(prefix))
+        a.uri = prefix
+      }
+      parser.tag.attributes[name] = a
+      emitNode(parser, "onattribute", a)
+    }
+    parser.attribList.length = 0
+  }
+
+  // process the tag
+  parser.sawRoot = true
+  parser.tags.push(parser.tag)
+  emitNode(parser, "onopentag", parser.tag)
+  if (!selfClosing) {
+    // special case for <script> in non-strict mode.
+    if (!parser.noscript && parser.tagName.toLowerCase() === "script") {
+      parser.state = S.SCRIPT
+    } else {
+      parser.state = S.TEXT
+    }
+    parser.tag = null
+    parser.tagName = ""
+  }
+  parser.attribName = parser.attribValue = ""
+  parser.attribList.length = 0
+}
+
+function closeTag (parser) {
+  if (!parser.tagName) {
+    strictFail(parser, "Weird empty close tag.")
+    parser.textNode += "</>"
+    parser.state = S.TEXT
+    return
+  }
+  // first make sure that the closing tag actually exists.
+  // <a><b></c></b></a> will close everything, otherwise.
+  var t = parser.tags.length
+  var tagName = parser.tagName
+  if (!parser.strict) tagName = tagName[parser.tagCase]()
+  var closeTo = tagName
+  while (t --) {
+    var close = parser.tags[t]
+    if (close.name !== closeTo) {
+      // fail the first time in strict mode
+      strictFail(parser, "Unexpected close tag")
+    } else break
+  }
+
+  // didn't find it.  we already failed for strict, so just abort.
+  if (t < 0) {
+    strictFail(parser, "Unmatched closing tag: "+parser.tagName)
+    parser.textNode += "</" + parser.tagName + ">"
+    parser.state = S.TEXT
+    return
+  }
+  parser.tagName = tagName
+  var s = parser.tags.length
+  while (s --> t) {
+    var tag = parser.tag = parser.tags.pop()
+    parser.tagName = parser.tag.name
+    emitNode(parser, "onclosetag", parser.tagName)
+
+    var x = {}
+    for (var i in tag.ns) x[i] = tag.ns[i]
+
+    var parent = parser.tags[parser.tags.length - 1] || parser
+    if (parser.opt.xmlns && tag.ns !== parent.ns) {
+      // remove namespace bindings introduced by tag
+      Object.keys(tag.ns).forEach(function (p) {
+        var n = tag.ns[p]
+        emitNode(parser, "onclosenamespace", { prefix: p, uri: n })
+      })
+    }
+  }
+  if (t === 0) parser.closedRoot = true
+  parser.tagName = parser.attribValue = parser.attribName = ""
+  parser.attribList.length = 0
+  parser.state = S.TEXT
+}
+
+function parseEntity (parser) {
+  var entity = parser.entity.toLowerCase()
+    , num
+    , numStr = ""
+  if (parser.ENTITIES[entity]) return parser.ENTITIES[entity]
+  if (entity.charAt(0) === "#") {
+    if (entity.charAt(1) === "x") {
+      entity = entity.slice(2)
+      num = parseInt(entity, 16)
+      numStr = num.toString(16)
+    } else {
+      entity = entity.slice(1)
+      num = parseInt(entity, 10)
+      numStr = num.toString(10)
+    }
+  }
+  entity = entity.replace(/^0+/, "")
+  if (numStr.toLowerCase() !== entity) {
+    strictFail(parser, "Invalid character entity")
+    return "&"+parser.entity + ";"
+  }
+  return String.fromCharCode(num)
+}
+
+function write (chunk) {
+  var parser = this
+  if (this.error) throw this.error
+  if (parser.closed) return error(parser,
+    "Cannot write after close. Assign an onready handler.")
+  if (chunk === null) return end(parser)
+  var i = 0, c = ""
+  while (parser.c = c = chunk.charAt(i++)) {
+    parser.position ++
+    if (c === "\n") {
+      parser.line ++
+      parser.column = 0
+    } else parser.column ++
+    switch (parser.state) {
+
+      case S.BEGIN:
+        if (c === "<") parser.state = S.OPEN_WAKA
+        else if (not(whitespace,c)) {
+          // have to process this as a text node.
+          // weird, but happens.
+          strictFail(parser, "Non-whitespace before first tag.")
+          parser.textNode = c
+          parser.state = S.TEXT
+        }
+      continue
+
+      case S.TEXT:
+        if (parser.sawRoot && !parser.closedRoot) {
+          var starti = i-1
+          while (c && c!=="<" && c!=="&") {
+            c = chunk.charAt(i++)
+            if (c) {
+              parser.position ++
+              if (c === "\n") {
+                parser.line ++
+                parser.column = 0
+              } else parser.column ++
+            }
+          }
+          parser.textNode += chunk.substring(starti, i-1)
+        }
+        if (c === "<") parser.state = S.OPEN_WAKA
+        else {
+          if (not(whitespace, c) && (!parser.sawRoot || parser.closedRoot))
+            strictFail("Text data outside of root node.")
+          if (c === "&") parser.state = S.TEXT_ENTITY
+          else parser.textNode += c
+        }
+      continue
+
+      case S.SCRIPT:
+        // only non-strict
+        if (c === "<") {
+          parser.state = S.SCRIPT_ENDING
+        } else parser.script += c
+      continue
+
+      case S.SCRIPT_ENDING:
+        if (c === "/") {
+          emitNode(parser, "onscript", parser.script)
+          parser.state = S.CLOSE_TAG
+          parser.script = ""
+          parser.tagName = ""
+        } else {
+          parser.script += "<" + c
+          parser.state = S.SCRIPT
+        }
+      continue
+
+      case S.OPEN_WAKA:
+        // either a /, ?, !, or text is coming next.
+        if (c === "!") {
+          parser.state = S.SGML_DECL
+          parser.sgmlDecl = ""
+        } else if (is(whitespace, c)) {
+          // wait for it...
+        } else if (is(nameStart,c)) {
+          parser.startTagPosition = parser.position - 1
+          parser.state = S.OPEN_TAG
+          parser.tagName = c
+        } else if (c === "/") {
+          parser.startTagPosition = parser.position - 1
+          parser.state = S.CLOSE_TAG
+          parser.tagName = ""
+        } else if (c === "?") {
+          parser.state = S.PROC_INST
+          parser.procInstName = parser.procInstBody = ""
+        } else {
+          strictFail(parser, "Unencoded <")
+          parser.textNode += "<" + c
+          parser.state = S.TEXT
+        }
+      continue
+
+      case S.SGML_DECL:
+        if ((parser.sgmlDecl+c).toUpperCase() === CDATA) {
+          emitNode(parser, "onopencdata")
+          parser.state = S.CDATA
+          parser.sgmlDecl = ""
+          parser.cdata = ""
+        } else if (parser.sgmlDecl+c === "--") {
+          parser.state = S.COMMENT
+          parser.comment = ""
+          parser.sgmlDecl = ""
+        } else if ((parser.sgmlDecl+c).toUpperCase() === DOCTYPE) {
+          parser.state = S.DOCTYPE
+          if (parser.doctype || parser.sawRoot) strictFail(parser,
+            "Inappropriately located doctype declaration")
+          parser.doctype = ""
+          parser.sgmlDecl = ""
+        } else if (c === ">") {
+          emitNode(parser, "onsgmldeclaration", parser.sgmlDecl)
+          parser.sgmlDecl = ""
+          parser.state = S.TEXT
+        } else if (is(quote, c)) {
+          parser.state = S.SGML_DECL_QUOTED
+          parser.sgmlDecl += c
+        } else parser.sgmlDecl += c
+      continue
+
+      case S.SGML_DECL_QUOTED:
+        if (c === parser.q) {
+          parser.state = S.SGML_DECL
+          parser.q = ""
+        }
+        parser.sgmlDecl += c
+      continue
+
+      case S.DOCTYPE:
+        if (c === ">") {
+          parser.state = S.TEXT
+          emitNode(parser, "ondoctype", parser.doctype)
+          parser.doctype = true // just remember that we saw it.
+        } else {
+          parser.doctype += c
+          if (c === "[") parser.state = S.DOCTYPE_DTD
+          else if (is(quote, c)) {
+            parser.state = S.DOCTYPE_QUOTED
+            parser.q = c
+          }
+        }
+      continue
+
+      case S.DOCTYPE_QUOTED:
+        parser.doctype += c
+        if (c === parser.q) {
+          parser.q = ""
+          parser.state = S.DOCTYPE
+        }
+      continue
+
+      case S.DOCTYPE_DTD:
+        parser.doctype += c
+        if (c === "]") parser.state = S.DOCTYPE
+        else if (is(quote,c)) {
+          parser.state = S.DOCTYPE_DTD_QUOTED
+          parser.q = c
+        }
+      continue
+
+      case S.DOCTYPE_DTD_QUOTED:
+        parser.doctype += c
+        if (c === parser.q) {
+          parser.state = S.DOCTYPE_DTD
+          parser.q = ""
+        }
+      continue
+
+      case S.COMMENT:
+        if (c === "-") parser.state = S.COMMENT_ENDING
+        else parser.comment += c
+      continue
+
+      case S.COMMENT_ENDING:
+        if (c === "-") {
+          parser.state = S.COMMENT_ENDED
+          parser.comment = textopts(parser.opt, parser.comment)
+          if (parser.comment) emitNode(parser, "oncomment", parser.comment)
+          parser.comment = ""
+        } else {
+          parser.comment += "-" + c
+          parser.state = S.COMMENT
+        }
+      continue
+
+      case S.COMMENT_ENDED:
+        if (c !== ">") {
+          strictFail(parser, "Malformed comment")
+          // allow <!-- blah -- bloo --> in non-strict mode,
+          // which is a comment of " blah -- bloo "
+          parser.comment += "--" + c
+          parser.state = S.COMMENT
+        } else parser.state = S.TEXT
+      continue
+
+      case S.CDATA:
+        if (c === "]") parser.state = S.CDATA_ENDING
+        else parser.cdata += c
+      continue
+
+      case S.CDATA_ENDING:
+        if (c === "]") parser.state = S.CDATA_ENDING_2
+        else {
+          parser.cdata += "]" + c
+          parser.state = S.CDATA
+        }
+      continue
+
+      case S.CDATA_ENDING_2:
+        if (c === ">") {
+          if (parser.cdata) emitNode(parser, "oncdata", parser.cdata)
+          emitNode(parser, "onclosecdata")
+          parser.cdata = ""
+          parser.state = S.TEXT
+        } else if (c === "]") {
+          parser.cdata += "]"
+        } else {
+          parser.cdata += "]]" + c
+          parser.state = S.CDATA
+        }
+      continue
+
+      case S.PROC_INST:
+        if (c === "?") parser.state = S.PROC_INST_ENDING
+        else if (is(whitespace, c)) parser.state = S.PROC_INST_BODY
+        else parser.procInstName += c
+      continue
+
+      case S.PROC_INST_BODY:
+        if (!parser.procInstBody && is(whitespace, c)) continue
+        else if (c === "?") parser.state = S.PROC_INST_ENDING
+        else if (is(quote, c)) {
+          parser.state = S.PROC_INST_QUOTED
+          parser.q = c
+          parser.procInstBody += c
+        } else parser.procInstBody += c
+      continue
+
+      case S.PROC_INST_ENDING:
+        if (c === ">") {
+          emitNode(parser, "onprocessinginstruction", {
+            name : parser.procInstName,
+            body : parser.procInstBody
+          })
+          parser.procInstName = parser.procInstBody = ""
+          parser.state = S.TEXT
+        } else {
+          parser.procInstBody += "?" + c
+          parser.state = S.PROC_INST_BODY
+        }
+      continue
+
+      case S.PROC_INST_QUOTED:
+        parser.procInstBody += c
+        if (c === parser.q) {
+          parser.state = S.PROC_INST_BODY
+          parser.q = ""
+        }
+      continue
+
+      case S.OPEN_TAG:
+        if (is(nameBody, c)) parser.tagName += c
+        else {
+          newTag(parser)
+          if (c === ">") openTag(parser)
+          else if (c === "/") parser.state = S.OPEN_TAG_SLASH
+          else {
+            if (not(whitespace, c)) strictFail(
+              parser, "Invalid character in tag name")
+            parser.state = S.ATTRIB
+          }
+        }
+      continue
+
+      case S.OPEN_TAG_SLASH:
+        if (c === ">") {
+          openTag(parser, true)
+          closeTag(parser)
+        } else {
+          strictFail(parser, "Forward-slash in opening tag not followed by >")
+          parser.state = S.ATTRIB
+        }
+      continue
+
+      case S.ATTRIB:
+        // haven't read the attribute name yet.
+        if (is(whitespace, c)) continue
+        else if (c === ">") openTag(parser)
+        else if (c === "/") parser.state = S.OPEN_TAG_SLASH
+        else if (is(nameStart, c)) {
+          parser.attribName = c
+          parser.attribValue = ""
+          parser.state = S.ATTRIB_NAME
+        } else strictFail(parser, "Invalid attribute name")
+      continue
+
+      case S.ATTRIB_NAME:
+        if (c === "=") parser.state = S.ATTRIB_VALUE
+        else if (is(whitespace, c)) parser.state = S.ATTRIB_NAME_SAW_WHITE
+        else if (is(nameBody, c)) parser.attribName += c
+        else strictFail(parser, "Invalid attribute name")
+      continue
+
+      case S.ATTRIB_NAME_SAW_WHITE:
+        if (c === "=") parser.state = S.ATTRIB_VALUE
+        else if (is(whitespace, c)) continue
+        else {
+          strictFail(parser, "Attribute without value")
+          parser.tag.attributes[parser.attribName] = ""
+          parser.attribValue = ""
+          emitNode(parser, "onattribute",
+                   { name : parser.attribName, value : "" })
+          parser.attribName = ""
+          if (c === ">") openTag(parser)
+          else if (is(nameStart, c)) {
+            parser.attribName = c
+            parser.state = S.ATTRIB_NAME
+          } else {
+            strictFail(parser, "Invalid attribute name")
+            parser.state = S.ATTRIB
+          }
+        }
+      continue
+
+      case S.ATTRIB_VALUE:
+        if (is(whitespace, c)) continue
+        else if (is(quote, c)) {
+          parser.q = c
+          parser.state = S.ATTRIB_VALUE_QUOTED
+        } else {
+          strictFail(parser, "Unquoted attribute value")
+          parser.state = S.ATTRIB_VALUE_UNQUOTED
+          parser.attribValue = c
+        }
+      continue
+
+      case S.ATTRIB_VALUE_QUOTED:
+        if (c !== parser.q) {
+          if (c === "&") parser.state = S.ATTRIB_VALUE_ENTITY_Q
+          else parser.attribValue += c
+          continue
+        }
+        attrib(parser)
+        parser.q = ""
+        parser.state = S.ATTRIB
+      continue
+
+      case S.ATTRIB_VALUE_UNQUOTED:
+        if (not(attribEnd,c)) {
+          if (c === "&") parser.state = S.ATTRIB_VALUE_ENTITY_U
+          else parser.attribValue += c
+          continue
+        }
+        attrib(parser)
+        if (c === ">") openTag(parser)
+        else parser.state = S.ATTRIB
+      continue
+
+      case S.CLOSE_TAG:
+        if (!parser.tagName) {
+          if (is(whitespace, c)) continue
+          else if (not(nameStart, c)) strictFail(parser,
+            "Invalid tagname in closing tag.")
+          else parser.tagName = c
+        }
+        else if (c === ">") closeTag(parser)
+        else if (is(nameBody, c)) parser.tagName += c
+        else {
+          if (not(whitespace, c)) strictFail(parser,
+            "Invalid tagname in closing tag")
+          parser.state = S.CLOSE_TAG_SAW_WHITE
+        }
+      continue
+
+      case S.CLOSE_TAG_SAW_WHITE:
+        if (is(whitespace, c)) continue
+        if (c === ">") closeTag(parser)
+        else strictFail("Invalid characters in closing tag")
+      continue
+
+      case S.TEXT_ENTITY:
+      case S.ATTRIB_VALUE_ENTITY_Q:
+      case S.ATTRIB_VALUE_ENTITY_U:
+        switch(parser.state) {
+          case S.TEXT_ENTITY:
+            var returnState = S.TEXT, buffer = "textNode"
+          break
+
+          case S.ATTRIB_VALUE_ENTITY_Q:
+            var returnState = S.ATTRIB_VALUE_QUOTED, buffer = "attribValue"
+          break
+
+          case S.ATTRIB_VALUE_ENTITY_U:
+            var returnState = S.ATTRIB_VALUE_UNQUOTED, buffer = "attribValue"
+          break
+        }
+        if (c === ";") {
+          parser[buffer] += parseEntity(parser)
+          parser.entity = ""
+          parser.state = returnState
+        }
+        else if (is(entity, c)) parser.entity += c
+        else {
+          strictFail("Invalid character entity")
+          parser[buffer] += "&" + parser.entity + c
+          parser.entity = ""
+          parser.state = returnState
+        }
+      continue
+
+      default:
+        throw new Error(parser, "Unknown state: " + parser.state)
+    }
+  } // while
+  // cdata blocks can get very big under normal conditions. emit and move on.
+  // if (parser.state === S.CDATA && parser.cdata) {
+  //   emitNode(parser, "oncdata", parser.cdata)
+  //   parser.cdata = ""
+  // }
+  if (parser.position >= parser.bufferCheckPosition) checkBufferLength(parser)
+  return parser
+}
+
+})(typeof exports === "undefined" ? sax = {} : exports)
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/package.json b/config/tizen/tpk-tools/cli/node_modules/sax/package.json
new file mode 100644 (file)
index 0000000..a762621
--- /dev/null
@@ -0,0 +1,122 @@
+{
+  "_args": [
+    [
+      {
+        "raw": "sax@0.3.5",
+        "scope": null,
+        "escapedName": "sax",
+        "name": "sax",
+        "rawSpec": "0.3.5",
+        "spec": "0.3.5",
+        "type": "version"
+      },
+      "/home/sumin/iotjs-tpk/cli/node_modules/elementtree"
+    ]
+  ],
+  "_defaultsLoaded": true,
+  "_engineSupported": true,
+  "_from": "sax@0.3.5",
+  "_id": "sax@0.3.5",
+  "_inCache": true,
+  "_location": "/sax",
+  "_nodeVersion": "v0.6.7-pre",
+  "_npmUser": {
+    "name": "isaacs",
+    "email": "i@izs.me"
+  },
+  "_npmVersion": "1.1.0-beta-7",
+  "_phantomChildren": {},
+  "_requested": {
+    "raw": "sax@0.3.5",
+    "scope": null,
+    "escapedName": "sax",
+    "name": "sax",
+    "rawSpec": "0.3.5",
+    "spec": "0.3.5",
+    "type": "version"
+  },
+  "_requiredBy": [
+    "/elementtree"
+  ],
+  "_resolved": "https://registry.npmjs.org/sax/-/sax-0.3.5.tgz",
+  "_shasum": "88fcfc1f73c0c8bbd5b7c776b6d3f3501eed073d",
+  "_shrinkwrap": null,
+  "_spec": "sax@0.3.5",
+  "_where": "/home/sumin/iotjs-tpk/cli/node_modules/elementtree",
+  "author": {
+    "name": "Isaac Z. Schlueter",
+    "email": "i@izs.me",
+    "url": "http://blog.izs.me/"
+  },
+  "bugs": {
+    "url": "https://github.com/isaacs/sax-js/issues"
+  },
+  "contributors": [
+    {
+      "name": "Isaac Z. Schlueter",
+      "email": "i@izs.me"
+    },
+    {
+      "name": "Stein Martin Hustad",
+      "email": "stein@hustad.com"
+    },
+    {
+      "name": "Mikeal Rogers",
+      "email": "mikeal.rogers@gmail.com"
+    },
+    {
+      "name": "Laurie Harper",
+      "email": "laurie@holoweb.net"
+    },
+    {
+      "name": "Jann Horn",
+      "email": "jann@Jann-PC.fritz.box"
+    },
+    {
+      "name": "Elijah Insua",
+      "email": "tmpvar@gmail.com"
+    },
+    {
+      "name": "Henry Rawas",
+      "email": "henryr@schakra.com"
+    },
+    {
+      "name": "Justin Makeig",
+      "email": "jmpublic@makeig.com"
+    }
+  ],
+  "dependencies": {},
+  "description": "An evented streaming XML parser in JavaScript",
+  "devDependencies": {},
+  "directories": {},
+  "dist": {
+    "shasum": "88fcfc1f73c0c8bbd5b7c776b6d3f3501eed073d",
+    "tarball": "https://registry.npmjs.org/sax/-/sax-0.3.5.tgz"
+  },
+  "engines": {
+    "node": "*"
+  },
+  "homepage": "https://github.com/isaacs/sax-js#readme",
+  "license": {
+    "type": "MIT",
+    "url": "https://raw.github.com/isaacs/sax-js/master/LICENSE"
+  },
+  "main": "lib/sax.js",
+  "maintainers": [
+    {
+      "name": "isaacs",
+      "email": "i@izs.me"
+    }
+  ],
+  "name": "sax",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/isaacs/sax-js.git"
+  },
+  "scripts": {
+    "test": "node test/index.js"
+  },
+  "version": "0.3.5"
+}
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/buffer-overrun.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/buffer-overrun.js
new file mode 100644 (file)
index 0000000..8d12fac
--- /dev/null
@@ -0,0 +1,25 @@
+// set this really low so that I don't have to put 64 MB of xml in here.
+var sax = require("../lib/sax")
+var bl = sax.MAX_BUFFER_LENGTH
+sax.MAX_BUFFER_LENGTH = 5;
+
+require(__dirname).test({
+  expect : [
+    ["error", "Max buffer length exceeded: tagName\nLine: 0\nColumn: 15\nChar: "],
+    ["error", "Max buffer length exceeded: tagName\nLine: 0\nColumn: 30\nChar: "],
+    ["error", "Max buffer length exceeded: tagName\nLine: 0\nColumn: 45\nChar: "],
+    ["opentag", {
+     "name": "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ",
+     "attributes": {}
+    }],
+    ["text", "yo"],
+    ["closetag", "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"]
+  ]
+}).write("<abcdefghijklmn")
+  .write("opqrstuvwxyzABC")
+  .write("DEFGHIJKLMNOPQR")
+  .write("STUVWXYZ>")
+  .write("yo")
+  .write("</abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ>")
+  .close();
+sax.MAX_BUFFER_LENGTH = bl
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/cdata-chunked.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/cdata-chunked.js
new file mode 100644 (file)
index 0000000..ccd5ee6
--- /dev/null
@@ -0,0 +1,11 @@
+
+require(__dirname).test({
+  expect : [
+    ["opentag", {"name": "R","attributes": {}}],
+    ["opencdata", undefined],
+    ["cdata", " this is character data  "],
+    ["closecdata", undefined],
+    ["closetag", "R"]
+  ]
+}).write("<r><![CDATA[ this is ").write("character data  ").write("]]></r>").close();
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/cdata-end-split.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/cdata-end-split.js
new file mode 100644 (file)
index 0000000..b41bd00
--- /dev/null
@@ -0,0 +1,15 @@
+
+require(__dirname).test({
+  expect : [
+    ["opentag", {"name": "R","attributes": {}}],
+    ["opencdata", undefined],
+    ["cdata", " this is "],
+    ["closecdata", undefined],
+    ["closetag", "R"]
+  ]
+})
+  .write("<r><![CDATA[ this is ]")
+  .write("]>")
+  .write("</r>")
+  .close();
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/cdata-fake-end.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/cdata-fake-end.js
new file mode 100644 (file)
index 0000000..07aeac4
--- /dev/null
@@ -0,0 +1,28 @@
+
+var p = require(__dirname).test({
+  expect : [
+    ["opentag", {"name": "R","attributes": {}}],
+    ["opencdata", undefined],
+    ["cdata", "[[[[[[[[]]]]]]]]"],
+    ["closecdata", undefined],
+    ["closetag", "R"]
+  ]
+})
+var x = "<r><![CDATA[[[[[[[[[]]]]]]]]]]></r>"
+for (var i = 0; i < x.length ; i ++) {
+  p.write(x.charAt(i))
+}
+p.close();
+
+
+var p2 = require(__dirname).test({
+  expect : [
+    ["opentag", {"name": "R","attributes": {}}],
+    ["opencdata", undefined],
+    ["cdata", "[[[[[[[[]]]]]]]]"],
+    ["closecdata", undefined],
+    ["closetag", "R"]
+  ]
+})
+var x = "<r><![CDATA[[[[[[[[[]]]]]]]]]]></r>"
+p2.write(x).close();
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/cdata-multiple.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/cdata-multiple.js
new file mode 100644 (file)
index 0000000..dab2015
--- /dev/null
@@ -0,0 +1,15 @@
+
+require(__dirname).test({
+  expect : [
+    ["opentag", {"name": "R","attributes": {}}],
+    ["opencdata", undefined],
+    ["cdata", " this is "],
+    ["closecdata", undefined],
+    ["opencdata", undefined],
+    ["cdata", "character data  "],
+    ["closecdata", undefined],
+    ["closetag", "R"]
+  ]
+}).write("<r><![CDATA[ this is ]]>").write("<![CDA").write("T").write("A[")
+  .write("character data  ").write("]]></r>").close();
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/cdata.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/cdata.js
new file mode 100644 (file)
index 0000000..0f09cce
--- /dev/null
@@ -0,0 +1,10 @@
+require(__dirname).test({
+  xml : "<r><![CDATA[ this is character data  ]]></r>",
+  expect : [
+    ["opentag", {"name": "R","attributes": {}}],
+    ["opencdata", undefined],
+    ["cdata", " this is character data  "],
+    ["closecdata", undefined],
+    ["closetag", "R"]
+  ]
+});
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/index.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/index.js
new file mode 100644 (file)
index 0000000..d4e1ef4
--- /dev/null
@@ -0,0 +1,86 @@
+var globalsBefore = JSON.stringify(Object.keys(global))
+  , util = require("util")
+  , assert = require("assert")
+  , fs = require("fs")
+  , path = require("path")
+  , sax = require("../lib/sax")
+
+exports.sax = sax
+
+// handy way to do simple unit tests
+// if the options contains an xml string, it'll be written and the parser closed.
+// otherwise, it's assumed that the test will write and close.
+exports.test = function test (options) {
+  var xml = options.xml
+    , parser = sax.parser(options.strict, options.opt)
+    , expect = options.expect
+    , e = 0
+  sax.EVENTS.forEach(function (ev) {
+    parser["on" + ev] = function (n) {
+      if (process.env.DEBUG) {
+        console.error({ expect: expect[e]
+                      , actual: [ev, n] })
+      }
+      if (e >= expect.length && (ev === "end" || ev === "ready")) return
+      assert.ok( e < expect.length,
+        "expectation #"+e+" "+util.inspect(expect[e])+"\n"+
+        "Unexpected event: "+ev+" "+(n ? util.inspect(n) : ""))
+      var inspected = n instanceof Error ? "\n"+ n.message : util.inspect(n)
+      assert.equal(ev, expect[e][0],
+        "expectation #"+e+"\n"+
+        "Didn't get expected event\n"+
+        "expect: "+expect[e][0] + " " +util.inspect(expect[e][1])+"\n"+
+        "actual: "+ev+" "+inspected+"\n")
+      if (ev === "error") assert.equal(n.message, expect[e][1])
+      else assert.deepEqual(n, expect[e][1],
+        "expectation #"+e+"\n"+
+        "Didn't get expected argument\n"+
+        "expect: "+expect[e][0] + " " +util.inspect(expect[e][1])+"\n"+
+        "actual: "+ev+" "+inspected+"\n")
+      e++
+      if (ev === "error") parser.resume()
+    }
+  })
+  if (xml) parser.write(xml).close()
+  return parser
+}
+
+if (module === require.main) {
+  var running = true
+    , failures = 0
+
+  function fail (file, er) {
+    util.error("Failed: "+file)
+    util.error(er.stack || er.message)
+    failures ++
+  }
+
+  fs.readdir(__dirname, function (error, files) {
+    files = files.filter(function (file) {
+      return (/\.js$/.exec(file) && file !== 'index.js')
+    })
+    var n = files.length
+      , i = 0
+    console.log("0.." + n)
+    files.forEach(function (file) {
+      // run this test.
+      try {
+        require(path.resolve(__dirname, file))
+        var globalsAfter = JSON.stringify(Object.keys(global))
+        if (globalsAfter !== globalsBefore) {
+          var er = new Error("new globals introduced\n"+
+                             "expected: "+globalsBefore+"\n"+
+                             "actual:   "+globalsAfter)
+          globalsBefore = globalsAfter
+          throw er
+        }
+        console.log("ok " + (++i) + " - " + file)
+      } catch (er) {
+        console.log("not ok "+ (++i) + " - " + file)
+        fail(file, er)
+      }
+    })
+    if (!failures) return console.log("#all pass")
+    else return console.error(failures + " failure" + (failures > 1 ? "s" : ""))
+  })
+}
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/issue-23.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/issue-23.js
new file mode 100644 (file)
index 0000000..e7991b2
--- /dev/null
@@ -0,0 +1,43 @@
+
+require(__dirname).test
+  ( { xml :
+      "<compileClassesResponse>"+
+        "<result>"+
+          "<bodyCrc>653724009</bodyCrc>"+
+          "<column>-1</column>"+
+          "<id>01pG0000002KoSUIA0</id>"+
+          "<line>-1</line>"+
+          "<name>CalendarController</name>"+
+          "<success>true</success>"+
+        "</result>"+
+      "</compileClassesResponse>"
+
+    , expect :
+      [ [ "opentag", { name: "COMPILECLASSESRESPONSE", attributes: {} } ]
+      , [ "opentag", { name : "RESULT", attributes: {} } ]
+      , [ "opentag", { name: "BODYCRC", attributes: {} } ]
+      , [ "text", "653724009" ]
+      , [ "closetag", "BODYCRC" ]
+      , [ "opentag", { name: "COLUMN", attributes: {} } ]
+      , [ "text", "-1" ]
+      , [ "closetag", "COLUMN" ]
+      , [ "opentag", { name: "ID", attributes: {} } ]
+      , [ "text", "01pG0000002KoSUIA0" ]
+      , [ "closetag", "ID" ]
+      , [ "opentag", {name: "LINE", attributes: {} } ]
+      , [ "text", "-1" ]
+      , [ "closetag", "LINE" ]
+      , [ "opentag", {name: "NAME", attributes: {} } ]
+      , [ "text", "CalendarController" ]
+      , [ "closetag", "NAME" ]
+      , [ "opentag", {name: "SUCCESS", attributes: {} } ]
+      , [ "text", "true" ]
+      , [ "closetag", "SUCCESS" ]
+      , [ "closetag", "RESULT" ]
+      , [ "closetag", "COMPILECLASSESRESPONSE" ]
+      ]
+    , strict : false
+    , opt : {}
+    }
+  )
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/issue-30.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/issue-30.js
new file mode 100644 (file)
index 0000000..c2cc809
--- /dev/null
@@ -0,0 +1,24 @@
+// https://github.com/isaacs/sax-js/issues/33
+require(__dirname).test
+  ( { xml : "<xml>\n"+
+            "<!-- \n"+
+            "  comment with a single dash- in it\n"+
+            "-->\n"+
+            "<data/>\n"+
+            "</xml>"
+
+    , expect :
+      [ [ "opentag", { name: "xml", attributes: {} } ]
+      , [ "text", "\n" ]
+      , [ "comment", " \n  comment with a single dash- in it\n" ]
+      , [ "text", "\n" ]
+      , [ "opentag", { name: "data", attributes: {} } ]
+      , [ "closetag", "data" ]
+      , [ "text", "\n" ]
+      , [ "closetag", "xml" ]
+      ]
+    , strict : true
+    , opt : {}
+    }
+  )
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/issue-35.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/issue-35.js
new file mode 100644 (file)
index 0000000..7c521c5
--- /dev/null
@@ -0,0 +1,15 @@
+// https://github.com/isaacs/sax-js/issues/35
+require(__dirname).test
+  ( { xml : "<xml>&#Xd;&#X0d;\n"+
+            "</xml>"
+
+    , expect :
+      [ [ "opentag", { name: "xml", attributes: {} } ]
+      , [ "text", "\r\r\n" ]
+      , [ "closetag", "xml" ]
+      ]
+    , strict : true
+    , opt : {}
+    }
+  )
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/issue-47.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/issue-47.js
new file mode 100644 (file)
index 0000000..911c7d0
--- /dev/null
@@ -0,0 +1,13 @@
+// https://github.com/isaacs/sax-js/issues/47
+require(__dirname).test
+  ( { xml : '<a href="query.svc?x=1&y=2&z=3"/>'
+    , expect : [ 
+        [ "attribute", { name:'href', value:"query.svc?x=1&y=2&z=3"} ],
+        [ "opentag", { name: "a", attributes: { href:"query.svc?x=1&y=2&z=3"} } ],
+        [ "closetag", "a" ]
+      ]
+    , strict : true
+    , opt : {}
+    }
+  )
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/issue-49.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/issue-49.js
new file mode 100644 (file)
index 0000000..2964325
--- /dev/null
@@ -0,0 +1,31 @@
+// https://github.com/isaacs/sax-js/issues/49
+require(__dirname).test
+  ( { xml : "<xml><script>hello world</script></xml>"
+    , expect :
+      [ [ "opentag", { name: "xml", attributes: {} } ]
+      , [ "opentag", { name: "script", attributes: {} } ]
+      , [ "text", "hello world" ]
+      , [ "closetag", "script" ]
+      , [ "closetag", "xml" ]
+      ]
+    , strict : false
+    , opt : { lowercasetags: true, noscript: true }
+    }
+  )
+
+require(__dirname).test
+  ( { xml : "<xml><script><![CDATA[hello world]]></script></xml>"
+    , expect :
+      [ [ "opentag", { name: "xml", attributes: {} } ]
+      , [ "opentag", { name: "script", attributes: {} } ]
+      , [ "opencdata", undefined ]
+      , [ "cdata", "hello world" ]
+      , [ "closecdata", undefined ]
+      , [ "closetag", "script" ]
+      , [ "closetag", "xml" ]
+      ]
+    , strict : false
+    , opt : { lowercasetags: true, noscript: true }
+    }
+  )
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/parser-position.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/parser-position.js
new file mode 100644 (file)
index 0000000..e4a68b1
--- /dev/null
@@ -0,0 +1,28 @@
+var sax = require("../lib/sax"),
+    assert = require("assert")
+
+function testPosition(chunks, expectedEvents) {
+  var parser = sax.parser();
+  expectedEvents.forEach(function(expectation) {
+    parser['on' + expectation[0]] = function() {
+      for (var prop in expectation[1]) {
+        assert.equal(parser[prop], expectation[1][prop]);
+      }
+    }
+  });
+  chunks.forEach(function(chunk) {
+    parser.write(chunk);
+  });
+};
+
+testPosition(['<div>abcdefgh</div>'],
+             [ ['opentag',  { position:  5, startTagPosition:  1 }]
+             , ['text',     { position: 19, startTagPosition: 14 }]
+             , ['closetag', { position: 19, startTagPosition: 14 }]
+             ]);
+
+testPosition(['<div>abcde','fgh</div>'],
+             [ ['opentag',  { position:  5, startTagPosition:  1 }]
+             , ['text',     { position: 19, startTagPosition: 14 }]
+             , ['closetag', { position: 19, startTagPosition: 14 }]
+             ]);
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/script.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/script.js
new file mode 100644 (file)
index 0000000..464c051
--- /dev/null
@@ -0,0 +1,12 @@
+require(__dirname).test({
+  xml : "<html><head><script>if (1 < 0) { console.log('elo there'); }</script></head></html>",
+  expect : [
+    ["opentag", {"name": "HTML","attributes": {}}],
+    ["opentag", {"name": "HEAD","attributes": {}}],
+    ["opentag", {"name": "SCRIPT","attributes": {}}],
+    ["script", "if (1 < 0) { console.log('elo there'); }"],
+    ["closetag", "SCRIPT"],
+    ["closetag", "HEAD"],
+    ["closetag", "HTML"]
+  ]
+});
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/self-closing-child-strict.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/self-closing-child-strict.js
new file mode 100644 (file)
index 0000000..ce9c045
--- /dev/null
@@ -0,0 +1,40 @@
+
+require(__dirname).test({
+  xml :
+  "<root>"+
+    "<child>" +
+      "<haha />" +
+    "</child>" +
+    "<monkey>" +
+      "=(|)" +
+    "</monkey>" +
+  "</root>",
+  expect : [
+    ["opentag", {
+     "name": "root",
+     "attributes": {}
+    }],
+    ["opentag", {
+     "name": "child",
+     "attributes": {}
+    }],
+    ["opentag", {
+     "name": "haha",
+     "attributes": {}
+    }],
+    ["closetag", "haha"],
+    ["closetag", "child"],
+    ["opentag", {
+     "name": "monkey",
+     "attributes": {}
+    }],
+    ["text", "=(|)"],
+    ["closetag", "monkey"],
+    ["closetag", "root"],
+    ["end"],
+    ["ready"]
+  ],
+  strict : true,
+  opt : {}
+});
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/self-closing-child.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/self-closing-child.js
new file mode 100644 (file)
index 0000000..bc6b52b
--- /dev/null
@@ -0,0 +1,40 @@
+
+require(__dirname).test({
+  xml :
+  "<root>"+
+    "<child>" +
+      "<haha />" +
+    "</child>" +
+    "<monkey>" +
+      "=(|)" +
+    "</monkey>" +
+  "</root>",
+  expect : [
+    ["opentag", {
+     "name": "ROOT",
+     "attributes": {}
+    }],
+    ["opentag", {
+     "name": "CHILD",
+     "attributes": {}
+    }],
+    ["opentag", {
+     "name": "HAHA",
+     "attributes": {}
+    }],
+    ["closetag", "HAHA"],
+    ["closetag", "CHILD"],
+    ["opentag", {
+     "name": "MONKEY",
+     "attributes": {}
+    }],
+    ["text", "=(|)"],
+    ["closetag", "MONKEY"],
+    ["closetag", "ROOT"],
+    ["end"],
+    ["ready"]
+  ],
+  strict : false,
+  opt : {}
+});
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/self-closing-tag.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/self-closing-tag.js
new file mode 100644 (file)
index 0000000..b2c5736
--- /dev/null
@@ -0,0 +1,25 @@
+
+require(__dirname).test({
+  xml :
+  "<root>   "+
+    "<haha /> "+
+    "<haha/>  "+
+    "<monkey> "+
+      "=(|)     "+
+    "</monkey>"+
+  "</root>  ",
+  expect : [
+    ["opentag", {name:"ROOT", attributes:{}}],
+    ["opentag", {name:"HAHA", attributes:{}}],
+    ["closetag", "HAHA"],
+    ["opentag", {name:"HAHA", attributes:{}}],
+    ["closetag", "HAHA"],
+    // ["opentag", {name:"HAHA", attributes:{}}],
+    // ["closetag", "HAHA"],
+    ["opentag", {name:"MONKEY", attributes:{}}],
+    ["text", "=(|)"],
+    ["closetag", "MONKEY"],
+    ["closetag", "ROOT"]
+  ],
+  opt : { trim : true }
+});
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/stray-ending.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/stray-ending.js
new file mode 100644 (file)
index 0000000..6b0aa7f
--- /dev/null
@@ -0,0 +1,17 @@
+// stray ending tags should just be ignored in non-strict mode.
+// https://github.com/isaacs/sax-js/issues/32
+require(__dirname).test
+  ( { xml :
+      "<a><b></c></b></a>"
+    , expect :
+      [ [ "opentag", { name: "A", attributes: {} } ]
+      , [ "opentag", { name: "B", attributes: {} } ]
+      , [ "text", "</c>" ]
+      , [ "closetag", "B" ]
+      , [ "closetag", "A" ]
+      ]
+    , strict : false
+    , opt : {}
+    }
+  )
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/trailing-non-whitespace.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/trailing-non-whitespace.js
new file mode 100644 (file)
index 0000000..3e1fb2e
--- /dev/null
@@ -0,0 +1,17 @@
+
+require(__dirname).test({
+  xml : "<span>Welcome,</span> to monkey land",
+  expect : [
+    ["opentag", {
+     "name": "SPAN",
+     "attributes": {}
+    }],
+    ["text", "Welcome,"],
+    ["closetag", "SPAN"],
+    ["text", " to monkey land"],
+    ["end"],
+    ["ready"]
+  ],
+  strict : false,
+  opt : {}
+});
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/unquoted.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/unquoted.js
new file mode 100644 (file)
index 0000000..79f1d0b
--- /dev/null
@@ -0,0 +1,17 @@
+// unquoted attributes should be ok in non-strict mode
+// https://github.com/isaacs/sax-js/issues/31
+require(__dirname).test
+  ( { xml :
+      "<span class=test hello=world></span>"
+    , expect :
+      [ [ "attribute", { name: "class", value: "test" } ]
+      , [ "attribute", { name: "hello", value: "world" } ]
+      , [ "opentag", { name: "SPAN",
+                       attributes: { class: "test", hello: "world" } } ]
+      , [ "closetag", "SPAN" ]
+      ]
+    , strict : false
+    , opt : {}
+    }
+  )
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-issue-41.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-issue-41.js
new file mode 100644 (file)
index 0000000..596d82b
--- /dev/null
@@ -0,0 +1,67 @@
+var t = require(__dirname)
+
+  , xmls = // should be the same both ways.
+    [ "<parent xmlns:a='http://ATTRIBUTE' a:attr='value' />"
+    , "<parent a:attr='value' xmlns:a='http://ATTRIBUTE' />" ]
+
+  , ex1 =
+    [ [ "opennamespace"
+      , { prefix: "a"
+        , uri: "http://ATTRIBUTE"
+        }
+      ]
+    , [ "attribute"
+      , { name: "xmlns:a"
+        , value: "http://ATTRIBUTE"
+        , prefix: "xmlns"
+        , local: "a"
+        , uri: "http://www.w3.org/2000/xmlns/"
+        }
+      ]
+    , [ "attribute"
+      , { name: "a:attr"
+        , local: "attr"
+        , prefix: "a"
+        , uri: "http://ATTRIBUTE"
+        , value: "value"
+        }
+      ]
+    , [ "opentag"
+      , { name: "parent"
+        , uri: ""
+        , prefix: ""
+        , local: "parent"
+        , attributes:
+          { "a:attr":
+            { name: "a:attr"
+            , local: "attr"
+            , prefix: "a"
+            , uri: "http://ATTRIBUTE"
+            , value: "value"
+            }
+          , "xmlns:a":
+            { name: "xmlns:a"
+            , local: "a"
+            , prefix: "xmlns"
+            , uri: "http://www.w3.org/2000/xmlns/"
+            , value: "http://ATTRIBUTE"
+            }
+          }
+        , ns: {"a": "http://ATTRIBUTE"}
+        }
+      ]
+    , ["closetag", "parent"]
+    , ["closenamespace", { prefix: "a", uri: "http://ATTRIBUTE" }]
+    ]
+
+  // swap the order of elements 2 and 1
+  , ex2 = [ex1[0], ex1[2], ex1[1]].concat(ex1.slice(3))
+  , expected = [ex1, ex2]
+
+xmls.forEach(function (x, i) {
+  t.test({ xml: x
+         , expect: expected[i]
+         , strict: true
+         , opt: { xmlns: true }
+         })
+})
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-rebinding.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-rebinding.js
new file mode 100644 (file)
index 0000000..f464876
--- /dev/null
@@ -0,0 +1,59 @@
+
+require(__dirname).test
+  ( { xml :
+      "<root xmlns:x='x1' xmlns:y='y1' x:a='x1' y:a='y1'>"+
+        "<rebind xmlns:x='x2'>"+
+          "<check x:a='x2' y:a='y1'/>"+
+        "</rebind>"+
+        "<check x:a='x1' y:a='y1'/>"+
+      "</root>"
+
+    , expect :
+      [ [ "opennamespace", { prefix: "x", uri: "x1" } ]
+      , [ "opennamespace", { prefix: "y", uri: "y1" } ]
+      , [ "attribute", { name: "xmlns:x", value: "x1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } ]
+      , [ "attribute", { name: "xmlns:y", value: "y1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "y" } ]
+      , [ "attribute", { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } ]
+      , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ]
+      , [ "opentag", { name: "root", uri: "", prefix: "", local: "root",
+            attributes: { "xmlns:x": { name: "xmlns:x", value: "x1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" }
+                        , "xmlns:y": { name: "xmlns:y", value: "y1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "y" }
+                        , "x:a": { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" }
+                        , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } },
+            ns: { x: 'x1', y: 'y1' } } ]
+
+      , [ "opennamespace", { prefix: "x", uri: "x2" } ]
+      , [ "attribute", { name: "xmlns:x", value: "x2", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } ]
+      , [ "opentag", { name: "rebind", uri: "", prefix: "", local: "rebind",
+            attributes: { "xmlns:x": { name: "xmlns:x", value: "x2", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } },
+            ns: { x: 'x2' } } ]
+
+      , [ "attribute", { name: "x:a", value: "x2", uri: "x2", prefix: "x", local: "a" } ]
+      , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ]
+      , [ "opentag", { name: "check", uri: "", prefix: "", local: "check",
+            attributes: { "x:a": { name: "x:a", value: "x2", uri: "x2", prefix: "x", local: "a" }
+                        , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } },
+            ns: { x: 'x2' } } ]
+
+      , [ "closetag", "check" ]
+
+      , [ "closetag", "rebind" ]
+      , [ "closenamespace", { prefix: "x", uri: "x2" } ]
+
+      , [ "attribute", { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } ]
+      , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ]
+      , [ "opentag", { name: "check", uri: "", prefix: "", local: "check",
+            attributes: { "x:a": { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" }
+                        , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } },
+            ns: { x: 'x1', y: 'y1' } } ]
+      , [ "closetag", "check" ]
+
+      , [ "closetag", "root" ]
+      , [ "closenamespace", { prefix: "x", uri: "x1" } ]
+      , [ "closenamespace", { prefix: "y", uri: "y1" } ]
+      ]
+    , strict : true
+    , opt : { xmlns: true }
+    }
+  )
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-strict.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-strict.js
new file mode 100644 (file)
index 0000000..4ad615b
--- /dev/null
@@ -0,0 +1,71 @@
+
+require(__dirname).test
+  ( { xml :
+      "<root>"+
+        "<plain attr='normal'/>"+
+        "<ns1 xmlns='uri:default'>"+
+          "<plain attr='normal'/>"+
+        "</ns1>"+
+        "<ns2 xmlns:a='uri:nsa'>"+
+          "<plain attr='normal'/>"+
+          "<a:ns a:attr='namespaced'/>"+
+        "</ns2>"+
+      "</root>"
+
+    , expect :
+      [ [ "opentag", { name: "root", prefix: "", local: "root", uri: "",
+            attributes: {}, ns: {} } ]
+
+      , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ]
+      , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "",
+            attributes: { "attr": { name: "attr", value: "normal", uri: "", prefix: "", local: "attr", uri: "" } },
+            ns: {} } ]
+      , [ "closetag", "plain" ]
+
+      , [ "opennamespace", { prefix: "", uri: "uri:default" } ]
+
+      , [ "attribute", { name: "xmlns", value: "uri:default", prefix: "xmlns", local: "", uri: "http://www.w3.org/2000/xmlns/" } ]
+      , [ "opentag", { name: "ns1", prefix: "", local: "ns1", uri: "uri:default",
+            attributes: { "xmlns": { name: "xmlns", value: "uri:default", prefix: "xmlns", local: "", uri: "http://www.w3.org/2000/xmlns/" } },
+            ns: { "": "uri:default" } } ]
+
+      , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "uri:default" } ]
+      , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "uri:default", ns: { '': 'uri:default' },
+            attributes: { "attr": { name: "attr", value: "normal", prefix: "", local: "attr", uri: "uri:default" } } } ]
+      , [ "closetag", "plain" ]
+
+      , [ "closetag", "ns1" ]
+
+      , [ "closenamespace", { prefix: "", uri: "uri:default" } ]
+
+      , [ "opennamespace", { prefix: "a", uri: "uri:nsa" } ]
+
+      , [ "attribute", { name: "xmlns:a", value: "uri:nsa", prefix: "xmlns", local: "a", uri: "http://www.w3.org/2000/xmlns/" } ]
+
+      , [ "opentag", { name: "ns2", prefix: "", local: "ns2", uri: "",
+            attributes: { "xmlns:a": { name: "xmlns:a", value: "uri:nsa", prefix: "xmlns", local: "a", uri: "http://www.w3.org/2000/xmlns/" } },
+            ns: { a: "uri:nsa" } } ]
+
+      , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ]
+      , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "",
+            attributes: { "attr": { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } },
+            ns: { a: 'uri:nsa' } } ]
+      , [ "closetag", "plain" ]
+
+      , [ "attribute", { name: "a:attr", value: "namespaced", prefix: "a", local: "attr", uri: "uri:nsa" } ]
+      , [ "opentag", { name: "a:ns", prefix: "a", local: "ns", uri: "uri:nsa",
+            attributes: { "a:attr": { name: "a:attr", value: "namespaced", prefix: "a", local: "attr", uri: "uri:nsa" } },
+            ns: { a: 'uri:nsa' } } ]
+      , [ "closetag", "a:ns" ]
+
+      , [ "closetag", "ns2" ]
+
+      , [ "closenamespace", { prefix: "a", uri: "uri:nsa" } ]
+
+      , [ "closetag", "root" ]
+      ]
+    , strict : true
+    , opt : { xmlns: true }
+    }
+  )
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-unbound.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-unbound.js
new file mode 100644 (file)
index 0000000..2944b87
--- /dev/null
@@ -0,0 +1,15 @@
+
+require(__dirname).test(
+  { strict : true
+  , opt : { xmlns: true }
+  , expect :
+    [ ["error", "Unbound namespace prefix: \"unbound\"\nLine: 0\nColumn: 28\nChar: >"]
+
+    , [ "attribute", { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } ]
+    , [ "opentag", { name: "root", uri: "", prefix: "", local: "root",
+          attributes: { "unbound:attr": { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } },
+          ns: {} } ]
+    , [ "closetag", "root" ]
+    ]
+  }
+).write("<root unbound:attr='value'/>")
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js
new file mode 100644 (file)
index 0000000..16da771
--- /dev/null
@@ -0,0 +1,35 @@
+require(__dirname).test(
+  { xml : "<root xml:lang='en'/>"
+  , expect :
+    [ [ "attribute"
+      , { name: "xml:lang"
+        , local: "lang"
+        , prefix: "xml"
+        , uri: "http://www.w3.org/XML/1998/namespace"
+        , value: "en"
+        }
+      ]
+    , [ "opentag"
+      , { name: "root"
+        , uri: ""
+        , prefix: ""
+        , local: "root"
+        , attributes:
+          { "xml:lang":
+            { name: "xml:lang"
+            , local: "lang"
+            , prefix: "xml"
+            , uri: "http://www.w3.org/XML/1998/namespace"
+            , value: "en"
+            }
+          }
+        , ns: {}
+        }
+      ]
+    , ["closetag", "root"]
+    ]
+  , strict : true
+  , opt : { xmlns: true }
+  }
+)
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-xml-default-prefix.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-xml-default-prefix.js
new file mode 100644 (file)
index 0000000..9a1ce1b
--- /dev/null
@@ -0,0 +1,20 @@
+require(__dirname).test(
+  { xml : "<xml:root/>"
+  , expect :
+    [
+      [ "opentag"
+      , { name: "xml:root"
+        , uri: "http://www.w3.org/XML/1998/namespace"
+        , prefix: "xml"
+        , local: "root"
+        , attributes: {}
+        , ns: {}
+        }
+      ]
+    , ["closetag", "xml:root"]
+    ]
+  , strict : true
+  , opt : { xmlns: true }
+  }
+)
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-xml-default-redefine.js b/config/tizen/tpk-tools/cli/node_modules/sax/test/xmlns-xml-default-redefine.js
new file mode 100644 (file)
index 0000000..1eba9c7
--- /dev/null
@@ -0,0 +1,40 @@
+require(__dirname).test(
+  { xml : "<xml:root xmlns:xml='ERROR'/>"
+  , expect :
+    [ ["error"
+      , "xml: prefix must be bound to http://www.w3.org/XML/1998/namespace\n"
+                        + "Actual: ERROR\n"
+      + "Line: 0\nColumn: 27\nChar: '"
+      ]
+    , [ "attribute"
+      , { name: "xmlns:xml"
+        , local: "xml"
+        , prefix: "xmlns"
+        , uri: "http://www.w3.org/2000/xmlns/"
+        , value: "ERROR"
+        }
+      ]
+    , [ "opentag"
+      , { name: "xml:root"
+        , uri: "http://www.w3.org/XML/1998/namespace"
+        , prefix: "xml"
+        , local: "root"
+        , attributes:
+          { "xmlns:xml":
+            { name: "xmlns:xml"
+            , local: "xml"
+            , prefix: "xmlns"
+            , uri: "http://www.w3.org/2000/xmlns/"
+            , value: "ERROR"
+            }
+          }
+        , ns: {}
+        }
+      ]
+    , ["closetag", "xml:root"]
+    ]
+  , strict : true
+  , opt : { xmlns: true }
+  }
+)
+
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/.documentup.json b/config/tizen/tpk-tools/cli/node_modules/shelljs/.documentup.json
new file mode 100644 (file)
index 0000000..57fe301
--- /dev/null
@@ -0,0 +1,6 @@
+{
+  "name": "ShellJS",
+  "twitter": [
+    "r2r"
+  ]
+}
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/.jshintrc b/config/tizen/tpk-tools/cli/node_modules/shelljs/.jshintrc
new file mode 100644 (file)
index 0000000..a80c559
--- /dev/null
@@ -0,0 +1,7 @@
+{
+  "loopfunc": true,
+  "sub": true,
+  "undef": true,
+  "unused": true,
+  "node": true
+}
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/.npmignore b/config/tizen/tpk-tools/cli/node_modules/shelljs/.npmignore
new file mode 100644 (file)
index 0000000..6b20c38
--- /dev/null
@@ -0,0 +1,2 @@
+test/
+tmp/
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/.travis.yml b/config/tizen/tpk-tools/cli/node_modules/shelljs/.travis.yml
new file mode 100644 (file)
index 0000000..1b3280a
--- /dev/null
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+  - "0.10"
+  - "0.11"
+  - "0.12"
+  
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/LICENSE b/config/tizen/tpk-tools/cli/node_modules/shelljs/LICENSE
new file mode 100644 (file)
index 0000000..1b35ee9
--- /dev/null
@@ -0,0 +1,26 @@
+Copyright (c) 2012, Artur Adib <aadib@mozilla.com>
+All rights reserved.
+
+You may use this project under the terms of the New BSD license as follows:
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Artur Adib nor the
+      names of the contributors may be used to endorse or promote products
+      derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/README.md b/config/tizen/tpk-tools/cli/node_modules/shelljs/README.md
new file mode 100644 (file)
index 0000000..d08d13e
--- /dev/null
@@ -0,0 +1,579 @@
+# ShellJS - Unix shell commands for Node.js [![Build Status](https://secure.travis-ci.org/arturadib/shelljs.png)](http://travis-ci.org/arturadib/shelljs)
+
+ShellJS is a portable **(Windows/Linux/OS X)** implementation of Unix shell commands on top of the Node.js API. You can use it to eliminate your shell script's dependency on Unix while still keeping its familiar and powerful commands. You can also install it globally so you can run it from outside Node projects - say goodbye to those gnarly Bash scripts!
+
+The project is [unit-tested](http://travis-ci.org/arturadib/shelljs) and battled-tested in projects like:
+
++ [PDF.js](http://github.com/mozilla/pdf.js) - Firefox's next-gen PDF reader
++ [Firebug](http://getfirebug.com/) - Firefox's infamous debugger
++ [JSHint](http://jshint.com) - Most popular JavaScript linter
++ [Zepto](http://zeptojs.com) - jQuery-compatible JavaScript library for modern browsers
++ [Yeoman](http://yeoman.io/) - Web application stack and development tool
++ [Deployd.com](http://deployd.com) - Open source PaaS for quick API backend generation
+
+and [many more](https://npmjs.org/browse/depended/shelljs).
+
+Connect with [@r2r](http://twitter.com/r2r) on Twitter for questions, suggestions, etc.
+
+## Installing
+
+Via npm:
+
+```bash
+$ npm install [-g] shelljs
+```
+
+If the global option `-g` is specified, the binary `shjs` will be installed. This makes it possible to
+run ShellJS scripts much like any shell script from the command line, i.e. without requiring a `node_modules` folder:
+
+```bash
+$ shjs my_script
+```
+
+You can also just copy `shell.js` into your project's directory, and `require()` accordingly.
+
+
+## Examples
+
+### JavaScript
+
+```javascript
+require('shelljs/global');
+
+if (!which('git')) {
+  echo('Sorry, this script requires git');
+  exit(1);
+}
+
+// Copy files to release dir
+mkdir('-p', 'out/Release');
+cp('-R', 'stuff/*', 'out/Release');
+
+// Replace macros in each .js file
+cd('lib');
+ls('*.js').forEach(function(file) {
+  sed('-i', 'BUILD_VERSION', 'v0.1.2', file);
+  sed('-i', /.*REMOVE_THIS_LINE.*\n/, '', file);
+  sed('-i', /.*REPLACE_LINE_WITH_MACRO.*\n/, cat('macro.js'), file);
+});
+cd('..');
+
+// Run external tool synchronously
+if (exec('git commit -am "Auto-commit"').code !== 0) {
+  echo('Error: Git commit failed');
+  exit(1);
+}
+```
+
+### CoffeeScript
+
+```coffeescript
+require 'shelljs/global'
+
+if not which 'git'
+  echo 'Sorry, this script requires git'
+  exit 1
+
+# Copy files to release dir
+mkdir '-p', 'out/Release'
+cp '-R', 'stuff/*', 'out/Release'
+
+# Replace macros in each .js file
+cd 'lib'
+for file in ls '*.js'
+  sed '-i', 'BUILD_VERSION', 'v0.1.2', file
+  sed '-i', /.*REMOVE_THIS_LINE.*\n/, '', file
+  sed '-i', /.*REPLACE_LINE_WITH_MACRO.*\n/, cat 'macro.js', file
+cd '..'
+
+# Run external tool synchronously
+if (exec 'git commit -am "Auto-commit"').code != 0
+  echo 'Error: Git commit failed'
+  exit 1
+```
+
+## Global vs. Local
+
+The example above uses the convenience script `shelljs/global` to reduce verbosity. If polluting your global namespace is not desirable, simply require `shelljs`.
+
+Example:
+
+```javascript
+var shell = require('shelljs');
+shell.echo('hello world');
+```
+
+## Make tool
+
+A convenience script `shelljs/make` is also provided to mimic the behavior of a Unix Makefile. In this case all shell objects are global, and command line arguments will cause the script to execute only the corresponding function in the global `target` object. To avoid redundant calls, target functions are executed only once per script.
+
+Example (CoffeeScript):
+
+```coffeescript
+require 'shelljs/make'
+
+target.all = ->
+  target.bundle()
+  target.docs()
+
+target.bundle = ->
+  cd __dirname
+  mkdir 'build'
+  cd 'lib'
+  (cat '*.js').to '../build/output.js'
+
+target.docs = ->
+  cd __dirname
+  mkdir 'docs'
+  cd 'lib'
+  for file in ls '*.js'
+    text = grep '//@', file     # extract special comments
+    text.replace '//@', ''      # remove comment tags
+    text.to 'docs/my_docs.md'
+```
+
+To run the target `all`, call the above script without arguments: `$ node make`. To run the target `docs`: `$ node make docs`.
+
+You can also pass arguments to your targets by using the `--` separator. For example, to pass `arg1` and `arg2` to a target `bundle`, do `$ node make bundle -- arg1 arg2`:
+
+```javascript
+require('shelljs/make');
+
+target.bundle = function(argsArray) {
+  // argsArray = ['arg1', 'arg2']
+  /* ... */
+}
+```
+
+
+<!-- DO NOT MODIFY BEYOND THIS POINT - IT'S AUTOMATICALLY GENERATED -->
+
+
+## Command reference
+
+
+All commands run synchronously, unless otherwise stated.
+
+
+### cd('dir')
+Changes to directory `dir` for the duration of the script
+
+
+### pwd()
+Returns the current directory.
+
+
+### ls([options ,] path [,path ...])
+### ls([options ,] path_array)
+Available options:
+
++ `-R`: recursive
++ `-A`: all files (include files beginning with `.`, except for `.` and `..`)
+
+Examples:
+
+```javascript
+ls('projs/*.js');
+ls('-R', '/users/me', '/tmp');
+ls('-R', ['/users/me', '/tmp']); // same as above
+```
+
+Returns array of files in the given path, or in current directory if no path provided.
+
+
+### find(path [,path ...])
+### find(path_array)
+Examples:
+
+```javascript
+find('src', 'lib');
+find(['src', 'lib']); // same as above
+find('.').filter(function(file) { return file.match(/\.js$/); });
+```
+
+Returns array of all files (however deep) in the given paths.
+
+The main difference from `ls('-R', path)` is that the resulting file names
+include the base directories, e.g. `lib/resources/file1` instead of just `file1`.
+
+
+### cp([options ,] source [,source ...], dest)
+### cp([options ,] source_array, dest)
+Available options:
+
++ `-f`: force
++ `-r, -R`: recursive
+
+Examples:
+
+```javascript
+cp('file1', 'dir1');
+cp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp');
+cp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above
+```
+
+Copies files. The wildcard `*` is accepted.
+
+
+### rm([options ,] file [, file ...])
+### rm([options ,] file_array)
+Available options:
+
++ `-f`: force
++ `-r, -R`: recursive
+
+Examples:
+
+```javascript
+rm('-rf', '/tmp/*');
+rm('some_file.txt', 'another_file.txt');
+rm(['some_file.txt', 'another_file.txt']); // same as above
+```
+
+Removes files. The wildcard `*` is accepted.
+
+
+### mv(source [, source ...], dest')
+### mv(source_array, dest')
+Available options:
+
++ `f`: force
+
+Examples:
+
+```javascript
+mv('-f', 'file', 'dir/');
+mv('file1', 'file2', 'dir/');
+mv(['file1', 'file2'], 'dir/'); // same as above
+```
+
+Moves files. The wildcard `*` is accepted.
+
+
+### mkdir([options ,] dir [, dir ...])
+### mkdir([options ,] dir_array)
+Available options:
+
++ `p`: full path (will create intermediate dirs if necessary)
+
+Examples:
+
+```javascript
+mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g');
+mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above
+```
+
+Creates directories.
+
+
+### test(expression)
+Available expression primaries:
+
++ `'-b', 'path'`: true if path is a block device
++ `'-c', 'path'`: true if path is a character device
++ `'-d', 'path'`: true if path is a directory
++ `'-e', 'path'`: true if path exists
++ `'-f', 'path'`: true if path is a regular file
++ `'-L', 'path'`: true if path is a symbolic link
++ `'-p', 'path'`: true if path is a pipe (FIFO)
++ `'-S', 'path'`: true if path is a socket
+
+Examples:
+
+```javascript
+if (test('-d', path)) { /* do something with dir */ };
+if (!test('-f', path)) continue; // skip if it's a regular file
+```
+
+Evaluates expression using the available primaries and returns corresponding value.
+
+
+### cat(file [, file ...])
+### cat(file_array)
+
+Examples:
+
+```javascript
+var str = cat('file*.txt');
+var str = cat('file1', 'file2');
+var str = cat(['file1', 'file2']); // same as above
+```
+
+Returns a string containing the given file, or a concatenated string
+containing the files if more than one file is given (a new line character is
+introduced between each file). Wildcard `*` accepted.
+
+
+### 'string'.to(file)
+
+Examples:
+
+```javascript
+cat('input.txt').to('output.txt');
+```
+
+Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as
+those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_
+
+
+### 'string'.toEnd(file)
+
+Examples:
+
+```javascript
+cat('input.txt').toEnd('output.txt');
+```
+
+Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as
+those returned by `cat`, `grep`, etc).
+
+
+### sed([options ,] search_regex, replacement, file)
+Available options:
+
++ `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_
+
+Examples:
+
+```javascript
+sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js');
+sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js');
+```
+
+Reads an input string from `file` and performs a JavaScript `replace()` on the input
+using the given search regex and replacement string or function. Returns the new string after replacement.
+
+
+### grep([options ,] regex_filter, file [, file ...])
+### grep([options ,] regex_filter, file_array)
+Available options:
+
++ `-v`: Inverse the sense of the regex and print the lines not matching the criteria.
+
+Examples:
+
+```javascript
+grep('-v', 'GLOBAL_VARIABLE', '*.js');
+grep('GLOBAL_VARIABLE', '*.js');
+```
+
+Reads input string from given files and returns a string containing all lines of the
+file that match the given `regex_filter`. Wildcard `*` accepted.
+
+
+### which(command)
+
+Examples:
+
+```javascript
+var nodeExec = which('node');
+```
+
+Searches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions.
+Returns string containing the absolute path to the command.
+
+
+### echo(string [,string ...])
+
+Examples:
+
+```javascript
+echo('hello world');
+var str = echo('hello world');
+```
+
+Prints string to stdout, and returns string with additional utility methods
+like `.to()`.
+
+
+### pushd([options,] [dir | '-N' | '+N'])
+
+Available options:
+
++ `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated.
+
+Arguments:
+
++ `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`.
++ `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.
++ `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.
+
+Examples:
+
+```javascript
+// process.cwd() === '/usr'
+pushd('/etc'); // Returns /etc /usr
+pushd('+1');   // Returns /usr /etc
+```
+
+Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack.
+
+### popd([options,] ['-N' | '+N'])
+
+Available options:
+
++ `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated.
+
+Arguments:
+
++ `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero.
++ `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero.
+
+Examples:
+
+```javascript
+echo(process.cwd()); // '/usr'
+pushd('/etc');       // '/etc /usr'
+echo(process.cwd()); // '/etc'
+popd();              // '/usr'
+echo(process.cwd()); // '/usr'
+```
+
+When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack.
+
+### dirs([options | '+N' | '-N'])
+
+Available options:
+
++ `-c`: Clears the directory stack by deleting all of the elements.
+
+Arguments:
+
++ `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero.
++ `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero.
+
+Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified.
+
+See also: pushd, popd
+
+
+### ln(options, source, dest)
+### ln(source, dest)
+Available options:
+
++ `s`: symlink
++ `f`: force
+
+Examples:
+
+```javascript
+ln('file', 'newlink');
+ln('-sf', 'file', 'existing');
+```
+
+Links source to dest. Use -f to force the link, should dest already exist.
+
+
+### exit(code)
+Exits the current process with the given exit code.
+
+### env['VAR_NAME']
+Object containing environment variables (both getter and setter). Shortcut to process.env.
+
+### exec(command [, options] [, callback])
+Available options (all `false` by default):
+
++ `async`: Asynchronous execution. Defaults to true if a callback is provided.
++ `silent`: Do not echo program output to console.
+
+Examples:
+
+```javascript
+var version = exec('node --version', {silent:true}).output;
+
+var child = exec('some_long_running_process', {async:true});
+child.stdout.on('data', function(data) {
+  /* ... do something with data ... */
+});
+
+exec('some_long_running_process', function(code, output) {
+  console.log('Exit code:', code);
+  console.log('Program output:', output);
+});
+```
+
+Executes the given `command` _synchronously_, unless otherwise specified.
+When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's
+`output` (stdout + stderr)  and its exit `code`. Otherwise returns the child process object, and
+the `callback` gets the arguments `(code, output)`.
+
+**Note:** For long-lived processes, it's best to run `exec()` asynchronously as
+the current synchronous implementation uses a lot of CPU. This should be getting
+fixed soon.
+
+
+### chmod(octal_mode || octal_string, file)
+### chmod(symbolic_mode, file)
+
+Available options:
+
++ `-v`: output a diagnostic for every file processed
++ `-c`: like verbose but report only when a change is made
++ `-R`: change files and directories recursively
+
+Examples:
+
+```javascript
+chmod(755, '/Users/brandon');
+chmod('755', '/Users/brandon'); // same as above
+chmod('u+x', '/Users/brandon');
+```
+
+Alters the permissions of a file or directory by either specifying the
+absolute permissions in octal form or expressing the changes in symbols.
+This command tries to mimic the POSIX behavior as much as possible.
+Notable exceptions:
+
++ In symbolic modes, 'a-r' and '-r' are identical.  No consideration is
+  given to the umask.
++ There is no "quiet" option since default behavior is to run silent.
+
+
+## Non-Unix commands
+
+
+### tempdir()
+
+Examples:
+
+```javascript
+var tmp = tempdir(); // "/tmp" for most *nix platforms
+```
+
+Searches and returns string containing a writeable, platform-dependent temporary directory.
+Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir).
+
+
+### error()
+Tests if error occurred in the last command. Returns `null` if no error occurred,
+otherwise returns string explaining the error
+
+
+## Configuration
+
+
+### config.silent
+Example:
+
+```javascript
+var sh = require('shelljs');
+var silentState = sh.config.silent; // save old silent state
+sh.config.silent = true;
+/* ... */
+sh.config.silent = silentState; // restore old silent state
+```
+
+Suppresses all command output if `true`, except for `echo()` calls.
+Default is `false`.
+
+### config.fatal
+Example:
+
+```javascript
+require('shelljs/global');
+config.fatal = true;
+cp('this_file_does_not_exist', '/dev/null'); // dies here
+/* more commands... */
+```
+
+If `true` the script will die on errors. Default is `false`.
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/RELEASE.md b/config/tizen/tpk-tools/cli/node_modules/shelljs/RELEASE.md
new file mode 100644 (file)
index 0000000..69ef3fb
--- /dev/null
@@ -0,0 +1,9 @@
+# Release steps
+
+* Ensure master passes CI tests
+* Bump version in package.json. Any breaking change or new feature should bump minor (or even major). Non-breaking changes or fixes can just bump patch.
+* Update README manually if the changes are not documented in-code. If so, run `scripts/generate-docs.js`
+* Commit
+* `$ git tag <version>` (see `git tag -l` for latest)
+* `$ git push origin master --tags`
+* `$ npm publish .`
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/bin/shjs b/config/tizen/tpk-tools/cli/node_modules/shelljs/bin/shjs
new file mode 100755 (executable)
index 0000000..d239a7a
--- /dev/null
@@ -0,0 +1,51 @@
+#!/usr/bin/env node
+require('../global');
+
+if (process.argv.length < 3) {
+  console.log('ShellJS: missing argument (script name)');
+  console.log();
+  process.exit(1);
+}
+
+var args,
+  scriptName = process.argv[2];
+env['NODE_PATH'] = __dirname + '/../..';
+
+if (!scriptName.match(/\.js/) && !scriptName.match(/\.coffee/)) {
+  if (test('-f', scriptName + '.js'))
+    scriptName += '.js';
+  if (test('-f', scriptName + '.coffee'))
+    scriptName += '.coffee';
+}
+
+if (!test('-f', scriptName)) {
+  console.log('ShellJS: script not found ('+scriptName+')');
+  console.log();
+  process.exit(1);
+}
+
+args = process.argv.slice(3);
+
+for (var i = 0, l = args.length; i < l; i++) {
+  if (args[i][0] !== "-"){
+    args[i] = '"' + args[i] + '"'; // fixes arguments with multiple words
+  }
+}
+
+if (scriptName.match(/\.coffee$/)) {
+  //
+  // CoffeeScript
+  //
+  if (which('coffee')) {
+    exec('coffee ' + scriptName + ' ' + args.join(' '), { async: true });
+  } else {
+    console.log('ShellJS: CoffeeScript interpreter not found');
+    console.log();
+    process.exit(1);
+  }
+} else {
+  //
+  // JavaScript
+  //
+  exec('node ' + scriptName + ' ' + args.join(' '), { async: true });
+}
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/global.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/global.js
new file mode 100644 (file)
index 0000000..97f0033
--- /dev/null
@@ -0,0 +1,3 @@
+var shell = require('./shell.js');
+for (var cmd in shell)
+  global[cmd] = shell[cmd];
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/make.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/make.js
new file mode 100644 (file)
index 0000000..f78b4cf
--- /dev/null
@@ -0,0 +1,56 @@
+require('./global');
+
+global.config.fatal = true;
+global.target = {};
+
+var args = process.argv.slice(2),
+  targetArgs,
+  dashesLoc = args.indexOf('--');
+
+// split args, everything after -- if only for targets
+if (dashesLoc > -1) {
+  targetArgs = args.slice(dashesLoc + 1, args.length);
+  args = args.slice(0, dashesLoc);
+}
+
+// This ensures we only execute the script targets after the entire script has
+// been evaluated
+setTimeout(function() {
+  var t;
+
+  if (args.length === 1 && args[0] === '--help') {
+    console.log('Available targets:');
+    for (t in global.target)
+      console.log('  ' + t);
+    return;
+  }
+
+  // Wrap targets to prevent duplicate execution
+  for (t in global.target) {
+    (function(t, oldTarget){
+
+      // Wrap it
+      global.target[t] = function() {
+        if (oldTarget.done)
+          return;
+        oldTarget.done = true;
+        return oldTarget.apply(oldTarget, arguments);
+      };
+
+    })(t, global.target[t]);
+  }
+
+  // Execute desired targets
+  if (args.length > 0) {
+    args.forEach(function(arg) {
+      if (arg in global.target)
+        global.target[arg](targetArgs);
+      else {
+        console.log('no such target: ' + arg);
+      }
+    });
+  } else if ('all' in global.target) {
+    global.target.all(targetArgs);
+  }
+
+}, 0);
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/package.json b/config/tizen/tpk-tools/cli/node_modules/shelljs/package.json
new file mode 100644 (file)
index 0000000..23e5614
--- /dev/null
@@ -0,0 +1,96 @@
+{
+  "_args": [
+    [
+      {
+        "raw": "shelljs@0.5.3",
+        "scope": null,
+        "escapedName": "shelljs",
+        "name": "shelljs",
+        "rawSpec": "0.5.3",
+        "spec": "0.5.3",
+        "type": "version"
+      },
+      "/home/sumin/iotjs-tpk/cli"
+    ]
+  ],
+  "_from": "shelljs@0.5.3",
+  "_id": "shelljs@0.5.3",
+  "_inCache": true,
+  "_location": "/shelljs",
+  "_nodeVersion": "1.2.0",
+  "_npmUser": {
+    "name": "artur",
+    "email": "arturadib@gmail.com"
+  },
+  "_npmVersion": "2.5.1",
+  "_phantomChildren": {},
+  "_requested": {
+    "raw": "shelljs@0.5.3",
+    "scope": null,
+    "escapedName": "shelljs",
+    "name": "shelljs",
+    "rawSpec": "0.5.3",
+    "spec": "0.5.3",
+    "type": "version"
+  },
+  "_requiredBy": [
+    "/"
+  ],
+  "_resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz",
+  "_shasum": "c54982b996c76ef0c1e6b59fbdc5825f5b713113",
+  "_shrinkwrap": null,
+  "_spec": "shelljs@0.5.3",
+  "_where": "/home/sumin/iotjs-tpk/cli",
+  "author": {
+    "name": "Artur Adib",
+    "email": "arturadib@gmail.com"
+  },
+  "bin": {
+    "shjs": "./bin/shjs"
+  },
+  "bugs": {
+    "url": "https://github.com/arturadib/shelljs/issues"
+  },
+  "dependencies": {},
+  "description": "Portable Unix shell commands for Node.js",
+  "devDependencies": {
+    "jshint": "~2.1.11"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "c54982b996c76ef0c1e6b59fbdc5825f5b713113",
+    "tarball": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz"
+  },
+  "engines": {
+    "node": ">=0.8.0"
+  },
+  "gitHead": "22d0975040b9b8234755dc6e692d6869436e8485",
+  "homepage": "http://github.com/arturadib/shelljs",
+  "keywords": [
+    "unix",
+    "shell",
+    "makefile",
+    "make",
+    "jake",
+    "synchronous"
+  ],
+  "license": "BSD*",
+  "main": "./shell.js",
+  "maintainers": [
+    {
+      "name": "artur",
+      "email": "arturadib@gmail.com"
+    }
+  ],
+  "name": "shelljs",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/arturadib/shelljs.git"
+  },
+  "scripts": {
+    "test": "node scripts/run-tests"
+  },
+  "version": "0.5.3"
+}
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/scripts/generate-docs.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/scripts/generate-docs.js
new file mode 100755 (executable)
index 0000000..532fed9
--- /dev/null
@@ -0,0 +1,21 @@
+#!/usr/bin/env node
+require('../global');
+
+echo('Appending docs to README.md');
+
+cd(__dirname + '/..');
+
+// Extract docs from shell.js
+var docs = grep('//@', 'shell.js');
+
+docs = docs.replace(/\/\/\@include (.+)/g, function(match, path) {
+  var file = path.match('.js$') ? path : path+'.js';
+  return grep('//@', file);
+});
+
+// Remove '//@'
+docs = docs.replace(/\/\/\@ ?/g, '');
+// Append docs to README
+sed('-i', /## Command reference(.|\n)*/, '## Command reference\n\n' + docs, 'README.md');
+
+echo('All done.');
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/scripts/run-tests.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/scripts/run-tests.js
new file mode 100755 (executable)
index 0000000..f9d31e0
--- /dev/null
@@ -0,0 +1,50 @@
+#!/usr/bin/env node
+require('../global');
+
+var path = require('path');
+
+var failed = false;
+
+//
+// Lint
+//
+JSHINT_BIN = './node_modules/jshint/bin/jshint';
+cd(__dirname + '/..');
+
+if (!test('-f', JSHINT_BIN)) {
+  echo('JSHint not found. Run `npm install` in the root dir first.');
+  exit(1);
+}
+
+if (exec(JSHINT_BIN + ' *.js test/*.js').code !== 0) {
+  failed = true;
+  echo('*** JSHINT FAILED! (return code != 0)');
+  echo();
+} else {
+  echo('All JSHint tests passed');
+  echo();
+}
+
+//
+// Unit tests
+//
+cd(__dirname + '/../test');
+ls('*.js').forEach(function(file) {
+  echo('Running test:', file);
+  if (exec('node ' + file).code !== 123) { // 123 avoids false positives (e.g. premature exit)
+    failed = true;
+    echo('*** TEST FAILED! (missing exit code "123")');
+    echo();
+  }
+});
+
+if (failed) {
+  echo();
+  echo('*******************************************************');
+  echo('WARNING: Some tests did not pass!');
+  echo('*******************************************************');
+  exit(1);
+} else {
+  echo();
+  echo('All tests passed.');
+}
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/shell.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/shell.js
new file mode 100644 (file)
index 0000000..bdeb559
--- /dev/null
@@ -0,0 +1,159 @@
+//
+// ShellJS
+// Unix shell commands on top of Node's API
+//
+// Copyright (c) 2012 Artur Adib
+// http://github.com/arturadib/shelljs
+//
+
+var common = require('./src/common');
+
+
+//@
+//@ All commands run synchronously, unless otherwise stated.
+//@
+
+//@include ./src/cd
+var _cd = require('./src/cd');
+exports.cd = common.wrap('cd', _cd);
+
+//@include ./src/pwd
+var _pwd = require('./src/pwd');
+exports.pwd = common.wrap('pwd', _pwd);
+
+//@include ./src/ls
+var _ls = require('./src/ls');
+exports.ls = common.wrap('ls', _ls);
+
+//@include ./src/find
+var _find = require('./src/find');
+exports.find = common.wrap('find', _find);
+
+//@include ./src/cp
+var _cp = require('./src/cp');
+exports.cp = common.wrap('cp', _cp);
+
+//@include ./src/rm
+var _rm = require('./src/rm');
+exports.rm = common.wrap('rm', _rm);
+
+//@include ./src/mv
+var _mv = require('./src/mv');
+exports.mv = common.wrap('mv', _mv);
+
+//@include ./src/mkdir
+var _mkdir = require('./src/mkdir');
+exports.mkdir = common.wrap('mkdir', _mkdir);
+
+//@include ./src/test
+var _test = require('./src/test');
+exports.test = common.wrap('test', _test);
+
+//@include ./src/cat
+var _cat = require('./src/cat');
+exports.cat = common.wrap('cat', _cat);
+
+//@include ./src/to
+var _to = require('./src/to');
+String.prototype.to = common.wrap('to', _to);
+
+//@include ./src/toEnd
+var _toEnd = require('./src/toEnd');
+String.prototype.toEnd = common.wrap('toEnd', _toEnd);
+
+//@include ./src/sed
+var _sed = require('./src/sed');
+exports.sed = common.wrap('sed', _sed);
+
+//@include ./src/grep
+var _grep = require('./src/grep');
+exports.grep = common.wrap('grep', _grep);
+
+//@include ./src/which
+var _which = require('./src/which');
+exports.which = common.wrap('which', _which);
+
+//@include ./src/echo
+var _echo = require('./src/echo');
+exports.echo = _echo; // don't common.wrap() as it could parse '-options'
+
+//@include ./src/dirs
+var _dirs = require('./src/dirs').dirs;
+exports.dirs = common.wrap("dirs", _dirs);
+var _pushd = require('./src/dirs').pushd;
+exports.pushd = common.wrap('pushd', _pushd);
+var _popd = require('./src/dirs').popd;
+exports.popd = common.wrap("popd", _popd);
+
+//@include ./src/ln
+var _ln = require('./src/ln');
+exports.ln = common.wrap('ln', _ln);
+
+//@
+//@ ### exit(code)
+//@ Exits the current process with the given exit code.
+exports.exit = process.exit;
+
+//@
+//@ ### env['VAR_NAME']
+//@ Object containing environment variables (both getter and setter). Shortcut to process.env.
+exports.env = process.env;
+
+//@include ./src/exec
+var _exec = require('./src/exec');
+exports.exec = common.wrap('exec', _exec, {notUnix:true});
+
+//@include ./src/chmod
+var _chmod = require('./src/chmod');
+exports.chmod = common.wrap('chmod', _chmod);
+
+
+
+//@
+//@ ## Non-Unix commands
+//@
+
+//@include ./src/tempdir
+var _tempDir = require('./src/tempdir');
+exports.tempdir = common.wrap('tempdir', _tempDir);
+
+
+//@include ./src/error
+var _error = require('./src/error');
+exports.error = _error;
+
+
+
+//@
+//@ ## Configuration
+//@
+
+exports.config = common.config;
+
+//@
+//@ ### config.silent
+//@ Example:
+//@
+//@ ```javascript
+//@ var sh = require('shelljs');
+//@ var silentState = sh.config.silent; // save old silent state
+//@ sh.config.silent = true;
+//@ /* ... */
+//@ sh.config.silent = silentState; // restore old silent state
+//@ ```
+//@
+//@ Suppresses all command output if `true`, except for `echo()` calls.
+//@ Default is `false`.
+
+//@
+//@ ### config.fatal
+//@ Example:
+//@
+//@ ```javascript
+//@ require('shelljs/global');
+//@ config.fatal = true;
+//@ cp('this_file_does_not_exist', '/dev/null'); // dies here
+//@ /* more commands... */
+//@ ```
+//@
+//@ If `true` the script will die on errors. Default is `false`.
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/cat.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/cat.js
new file mode 100644 (file)
index 0000000..f6f4d25
--- /dev/null
@@ -0,0 +1,43 @@
+var common = require('./common');
+var fs = require('fs');
+
+//@
+//@ ### cat(file [, file ...])
+//@ ### cat(file_array)
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ var str = cat('file*.txt');
+//@ var str = cat('file1', 'file2');
+//@ var str = cat(['file1', 'file2']); // same as above
+//@ ```
+//@
+//@ Returns a string containing the given file, or a concatenated string
+//@ containing the files if more than one file is given (a new line character is
+//@ introduced between each file). Wildcard `*` accepted.
+function _cat(options, files) {
+  var cat = '';
+
+  if (!files)
+    common.error('no paths given');
+
+  if (typeof files === 'string')
+    files = [].slice.call(arguments, 1);
+  // if it's array leave it as it is
+
+  files = common.expand(files);
+
+  files.forEach(function(file) {
+    if (!fs.existsSync(file))
+      common.error('no such file or directory: ' + file);
+
+    cat += fs.readFileSync(file, 'utf8') + '\n';
+  });
+
+  if (cat[cat.length-1] === '\n')
+    cat = cat.substring(0, cat.length-1);
+
+  return common.ShellString(cat);
+}
+module.exports = _cat;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/cd.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/cd.js
new file mode 100644 (file)
index 0000000..230f432
--- /dev/null
@@ -0,0 +1,19 @@
+var fs = require('fs');
+var common = require('./common');
+
+//@
+//@ ### cd('dir')
+//@ Changes to directory `dir` for the duration of the script
+function _cd(options, dir) {
+  if (!dir)
+    common.error('directory not specified');
+
+  if (!fs.existsSync(dir))
+    common.error('no such file or directory: ' + dir);
+
+  if (!fs.statSync(dir).isDirectory())
+    common.error('not a directory: ' + dir);
+
+  process.chdir(dir);
+}
+module.exports = _cd;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/chmod.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/chmod.js
new file mode 100644 (file)
index 0000000..f288893
--- /dev/null
@@ -0,0 +1,208 @@
+var common = require('./common');
+var fs = require('fs');
+var path = require('path');
+
+var PERMS = (function (base) {
+  return {
+    OTHER_EXEC  : base.EXEC,
+    OTHER_WRITE : base.WRITE,
+    OTHER_READ  : base.READ,
+
+    GROUP_EXEC  : base.EXEC  << 3,
+    GROUP_WRITE : base.WRITE << 3,
+    GROUP_READ  : base.READ << 3,
+
+    OWNER_EXEC  : base.EXEC << 6,
+    OWNER_WRITE : base.WRITE << 6,
+    OWNER_READ  : base.READ << 6,
+
+    // Literal octal numbers are apparently not allowed in "strict" javascript.  Using parseInt is
+    // the preferred way, else a jshint warning is thrown.
+    STICKY      : parseInt('01000', 8),
+    SETGID      : parseInt('02000', 8),
+    SETUID      : parseInt('04000', 8),
+
+    TYPE_MASK   : parseInt('0770000', 8)
+  };
+})({
+  EXEC  : 1,
+  WRITE : 2,
+  READ  : 4
+});
+
+//@
+//@ ### chmod(octal_mode || octal_string, file)
+//@ ### chmod(symbolic_mode, file)
+//@
+//@ Available options:
+//@
+//@ + `-v`: output a diagnostic for every file processed//@
+//@ + `-c`: like verbose but report only when a change is made//@
+//@ + `-R`: change files and directories recursively//@
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ chmod(755, '/Users/brandon');
+//@ chmod('755', '/Users/brandon'); // same as above
+//@ chmod('u+x', '/Users/brandon');
+//@ ```
+//@
+//@ Alters the permissions of a file or directory by either specifying the
+//@ absolute permissions in octal form or expressing the changes in symbols.
+//@ This command tries to mimic the POSIX behavior as much as possible.
+//@ Notable exceptions:
+//@
+//@ + In symbolic modes, 'a-r' and '-r' are identical.  No consideration is
+//@   given to the umask.
+//@ + There is no "quiet" option since default behavior is to run silent.
+function _chmod(options, mode, filePattern) {
+  if (!filePattern) {
+    if (options.length > 0 && options.charAt(0) === '-') {
+      // Special case where the specified file permissions started with - to subtract perms, which
+      // get picked up by the option parser as command flags.
+      // If we are down by one argument and options starts with -, shift everything over.
+      filePattern = mode;
+      mode = options;
+      options = '';
+    }
+    else {
+      common.error('You must specify a file.');
+    }
+  }
+
+  options = common.parseOptions(options, {
+    'R': 'recursive',
+    'c': 'changes',
+    'v': 'verbose'
+  });
+
+  if (typeof filePattern === 'string') {
+    filePattern = [ filePattern ];
+  }
+
+  var files;
+
+  if (options.recursive) {
+    files = [];
+    common.expand(filePattern).forEach(function addFile(expandedFile) {
+      var stat = fs.lstatSync(expandedFile);
+
+      if (!stat.isSymbolicLink()) {
+        files.push(expandedFile);
+
+        if (stat.isDirectory()) {  // intentionally does not follow symlinks.
+          fs.readdirSync(expandedFile).forEach(function (child) {
+            addFile(expandedFile + '/' + child);
+          });
+        }
+      }
+    });
+  }
+  else {
+    files = common.expand(filePattern);
+  }
+
+  files.forEach(function innerChmod(file) {
+    file = path.resolve(file);
+    if (!fs.existsSync(file)) {
+      common.error('File not found: ' + file);
+    }
+
+    // When recursing, don't follow symlinks.
+    if (options.recursive && fs.lstatSync(file).isSymbolicLink()) {
+      return;
+    }
+
+    var perms = fs.statSync(file).mode;
+    var type = perms & PERMS.TYPE_MASK;
+
+    var newPerms = perms;
+
+    if (isNaN(parseInt(mode, 8))) {
+      // parse options
+      mode.split(',').forEach(function (symbolicMode) {
+        /*jshint regexdash:true */
+        var pattern = /([ugoa]*)([=\+-])([rwxXst]*)/i;
+        var matches = pattern.exec(symbolicMode);
+
+        if (matches) {
+          var applyTo = matches[1];
+          var operator = matches[2];
+          var change = matches[3];
+
+          var changeOwner = applyTo.indexOf('u') != -1 || applyTo === 'a' || applyTo === '';
+          var changeGroup = applyTo.indexOf('g') != -1 || applyTo === 'a' || applyTo === '';
+          var changeOther = applyTo.indexOf('o') != -1 || applyTo === 'a' || applyTo === '';
+
+          var changeRead   = change.indexOf('r') != -1;
+          var changeWrite  = change.indexOf('w') != -1;
+          var changeExec   = change.indexOf('x') != -1;
+          var changeSticky = change.indexOf('t') != -1;
+          var changeSetuid = change.indexOf('s') != -1;
+
+          var mask = 0;
+          if (changeOwner) {
+            mask |= (changeRead ? PERMS.OWNER_READ : 0) + (changeWrite ? PERMS.OWNER_WRITE : 0) + (changeExec ? PERMS.OWNER_EXEC : 0) + (changeSetuid ? PERMS.SETUID : 0);
+          }
+          if (changeGroup) {
+            mask |= (changeRead ? PERMS.GROUP_READ : 0) + (changeWrite ? PERMS.GROUP_WRITE : 0) + (changeExec ? PERMS.GROUP_EXEC : 0) + (changeSetuid ? PERMS.SETGID : 0);
+          }
+          if (changeOther) {
+            mask |= (changeRead ? PERMS.OTHER_READ : 0) + (changeWrite ? PERMS.OTHER_WRITE : 0) + (changeExec ? PERMS.OTHER_EXEC : 0);
+          }
+
+          // Sticky bit is special - it's not tied to user, group or other.
+          if (changeSticky) {
+            mask |= PERMS.STICKY;
+          }
+
+          switch (operator) {
+            case '+':
+              newPerms |= mask;
+              break;
+
+            case '-':
+              newPerms &= ~mask;
+              break;
+
+            case '=':
+              newPerms = type + mask;
+
+              // According to POSIX, when using = to explicitly set the permissions, setuid and setgid can never be cleared.
+              if (fs.statSync(file).isDirectory()) {
+                newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms;
+              }
+              break;
+          }
+
+          if (options.verbose) {
+            log(file + ' -> ' + newPerms.toString(8));
+          }
+
+          if (perms != newPerms) {
+            if (!options.verbose && options.changes) {
+              log(file + ' -> ' + newPerms.toString(8));
+            }
+            fs.chmodSync(file, newPerms);
+          }
+        }
+        else {
+          common.error('Invalid symbolic mode change: ' + symbolicMode);
+        }
+      });
+    }
+    else {
+      // they gave us a full number
+      newPerms = type + parseInt(mode, 8);
+
+      // POSIX rules are that setuid and setgid can only be added using numeric form, but not cleared.
+      if (fs.statSync(file).isDirectory()) {
+        newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms;
+      }
+
+      fs.chmodSync(file, newPerms);
+    }
+  });
+}
+module.exports = _chmod;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/common.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/common.js
new file mode 100644 (file)
index 0000000..d8c2312
--- /dev/null
@@ -0,0 +1,203 @@
+var os = require('os');
+var fs = require('fs');
+var _ls = require('./ls');
+
+// Module globals
+var config = {
+  silent: false,
+  fatal: false
+};
+exports.config = config;
+
+var state = {
+  error: null,
+  currentCmd: 'shell.js',
+  tempDir: null
+};
+exports.state = state;
+
+var platform = os.type().match(/^Win/) ? 'win' : 'unix';
+exports.platform = platform;
+
+function log() {
+  if (!config.silent)
+    console.log.apply(this, arguments);
+}
+exports.log = log;
+
+// Shows error message. Throws unless _continue or config.fatal are true
+function error(msg, _continue) {
+  if (state.error === null)
+    state.error = '';
+  state.error += state.currentCmd + ': ' + msg + '\n';
+
+  if (msg.length > 0)
+    log(state.error);
+
+  if (config.fatal)
+    process.exit(1);
+
+  if (!_continue)
+    throw '';
+}
+exports.error = error;
+
+// In the future, when Proxies are default, we can add methods like `.to()` to primitive strings.
+// For now, this is a dummy function to bookmark places we need such strings
+function ShellString(str) {
+  return str;
+}
+exports.ShellString = ShellString;
+
+// Returns {'alice': true, 'bob': false} when passed a dictionary, e.g.:
+//   parseOptions('-a', {'a':'alice', 'b':'bob'});
+function parseOptions(str, map) {
+  if (!map)
+    error('parseOptions() internal error: no map given');
+
+  // All options are false by default
+  var options = {};
+  for (var letter in map)
+    options[map[letter]] = false;
+
+  if (!str)
+    return options; // defaults
+
+  if (typeof str !== 'string')
+    error('parseOptions() internal error: wrong str');
+
+  // e.g. match[1] = 'Rf' for str = '-Rf'
+  var match = str.match(/^\-(.+)/);
+  if (!match)
+    return options;
+
+  // e.g. chars = ['R', 'f']
+  var chars = match[1].split('');
+
+  chars.forEach(function(c) {
+    if (c in map)
+      options[map[c]] = true;
+    else
+      error('option not recognized: '+c);
+  });
+
+  return options;
+}
+exports.parseOptions = parseOptions;
+
+// Expands wildcards with matching (ie. existing) file names.
+// For example:
+//   expand(['file*.js']) = ['file1.js', 'file2.js', ...]
+//   (if the files 'file1.js', 'file2.js', etc, exist in the current dir)
+function expand(list) {
+  var expanded = [];
+  list.forEach(function(listEl) {
+    // Wildcard present on directory names ?
+    if(listEl.search(/\*[^\/]*\//) > -1 || listEl.search(/\*\*[^\/]*\//) > -1) {
+      var match = listEl.match(/^([^*]+\/|)(.*)/);
+      var root = match[1];
+      var rest = match[2];
+      var restRegex = rest.replace(/\*\*/g, ".*").replace(/\*/g, "[^\\/]*");
+      restRegex = new RegExp(restRegex);
+      
+      _ls('-R', root).filter(function (e) {
+        return restRegex.test(e);
+      }).forEach(function(file) {
+        expanded.push(file);
+      });
+    }
+    // Wildcard present on file names ?
+    else if (listEl.search(/\*/) > -1) {
+      _ls('', listEl).forEach(function(file) {
+        expanded.push(file);
+      });
+    } else {
+      expanded.push(listEl);
+    }
+  });
+  return expanded;
+}
+exports.expand = expand;
+
+// Normalizes _unlinkSync() across platforms to match Unix behavior, i.e.
+// file can be unlinked even if it's read-only, see https://github.com/joyent/node/issues/3006
+function unlinkSync(file) {
+  try {
+    fs.unlinkSync(file);
+  } catch(e) {
+    // Try to override file permission
+    if (e.code === 'EPERM') {
+      fs.chmodSync(file, '0666');
+      fs.unlinkSync(file);
+    } else {
+      throw e;
+    }
+  }
+}
+exports.unlinkSync = unlinkSync;
+
+// e.g. 'shelljs_a5f185d0443ca...'
+function randomFileName() {
+  function randomHash(count) {
+    if (count === 1)
+      return parseInt(16*Math.random(), 10).toString(16);
+    else {
+      var hash = '';
+      for (var i=0; i<count; i++)
+        hash += randomHash(1);
+      return hash;
+    }
+  }
+
+  return 'shelljs_'+randomHash(20);
+}
+exports.randomFileName = randomFileName;
+
+// extend(target_obj, source_obj1 [, source_obj2 ...])
+// Shallow extend, e.g.:
+//    extend({A:1}, {b:2}, {c:3}) returns {A:1, b:2, c:3}
+function extend(target) {
+  var sources = [].slice.call(arguments, 1);
+  sources.forEach(function(source) {
+    for (var key in source)
+      target[key] = source[key];
+  });
+
+  return target;
+}
+exports.extend = extend;
+
+// Common wrapper for all Unix-like commands
+function wrap(cmd, fn, options) {
+  return function() {
+    var retValue = null;
+
+    state.currentCmd = cmd;
+    state.error = null;
+
+    try {
+      var args = [].slice.call(arguments, 0);
+
+      if (options && options.notUnix) {
+        retValue = fn.apply(this, args);
+      } else {
+        if (args.length === 0 || typeof args[0] !== 'string' || args[0][0] !== '-')
+          args.unshift(''); // only add dummy option if '-option' not already present
+        retValue = fn.apply(this, args);
+      }
+    } catch (e) {
+      if (!state.error) {
+        // If state.error hasn't been set it's an error thrown by Node, not us - probably a bug...
+        console.log('shell.js: internal error');
+        console.log(e.stack || e);
+        process.exit(1);
+      }
+      if (config.fatal)
+        throw e;
+    }
+
+    state.currentCmd = 'shell.js';
+    return retValue;
+  };
+} // wrap
+exports.wrap = wrap;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/cp.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/cp.js
new file mode 100644 (file)
index 0000000..ef19f96
--- /dev/null
@@ -0,0 +1,204 @@
+var fs = require('fs');
+var path = require('path');
+var common = require('./common');
+var os = require('os');
+
+// Buffered file copy, synchronous
+// (Using readFileSync() + writeFileSync() could easily cause a memory overflow
+//  with large files)
+function copyFileSync(srcFile, destFile) {
+  if (!fs.existsSync(srcFile))
+    common.error('copyFileSync: no such file or directory: ' + srcFile);
+
+  var BUF_LENGTH = 64*1024,
+      buf = new Buffer(BUF_LENGTH),
+      bytesRead = BUF_LENGTH,
+      pos = 0,
+      fdr = null,
+      fdw = null;
+
+  try {
+    fdr = fs.openSync(srcFile, 'r');
+  } catch(e) {
+    common.error('copyFileSync: could not read src file ('+srcFile+')');
+  }
+
+  try {
+    fdw = fs.openSync(destFile, 'w');
+  } catch(e) {
+    common.error('copyFileSync: could not write to dest file (code='+e.code+'):'+destFile);
+  }
+
+  while (bytesRead === BUF_LENGTH) {
+    bytesRead = fs.readSync(fdr, buf, 0, BUF_LENGTH, pos);
+    fs.writeSync(fdw, buf, 0, bytesRead);
+    pos += bytesRead;
+  }
+
+  fs.closeSync(fdr);
+  fs.closeSync(fdw);
+
+  fs.chmodSync(destFile, fs.statSync(srcFile).mode);
+}
+
+// Recursively copies 'sourceDir' into 'destDir'
+// Adapted from https://github.com/ryanmcgrath/wrench-js
+//
+// Copyright (c) 2010 Ryan McGrath
+// Copyright (c) 2012 Artur Adib
+//
+// Licensed under the MIT License
+// http://www.opensource.org/licenses/mit-license.php
+function cpdirSyncRecursive(sourceDir, destDir, opts) {
+  if (!opts) opts = {};
+
+  /* Create the directory where all our junk is moving to; read the mode of the source directory and mirror it */
+  var checkDir = fs.statSync(sourceDir);
+  try {
+    fs.mkdirSync(destDir, checkDir.mode);
+  } catch (e) {
+    //if the directory already exists, that's okay
+    if (e.code !== 'EEXIST') throw e;
+  }
+
+  var files = fs.readdirSync(sourceDir);
+
+  for (var i = 0; i < files.length; i++) {
+    var srcFile = sourceDir + "/" + files[i];
+    var destFile = destDir + "/" + files[i];
+    var srcFileStat = fs.lstatSync(srcFile);
+
+    if (srcFileStat.isDirectory()) {
+      /* recursion this thing right on back. */
+      cpdirSyncRecursive(srcFile, destFile, opts);
+    } else if (srcFileStat.isSymbolicLink()) {
+      var symlinkFull = fs.readlinkSync(srcFile);
+      fs.symlinkSync(symlinkFull, destFile, os.platform() === "win32" ? "junction" : null);
+    } else {
+      /* At this point, we've hit a file actually worth copying... so copy it on over. */
+      if (fs.existsSync(destFile) && !opts.force) {
+        common.log('skipping existing file: ' + files[i]);
+      } else {
+        copyFileSync(srcFile, destFile);
+      }
+    }
+
+  } // for files
+} // cpdirSyncRecursive
+
+
+//@
+//@ ### cp([options ,] source [,source ...], dest)
+//@ ### cp([options ,] source_array, dest)
+//@ Available options:
+//@
+//@ + `-f`: force
+//@ + `-r, -R`: recursive
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ cp('file1', 'dir1');
+//@ cp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp');
+//@ cp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above
+//@ ```
+//@
+//@ Copies files. The wildcard `*` is accepted.
+function _cp(options, sources, dest) {
+  options = common.parseOptions(options, {
+    'f': 'force',
+    'R': 'recursive',
+    'r': 'recursive'
+  });
+
+  // Get sources, dest
+  if (arguments.length < 3) {
+    common.error('missing <source> and/or <dest>');
+  } else if (arguments.length > 3) {
+    sources = [].slice.call(arguments, 1, arguments.length - 1);
+    dest = arguments[arguments.length - 1];
+  } else if (typeof sources === 'string') {
+    sources = [sources];
+  } else if ('length' in sources) {
+    sources = sources; // no-op for array
+  } else {
+    common.error('invalid arguments');
+  }
+
+  var exists = fs.existsSync(dest),
+      stats = exists && fs.statSync(dest);
+
+  // Dest is not existing dir, but multiple sources given
+  if ((!exists || !stats.isDirectory()) && sources.length > 1)
+    common.error('dest is not a directory (too many sources)');
+
+  // Dest is an existing file, but no -f given
+  if (exists && stats.isFile() && !options.force)
+    common.error('dest file already exists: ' + dest);
+
+  if (options.recursive) {
+    // Recursive allows the shortcut syntax "sourcedir/" for "sourcedir/*"
+    // (see Github issue #15)
+    sources.forEach(function(src, i) {
+      if (src[src.length - 1] === '/')
+        sources[i] += '*';
+    });
+
+    // Create dest
+    try {
+      fs.mkdirSync(dest, parseInt('0777', 8));
+    } catch (e) {
+      // like Unix's cp, keep going even if we can't create dest dir
+    }
+  }
+
+  sources = common.expand(sources);
+
+  sources.forEach(function(src) {
+    if (!fs.existsSync(src)) {
+      common.error('no such file or directory: '+src, true);
+      return; // skip file
+    }
+
+    // If here, src exists
+    if (fs.statSync(src).isDirectory()) {
+      if (!options.recursive) {
+        // Non-Recursive
+        common.log(src + ' is a directory (not copied)');
+      } else {
+        // Recursive
+        // 'cp /a/source dest' should create 'source' in 'dest'
+        var newDest = path.join(dest, path.basename(src)),
+            checkDir = fs.statSync(src);
+        try {
+          fs.mkdirSync(newDest, checkDir.mode);
+        } catch (e) {
+          //if the directory already exists, that's okay
+          if (e.code !== 'EEXIST') {
+            common.error('dest file no such file or directory: ' + newDest, true);
+            throw e;
+          }
+        }
+
+        cpdirSyncRecursive(src, newDest, {force: options.force});
+      }
+      return; // done with dir
+    }
+
+    // If here, src is a file
+
+    // When copying to '/path/dir':
+    //    thisDest = '/path/dir/file1'
+    var thisDest = dest;
+    if (fs.existsSync(dest) && fs.statSync(dest).isDirectory())
+      thisDest = path.normalize(dest + '/' + path.basename(src));
+
+    if (fs.existsSync(thisDest) && !options.force) {
+      common.error('dest file already exists: ' + thisDest, true);
+      return; // skip file
+    }
+
+    copyFileSync(src, thisDest);
+  }); // forEach(src)
+}
+module.exports = _cp;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/dirs.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/dirs.js
new file mode 100644 (file)
index 0000000..58fae8b
--- /dev/null
@@ -0,0 +1,191 @@
+var common = require('./common');
+var _cd = require('./cd');
+var path = require('path');
+
+// Pushd/popd/dirs internals
+var _dirStack = [];
+
+function _isStackIndex(index) {
+  return (/^[\-+]\d+$/).test(index);
+}
+
+function _parseStackIndex(index) {
+  if (_isStackIndex(index)) {
+    if (Math.abs(index) < _dirStack.length + 1) { // +1 for pwd
+      return (/^-/).test(index) ? Number(index) - 1 : Number(index);
+    } else {
+      common.error(index + ': directory stack index out of range');
+    }
+  } else {
+    common.error(index + ': invalid number');
+  }
+}
+
+function _actualDirStack() {
+  return [process.cwd()].concat(_dirStack);
+}
+
+//@
+//@ ### pushd([options,] [dir | '-N' | '+N'])
+//@
+//@ Available options:
+//@
+//@ + `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated.
+//@
+//@ Arguments:
+//@
+//@ + `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`.
+//@ + `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.
+//@ + `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ // process.cwd() === '/usr'
+//@ pushd('/etc'); // Returns /etc /usr
+//@ pushd('+1');   // Returns /usr /etc
+//@ ```
+//@
+//@ Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack.
+function _pushd(options, dir) {
+  if (_isStackIndex(options)) {
+    dir = options;
+    options = '';
+  }
+
+  options = common.parseOptions(options, {
+    'n' : 'no-cd'
+  });
+
+  var dirs = _actualDirStack();
+
+  if (dir === '+0') {
+    return dirs; // +0 is a noop
+  } else if (!dir) {
+    if (dirs.length > 1) {
+      dirs = dirs.splice(1, 1).concat(dirs);
+    } else {
+      return common.error('no other directory');
+    }
+  } else if (_isStackIndex(dir)) {
+    var n = _parseStackIndex(dir);
+    dirs = dirs.slice(n).concat(dirs.slice(0, n));
+  } else {
+    if (options['no-cd']) {
+      dirs.splice(1, 0, dir);
+    } else {
+      dirs.unshift(dir);
+    }
+  }
+
+  if (options['no-cd']) {
+    dirs = dirs.slice(1);
+  } else {
+    dir = path.resolve(dirs.shift());
+    _cd('', dir);
+  }
+
+  _dirStack = dirs;
+  return _dirs('');
+}
+exports.pushd = _pushd;
+
+//@
+//@ ### popd([options,] ['-N' | '+N'])
+//@
+//@ Available options:
+//@
+//@ + `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated.
+//@
+//@ Arguments:
+//@
+//@ + `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero.
+//@ + `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero.
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ echo(process.cwd()); // '/usr'
+//@ pushd('/etc');       // '/etc /usr'
+//@ echo(process.cwd()); // '/etc'
+//@ popd();              // '/usr'
+//@ echo(process.cwd()); // '/usr'
+//@ ```
+//@
+//@ When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack.
+function _popd(options, index) {
+  if (_isStackIndex(options)) {
+    index = options;
+    options = '';
+  }
+
+  options = common.parseOptions(options, {
+    'n' : 'no-cd'
+  });
+
+  if (!_dirStack.length) {
+    return common.error('directory stack empty');
+  }
+
+  index = _parseStackIndex(index || '+0');
+
+  if (options['no-cd'] || index > 0 || _dirStack.length + index === 0) {
+    index = index > 0 ? index - 1 : index;
+    _dirStack.splice(index, 1);
+  } else {
+    var dir = path.resolve(_dirStack.shift());
+    _cd('', dir);
+  }
+
+  return _dirs('');
+}
+exports.popd = _popd;
+
+//@
+//@ ### dirs([options | '+N' | '-N'])
+//@
+//@ Available options:
+//@
+//@ + `-c`: Clears the directory stack by deleting all of the elements.
+//@
+//@ Arguments:
+//@
+//@ + `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero.
+//@ + `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero.
+//@
+//@ Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified.
+//@
+//@ See also: pushd, popd
+function _dirs(options, index) {
+  if (_isStackIndex(options)) {
+    index = options;
+    options = '';
+  }
+
+  options = common.parseOptions(options, {
+    'c' : 'clear'
+  });
+
+  if (options['clear']) {
+    _dirStack = [];
+    return _dirStack;
+  }
+
+  var stack = _actualDirStack();
+
+  if (index) {
+    index = _parseStackIndex(index);
+
+    if (index < 0) {
+      index = stack.length + index;
+    }
+
+    common.log(stack[index]);
+    return stack[index];
+  }
+
+  common.log(stack.join(' '));
+
+  return stack;
+}
+exports.dirs = _dirs;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/echo.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/echo.js
new file mode 100644 (file)
index 0000000..760ea84
--- /dev/null
@@ -0,0 +1,20 @@
+var common = require('./common');
+
+//@
+//@ ### echo(string [,string ...])
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ echo('hello world');
+//@ var str = echo('hello world');
+//@ ```
+//@
+//@ Prints string to stdout, and returns string with additional utility methods
+//@ like `.to()`.
+function _echo() {
+  var messages = [].slice.call(arguments, 0);
+  console.log.apply(this, messages);
+  return common.ShellString(messages.join(' '));
+}
+module.exports = _echo;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/error.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/error.js
new file mode 100644 (file)
index 0000000..cca3efb
--- /dev/null
@@ -0,0 +1,10 @@
+var common = require('./common');
+
+//@
+//@ ### error()
+//@ Tests if error occurred in the last command. Returns `null` if no error occurred,
+//@ otherwise returns string explaining the error
+function error() {
+  return common.state.error;
+};
+module.exports = error;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/exec.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/exec.js
new file mode 100644 (file)
index 0000000..d259a9f
--- /dev/null
@@ -0,0 +1,216 @@
+var common = require('./common');
+var _tempDir = require('./tempdir');
+var _pwd = require('./pwd');
+var path = require('path');
+var fs = require('fs');
+var child = require('child_process');
+
+// Hack to run child_process.exec() synchronously (sync avoids callback hell)
+// Uses a custom wait loop that checks for a flag file, created when the child process is done.
+// (Can't do a wait loop that checks for internal Node variables/messages as
+// Node is single-threaded; callbacks and other internal state changes are done in the
+// event loop).
+function execSync(cmd, opts) {
+  var tempDir = _tempDir();
+  var stdoutFile = path.resolve(tempDir+'/'+common.randomFileName()),
+      codeFile = path.resolve(tempDir+'/'+common.randomFileName()),
+      scriptFile = path.resolve(tempDir+'/'+common.randomFileName()),
+      sleepFile = path.resolve(tempDir+'/'+common.randomFileName());
+
+  var options = common.extend({
+    silent: common.config.silent
+  }, opts);
+
+  var previousStdoutContent = '';
+  // Echoes stdout changes from running process, if not silent
+  function updateStdout() {
+    if (options.silent || !fs.existsSync(stdoutFile))
+      return;
+
+    var stdoutContent = fs.readFileSync(stdoutFile, 'utf8');
+    // No changes since last time?
+    if (stdoutContent.length <= previousStdoutContent.length)
+      return;
+
+    process.stdout.write(stdoutContent.substr(previousStdoutContent.length));
+    previousStdoutContent = stdoutContent;
+  }
+
+  function escape(str) {
+    return (str+'').replace(/([\\"'])/g, "\\$1").replace(/\0/g, "\\0");
+  }
+
+  if (fs.existsSync(scriptFile)) common.unlinkSync(scriptFile);
+  if (fs.existsSync(stdoutFile)) common.unlinkSync(stdoutFile);
+  if (fs.existsSync(codeFile)) common.unlinkSync(codeFile);
+
+  var execCommand = '"'+process.execPath+'" '+scriptFile;
+  var execOptions = {
+    env: process.env,
+    cwd: _pwd(),
+    maxBuffer: 20*1024*1024
+  };
+
+  if (typeof child.execSync === 'function') {
+    var script = [
+      "var child = require('child_process')",
+      "  , fs = require('fs');",
+      "var childProcess = child.exec('"+escape(cmd)+"', {env: process.env, maxBuffer: 20*1024*1024}, function(err) {",
+      "  fs.writeFileSync('"+escape(codeFile)+"', err ? err.code.toString() : '0');",
+      "});",
+      "var stdoutStream = fs.createWriteStream('"+escape(stdoutFile)+"');",
+      "childProcess.stdout.pipe(stdoutStream, {end: false});",
+      "childProcess.stderr.pipe(stdoutStream, {end: false});",
+      "childProcess.stdout.pipe(process.stdout);",
+      "childProcess.stderr.pipe(process.stderr);",
+      "var stdoutEnded = false, stderrEnded = false;",
+      "function tryClosing(){ if(stdoutEnded && stderrEnded){ stdoutStream.end(); } }",
+      "childProcess.stdout.on('end', function(){ stdoutEnded = true; tryClosing(); });",
+      "childProcess.stderr.on('end', function(){ stderrEnded = true; tryClosing(); });"
+    ].join('\n');
+
+    fs.writeFileSync(scriptFile, script);
+
+    if (options.silent) {
+      execOptions.stdio = 'ignore';
+    } else {
+      execOptions.stdio = [0, 1, 2];
+    }
+
+    // Welcome to the future
+    child.execSync(execCommand, execOptions);
+  } else {
+    cmd += ' > '+stdoutFile+' 2>&1'; // works on both win/unix
+
+    var script = [
+      "var child = require('child_process')",
+      "  , fs = require('fs');",
+      "var childProcess = child.exec('"+escape(cmd)+"', {env: process.env, maxBuffer: 20*1024*1024}, function(err) {",
+      "  fs.writeFileSync('"+escape(codeFile)+"', err ? err.code.toString() : '0');",
+      "});"
+    ].join('\n');
+
+    fs.writeFileSync(scriptFile, script);
+
+    child.exec(execCommand, execOptions);
+
+    // The wait loop
+    // sleepFile is used as a dummy I/O op to mitigate unnecessary CPU usage
+    // (tried many I/O sync ops, writeFileSync() seems to be only one that is effective in reducing
+    // CPU usage, though apparently not so much on Windows)
+    while (!fs.existsSync(codeFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); }
+    while (!fs.existsSync(stdoutFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); }
+  }
+
+  // At this point codeFile exists, but it's not necessarily flushed yet.
+  // Keep reading it until it is.
+  var code = parseInt('', 10);
+  while (isNaN(code)) {
+    code = parseInt(fs.readFileSync(codeFile, 'utf8'), 10);
+  }
+
+  var stdout = fs.readFileSync(stdoutFile, 'utf8');
+
+  // No biggie if we can't erase the files now -- they're in a temp dir anyway
+  try { common.unlinkSync(scriptFile); } catch(e) {}
+  try { common.unlinkSync(stdoutFile); } catch(e) {}
+  try { common.unlinkSync(codeFile); } catch(e) {}
+  try { common.unlinkSync(sleepFile); } catch(e) {}
+
+  // some shell return codes are defined as errors, per http://tldp.org/LDP/abs/html/exitcodes.html
+  if (code === 1 || code === 2 || code >= 126)  {
+      common.error('', true); // unix/shell doesn't really give an error message after non-zero exit codes
+  }
+  // True if successful, false if not
+  var obj = {
+    code: code,
+    output: stdout
+  };
+  return obj;
+} // execSync()
+
+// Wrapper around exec() to enable echoing output to console in real time
+function execAsync(cmd, opts, callback) {
+  var output = '';
+
+  var options = common.extend({
+    silent: common.config.silent
+  }, opts);
+
+  var c = child.exec(cmd, {env: process.env, maxBuffer: 20*1024*1024}, function(err) {
+    if (callback)
+      callback(err ? err.code : 0, output);
+  });
+
+  c.stdout.on('data', function(data) {
+    output += data;
+    if (!options.silent)
+      process.stdout.write(data);
+  });
+
+  c.stderr.on('data', function(data) {
+    output += data;
+    if (!options.silent)
+      process.stdout.write(data);
+  });
+
+  return c;
+}
+
+//@
+//@ ### exec(command [, options] [, callback])
+//@ Available options (all `false` by default):
+//@
+//@ + `async`: Asynchronous execution. Defaults to true if a callback is provided.
+//@ + `silent`: Do not echo program output to console.
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ var version = exec('node --version', {silent:true}).output;
+//@
+//@ var child = exec('some_long_running_process', {async:true});
+//@ child.stdout.on('data', function(data) {
+//@   /* ... do something with data ... */
+//@ });
+//@
+//@ exec('some_long_running_process', function(code, output) {
+//@   console.log('Exit code:', code);
+//@   console.log('Program output:', output);
+//@ });
+//@ ```
+//@
+//@ Executes the given `command` _synchronously_, unless otherwise specified.
+//@ When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's
+//@ `output` (stdout + stderr)  and its exit `code`. Otherwise returns the child process object, and
+//@ the `callback` gets the arguments `(code, output)`.
+//@
+//@ **Note:** For long-lived processes, it's best to run `exec()` asynchronously as
+//@ the current synchronous implementation uses a lot of CPU. This should be getting
+//@ fixed soon.
+function _exec(command, options, callback) {
+  if (!command)
+    common.error('must specify command');
+
+  // Callback is defined instead of options.
+  if (typeof options === 'function') {
+    callback = options;
+    options = { async: true };
+  }
+
+  // Callback is defined with options.
+  if (typeof options === 'object' && typeof callback === 'function') {
+    options.async = true;
+  }
+
+  options = common.extend({
+    silent: common.config.silent,
+    async: false
+  }, options);
+
+  if (options.async)
+    return execAsync(command, options, callback);
+  else
+    return execSync(command, options);
+}
+module.exports = _exec;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/find.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/find.js
new file mode 100644 (file)
index 0000000..d9eeec2
--- /dev/null
@@ -0,0 +1,51 @@
+var fs = require('fs');
+var common = require('./common');
+var _ls = require('./ls');
+
+//@
+//@ ### find(path [,path ...])
+//@ ### find(path_array)
+//@ Examples:
+//@
+//@ ```javascript
+//@ find('src', 'lib');
+//@ find(['src', 'lib']); // same as above
+//@ find('.').filter(function(file) { return file.match(/\.js$/); });
+//@ ```
+//@
+//@ Returns array of all files (however deep) in the given paths.
+//@
+//@ The main difference from `ls('-R', path)` is that the resulting file names
+//@ include the base directories, e.g. `lib/resources/file1` instead of just `file1`.
+function _find(options, paths) {
+  if (!paths)
+    common.error('no path specified');
+  else if (typeof paths === 'object')
+    paths = paths; // assume array
+  else if (typeof paths === 'string')
+    paths = [].slice.call(arguments, 1);
+
+  var list = [];
+
+  function pushFile(file) {
+    if (common.platform === 'win')
+      file = file.replace(/\\/g, '/');
+    list.push(file);
+  }
+
+  // why not simply do ls('-R', paths)? because the output wouldn't give the base dirs
+  // to get the base dir in the output, we need instead ls('-R', 'dir/*') for every directory
+
+  paths.forEach(function(file) {
+    pushFile(file);
+
+    if (fs.statSync(file).isDirectory()) {
+      _ls('-RA', file+'/*').forEach(function(subfile) {
+        pushFile(subfile);
+      });
+    }
+  });
+
+  return list;
+}
+module.exports = _find;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/grep.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/grep.js
new file mode 100644 (file)
index 0000000..00c7d6a
--- /dev/null
@@ -0,0 +1,52 @@
+var common = require('./common');
+var fs = require('fs');
+
+//@
+//@ ### grep([options ,] regex_filter, file [, file ...])
+//@ ### grep([options ,] regex_filter, file_array)
+//@ Available options:
+//@
+//@ + `-v`: Inverse the sense of the regex and print the lines not matching the criteria.
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ grep('-v', 'GLOBAL_VARIABLE', '*.js');
+//@ grep('GLOBAL_VARIABLE', '*.js');
+//@ ```
+//@
+//@ Reads input string from given files and returns a string containing all lines of the
+//@ file that match the given `regex_filter`. Wildcard `*` accepted.
+function _grep(options, regex, files) {
+  options = common.parseOptions(options, {
+    'v': 'inverse'
+  });
+
+  if (!files)
+    common.error('no paths given');
+
+  if (typeof files === 'string')
+    files = [].slice.call(arguments, 2);
+  // if it's array leave it as it is
+
+  files = common.expand(files);
+
+  var grep = '';
+  files.forEach(function(file) {
+    if (!fs.existsSync(file)) {
+      common.error('no such file or directory: ' + file, true);
+      return;
+    }
+
+    var contents = fs.readFileSync(file, 'utf8'),
+        lines = contents.split(/\r*\n/);
+    lines.forEach(function(line) {
+      var matched = line.match(regex);
+      if ((options.inverse && !matched) || (!options.inverse && matched))
+        grep += line + '\n';
+    });
+  });
+
+  return common.ShellString(grep);
+}
+module.exports = _grep;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/ln.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/ln.js
new file mode 100644 (file)
index 0000000..a7b9701
--- /dev/null
@@ -0,0 +1,53 @@
+var fs = require('fs');
+var path = require('path');
+var common = require('./common');
+var os = require('os');
+
+//@
+//@ ### ln(options, source, dest)
+//@ ### ln(source, dest)
+//@ Available options:
+//@
+//@ + `s`: symlink
+//@ + `f`: force
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ ln('file', 'newlink');
+//@ ln('-sf', 'file', 'existing');
+//@ ```
+//@
+//@ Links source to dest. Use -f to force the link, should dest already exist.
+function _ln(options, source, dest) {
+  options = common.parseOptions(options, {
+    's': 'symlink',
+    'f': 'force'
+  });
+
+  if (!source || !dest) {
+    common.error('Missing <source> and/or <dest>');
+  }
+
+  source = path.resolve(process.cwd(), String(source));
+  dest = path.resolve(process.cwd(), String(dest));
+
+  if (!fs.existsSync(source)) {
+    common.error('Source file does not exist', true);
+  }
+
+  if (fs.existsSync(dest)) {
+    if (!options.force) {
+      common.error('Destination file exists', true);
+    }
+
+    fs.unlinkSync(dest);
+  }
+
+  if (options.symlink) {
+    fs.symlinkSync(source, dest, os.platform() === "win32" ? "junction" : null);
+  } else {
+    fs.linkSync(source, dest, os.platform() === "win32" ? "junction" : null);
+  }
+}
+module.exports = _ln;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/ls.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/ls.js
new file mode 100644 (file)
index 0000000..3345db4
--- /dev/null
@@ -0,0 +1,126 @@
+var path = require('path');
+var fs = require('fs');
+var common = require('./common');
+var _cd = require('./cd');
+var _pwd = require('./pwd');
+
+//@
+//@ ### ls([options ,] path [,path ...])
+//@ ### ls([options ,] path_array)
+//@ Available options:
+//@
+//@ + `-R`: recursive
+//@ + `-A`: all files (include files beginning with `.`, except for `.` and `..`)
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ ls('projs/*.js');
+//@ ls('-R', '/users/me', '/tmp');
+//@ ls('-R', ['/users/me', '/tmp']); // same as above
+//@ ```
+//@
+//@ Returns array of files in the given path, or in current directory if no path provided.
+function _ls(options, paths) {
+  options = common.parseOptions(options, {
+    'R': 'recursive',
+    'A': 'all',
+    'a': 'all_deprecated'
+  });
+
+  if (options.all_deprecated) {
+    // We won't support the -a option as it's hard to image why it's useful
+    // (it includes '.' and '..' in addition to '.*' files)
+    // For backwards compatibility we'll dump a deprecated message and proceed as before
+    common.log('ls: Option -a is deprecated. Use -A instead');
+    options.all = true;
+  }
+
+  if (!paths)
+    paths = ['.'];
+  else if (typeof paths === 'object')
+    paths = paths; // assume array
+  else if (typeof paths === 'string')
+    paths = [].slice.call(arguments, 1);
+
+  var list = [];
+
+  // Conditionally pushes file to list - returns true if pushed, false otherwise
+  // (e.g. prevents hidden files to be included unless explicitly told so)
+  function pushFile(file, query) {
+    // hidden file?
+    if (path.basename(file)[0] === '.') {
+      // not explicitly asking for hidden files?
+      if (!options.all && !(path.basename(query)[0] === '.' && path.basename(query).length > 1))
+        return false;
+    }
+
+    if (common.platform === 'win')
+      file = file.replace(/\\/g, '/');
+
+    list.push(file);
+    return true;
+  }
+
+  paths.forEach(function(p) {
+    if (fs.existsSync(p)) {
+      var stats = fs.statSync(p);
+      // Simple file?
+      if (stats.isFile()) {
+        pushFile(p, p);
+        return; // continue
+      }
+
+      // Simple dir?
+      if (stats.isDirectory()) {
+        // Iterate over p contents
+        fs.readdirSync(p).forEach(function(file) {
+          if (!pushFile(file, p))
+            return;
+
+          // Recursive?
+          if (options.recursive) {
+            var oldDir = _pwd();
+            _cd('', p);
+            if (fs.statSync(file).isDirectory())
+              list = list.concat(_ls('-R'+(options.all?'A':''), file+'/*'));
+            _cd('', oldDir);
+          }
+        });
+        return; // continue
+      }
+    }
+
+    // p does not exist - possible wildcard present
+
+    var basename = path.basename(p);
+    var dirname = path.dirname(p);
+    // Wildcard present on an existing dir? (e.g. '/tmp/*.js')
+    if (basename.search(/\*/) > -1 && fs.existsSync(dirname) && fs.statSync(dirname).isDirectory) {
+      // Escape special regular expression chars
+      var regexp = basename.replace(/(\^|\$|\(|\)|<|>|\[|\]|\{|\}|\.|\+|\?)/g, '\\$1');
+      // Translates wildcard into regex
+      regexp = '^' + regexp.replace(/\*/g, '.*') + '$';
+      // Iterate over directory contents
+      fs.readdirSync(dirname).forEach(function(file) {
+        if (file.match(new RegExp(regexp))) {
+          if (!pushFile(path.normalize(dirname+'/'+file), basename))
+            return;
+
+          // Recursive?
+          if (options.recursive) {
+            var pp = dirname + '/' + file;
+            if (fs.lstatSync(pp).isDirectory())
+              list = list.concat(_ls('-R'+(options.all?'A':''), pp+'/*'));
+          } // recursive
+        } // if file matches
+      }); // forEach
+      return;
+    }
+
+    common.error('no such file or directory: ' + p, true);
+  });
+
+  return list;
+}
+module.exports = _ls;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/mkdir.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/mkdir.js
new file mode 100644 (file)
index 0000000..5a7088f
--- /dev/null
@@ -0,0 +1,68 @@
+var common = require('./common');
+var fs = require('fs');
+var path = require('path');
+
+// Recursively creates 'dir'
+function mkdirSyncRecursive(dir) {
+  var baseDir = path.dirname(dir);
+
+  // Base dir exists, no recursion necessary
+  if (fs.existsSync(baseDir)) {
+    fs.mkdirSync(dir, parseInt('0777', 8));
+    return;
+  }
+
+  // Base dir does not exist, go recursive
+  mkdirSyncRecursive(baseDir);
+
+  // Base dir created, can create dir
+  fs.mkdirSync(dir, parseInt('0777', 8));
+}
+
+//@
+//@ ### mkdir([options ,] dir [, dir ...])
+//@ ### mkdir([options ,] dir_array)
+//@ Available options:
+//@
+//@ + `p`: full path (will create intermediate dirs if necessary)
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g');
+//@ mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above
+//@ ```
+//@
+//@ Creates directories.
+function _mkdir(options, dirs) {
+  options = common.parseOptions(options, {
+    'p': 'fullpath'
+  });
+  if (!dirs)
+    common.error('no paths given');
+
+  if (typeof dirs === 'string')
+    dirs = [].slice.call(arguments, 1);
+  // if it's array leave it as it is
+
+  dirs.forEach(function(dir) {
+    if (fs.existsSync(dir)) {
+      if (!options.fullpath)
+          common.error('path already exists: ' + dir, true);
+      return; // skip dir
+    }
+
+    // Base dir does not exist, and no -p option given
+    var baseDir = path.dirname(dir);
+    if (!fs.existsSync(baseDir) && !options.fullpath) {
+      common.error('no such file or directory: ' + baseDir, true);
+      return; // skip dir
+    }
+
+    if (options.fullpath)
+      mkdirSyncRecursive(dir);
+    else
+      fs.mkdirSync(dir, parseInt('0777', 8));
+  });
+} // mkdir
+module.exports = _mkdir;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/mv.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/mv.js
new file mode 100644 (file)
index 0000000..11f9607
--- /dev/null
@@ -0,0 +1,80 @@
+var fs = require('fs');
+var path = require('path');
+var common = require('./common');
+
+//@
+//@ ### mv(source [, source ...], dest')
+//@ ### mv(source_array, dest')
+//@ Available options:
+//@
+//@ + `f`: force
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ mv('-f', 'file', 'dir/');
+//@ mv('file1', 'file2', 'dir/');
+//@ mv(['file1', 'file2'], 'dir/'); // same as above
+//@ ```
+//@
+//@ Moves files. The wildcard `*` is accepted.
+function _mv(options, sources, dest) {
+  options = common.parseOptions(options, {
+    'f': 'force'
+  });
+
+  // Get sources, dest
+  if (arguments.length < 3) {
+    common.error('missing <source> and/or <dest>');
+  } else if (arguments.length > 3) {
+    sources = [].slice.call(arguments, 1, arguments.length - 1);
+    dest = arguments[arguments.length - 1];
+  } else if (typeof sources === 'string') {
+    sources = [sources];
+  } else if ('length' in sources) {
+    sources = sources; // no-op for array
+  } else {
+    common.error('invalid arguments');
+  }
+
+  sources = common.expand(sources);
+
+  var exists = fs.existsSync(dest),
+      stats = exists && fs.statSync(dest);
+
+  // Dest is not existing dir, but multiple sources given
+  if ((!exists || !stats.isDirectory()) && sources.length > 1)
+    common.error('dest is not a directory (too many sources)');
+
+  // Dest is an existing file, but no -f given
+  if (exists && stats.isFile() && !options.force)
+    common.error('dest file already exists: ' + dest);
+
+  sources.forEach(function(src) {
+    if (!fs.existsSync(src)) {
+      common.error('no such file or directory: '+src, true);
+      return; // skip file
+    }
+
+    // If here, src exists
+
+    // When copying to '/path/dir':
+    //    thisDest = '/path/dir/file1'
+    var thisDest = dest;
+    if (fs.existsSync(dest) && fs.statSync(dest).isDirectory())
+      thisDest = path.normalize(dest + '/' + path.basename(src));
+
+    if (fs.existsSync(thisDest) && !options.force) {
+      common.error('dest file already exists: ' + thisDest, true);
+      return; // skip file
+    }
+
+    if (path.resolve(src) === path.dirname(path.resolve(thisDest))) {
+      common.error('cannot move to self: '+src, true);
+      return; // skip file
+    }
+
+    fs.renameSync(src, thisDest);
+  }); // forEach(src)
+} // mv
+module.exports = _mv;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/popd.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/popd.js
new file mode 100644 (file)
index 0000000..11ea24f
--- /dev/null
@@ -0,0 +1 @@
+// see dirs.js
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/pushd.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/pushd.js
new file mode 100644 (file)
index 0000000..11ea24f
--- /dev/null
@@ -0,0 +1 @@
+// see dirs.js
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/pwd.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/pwd.js
new file mode 100644 (file)
index 0000000..41727bb
--- /dev/null
@@ -0,0 +1,11 @@
+var path = require('path');
+var common = require('./common');
+
+//@
+//@ ### pwd()
+//@ Returns the current directory.
+function _pwd(options) {
+  var pwd = path.resolve(process.cwd());
+  return common.ShellString(pwd);
+}
+module.exports = _pwd;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/rm.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/rm.js
new file mode 100644 (file)
index 0000000..bd608cb
--- /dev/null
@@ -0,0 +1,163 @@
+var common = require('./common');
+var fs = require('fs');
+
+// Recursively removes 'dir'
+// Adapted from https://github.com/ryanmcgrath/wrench-js
+//
+// Copyright (c) 2010 Ryan McGrath
+// Copyright (c) 2012 Artur Adib
+//
+// Licensed under the MIT License
+// http://www.opensource.org/licenses/mit-license.php
+function rmdirSyncRecursive(dir, force) {
+  var files;
+
+  files = fs.readdirSync(dir);
+
+  // Loop through and delete everything in the sub-tree after checking it
+  for(var i = 0; i < files.length; i++) {
+    var file = dir + "/" + files[i],
+        currFile = fs.lstatSync(file);
+
+    if(currFile.isDirectory()) { // Recursive function back to the beginning
+      rmdirSyncRecursive(file, force);
+    }
+
+    else if(currFile.isSymbolicLink()) { // Unlink symlinks
+      if (force || isWriteable(file)) {
+        try {
+          common.unlinkSync(file);
+        } catch (e) {
+          common.error('could not remove file (code '+e.code+'): ' + file, true);
+        }
+      }
+    }
+
+    else // Assume it's a file - perhaps a try/catch belongs here?
+      if (force || isWriteable(file)) {
+        try {
+          common.unlinkSync(file);
+        } catch (e) {
+          common.error('could not remove file (code '+e.code+'): ' + file, true);
+        }
+      }
+  }
+
+  // Now that we know everything in the sub-tree has been deleted, we can delete the main directory.
+  // Huzzah for the shopkeep.
+
+  var result;
+  try {
+    // Retry on windows, sometimes it takes a little time before all the files in the directory are gone
+    var start = Date.now();
+    while (true) {
+      try {
+        result = fs.rmdirSync(dir);
+        if (fs.existsSync(dir)) throw { code: "EAGAIN" }
+        break;
+      } catch(er) {
+        // In addition to error codes, also check if the directory still exists and loop again if true
+        if (process.platform === "win32" && (er.code === "ENOTEMPTY" || er.code === "EBUSY" || er.code === "EPERM" || er.code === "EAGAIN")) {
+          if (Date.now() - start > 1000) throw er;
+        } else if (er.code === "ENOENT") {
+          // Directory did not exist, deletion was successful
+          break;
+        } else {
+          throw er;
+        }
+      }
+    }
+  } catch(e) {
+    common.error('could not remove directory (code '+e.code+'): ' + dir, true);
+  }
+
+  return result;
+} // rmdirSyncRecursive
+
+// Hack to determine if file has write permissions for current user
+// Avoids having to check user, group, etc, but it's probably slow
+function isWriteable(file) {
+  var writePermission = true;
+  try {
+    var __fd = fs.openSync(file, 'a');
+    fs.closeSync(__fd);
+  } catch(e) {
+    writePermission = false;
+  }
+
+  return writePermission;
+}
+
+//@
+//@ ### rm([options ,] file [, file ...])
+//@ ### rm([options ,] file_array)
+//@ Available options:
+//@
+//@ + `-f`: force
+//@ + `-r, -R`: recursive
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ rm('-rf', '/tmp/*');
+//@ rm('some_file.txt', 'another_file.txt');
+//@ rm(['some_file.txt', 'another_file.txt']); // same as above
+//@ ```
+//@
+//@ Removes files. The wildcard `*` is accepted.
+function _rm(options, files) {
+  options = common.parseOptions(options, {
+    'f': 'force',
+    'r': 'recursive',
+    'R': 'recursive'
+  });
+  if (!files)
+    common.error('no paths given');
+
+  if (typeof files === 'string')
+    files = [].slice.call(arguments, 1);
+  // if it's array leave it as it is
+
+  files = common.expand(files);
+
+  files.forEach(function(file) {
+    if (!fs.existsSync(file)) {
+      // Path does not exist, no force flag given
+      if (!options.force)
+        common.error('no such file or directory: '+file, true);
+
+      return; // skip file
+    }
+
+    // If here, path exists
+
+    var stats = fs.lstatSync(file);
+    if (stats.isFile() || stats.isSymbolicLink()) {
+
+      // Do not check for file writing permissions
+      if (options.force) {
+        common.unlinkSync(file);
+        return;
+      }
+
+      if (isWriteable(file))
+        common.unlinkSync(file);
+      else
+        common.error('permission denied: '+file, true);
+
+      return;
+    } // simple file
+
+    // Path is an existing directory, but no -r flag given
+    if (stats.isDirectory() && !options.recursive) {
+      common.error('path is a directory', true);
+      return; // skip path
+    }
+
+    // Recursively remove existing directory
+    if (stats.isDirectory() && options.recursive) {
+      rmdirSyncRecursive(file, options.force);
+    }
+  }); // forEach(file)
+} // rm
+module.exports = _rm;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/sed.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/sed.js
new file mode 100644 (file)
index 0000000..65f7cb4
--- /dev/null
@@ -0,0 +1,43 @@
+var common = require('./common');
+var fs = require('fs');
+
+//@
+//@ ### sed([options ,] search_regex, replacement, file)
+//@ Available options:
+//@
+//@ + `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js');
+//@ sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js');
+//@ ```
+//@
+//@ Reads an input string from `file` and performs a JavaScript `replace()` on the input
+//@ using the given search regex and replacement string or function. Returns the new string after replacement.
+function _sed(options, regex, replacement, file) {
+  options = common.parseOptions(options, {
+    'i': 'inplace'
+  });
+
+  if (typeof replacement === 'string' || typeof replacement === 'function')
+    replacement = replacement; // no-op
+  else if (typeof replacement === 'number')
+    replacement = replacement.toString(); // fallback
+  else
+    common.error('invalid replacement string');
+
+  if (!file)
+    common.error('no file given');
+
+  if (!fs.existsSync(file))
+    common.error('no such file or directory: ' + file);
+
+  var result = fs.readFileSync(file, 'utf8').replace(regex, replacement);
+  if (options.inplace)
+    fs.writeFileSync(file, result, 'utf8');
+
+  return common.ShellString(result);
+}
+module.exports = _sed;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/tempdir.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/tempdir.js
new file mode 100644 (file)
index 0000000..45953c2
--- /dev/null
@@ -0,0 +1,56 @@
+var common = require('./common');
+var os = require('os');
+var fs = require('fs');
+
+// Returns false if 'dir' is not a writeable directory, 'dir' otherwise
+function writeableDir(dir) {
+  if (!dir || !fs.existsSync(dir))
+    return false;
+
+  if (!fs.statSync(dir).isDirectory())
+    return false;
+
+  var testFile = dir+'/'+common.randomFileName();
+  try {
+    fs.writeFileSync(testFile, ' ');
+    common.unlinkSync(testFile);
+    return dir;
+  } catch (e) {
+    return false;
+  }
+}
+
+
+//@
+//@ ### tempdir()
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ var tmp = tempdir(); // "/tmp" for most *nix platforms
+//@ ```
+//@
+//@ Searches and returns string containing a writeable, platform-dependent temporary directory.
+//@ Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir).
+function _tempDir() {
+  var state = common.state;
+  if (state.tempDir)
+    return state.tempDir; // from cache
+
+  state.tempDir = writeableDir(os.tempDir && os.tempDir()) || // node 0.8+
+                  writeableDir(process.env['TMPDIR']) ||
+                  writeableDir(process.env['TEMP']) ||
+                  writeableDir(process.env['TMP']) ||
+                  writeableDir(process.env['Wimp$ScrapDir']) || // RiscOS
+                  writeableDir('C:\\TEMP') || // Windows
+                  writeableDir('C:\\TMP') || // Windows
+                  writeableDir('\\TEMP') || // Windows
+                  writeableDir('\\TMP') || // Windows
+                  writeableDir('/tmp') ||
+                  writeableDir('/var/tmp') ||
+                  writeableDir('/usr/tmp') ||
+                  writeableDir('.'); // last resort
+
+  return state.tempDir;
+}
+module.exports = _tempDir;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/test.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/test.js
new file mode 100644 (file)
index 0000000..8a4ac7d
--- /dev/null
@@ -0,0 +1,85 @@
+var common = require('./common');
+var fs = require('fs');
+
+//@
+//@ ### test(expression)
+//@ Available expression primaries:
+//@
+//@ + `'-b', 'path'`: true if path is a block device
+//@ + `'-c', 'path'`: true if path is a character device
+//@ + `'-d', 'path'`: true if path is a directory
+//@ + `'-e', 'path'`: true if path exists
+//@ + `'-f', 'path'`: true if path is a regular file
+//@ + `'-L', 'path'`: true if path is a symboilc link
+//@ + `'-p', 'path'`: true if path is a pipe (FIFO)
+//@ + `'-S', 'path'`: true if path is a socket
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ if (test('-d', path)) { /* do something with dir */ };
+//@ if (!test('-f', path)) continue; // skip if it's a regular file
+//@ ```
+//@
+//@ Evaluates expression using the available primaries and returns corresponding value.
+function _test(options, path) {
+  if (!path)
+    common.error('no path given');
+
+  // hack - only works with unary primaries
+  options = common.parseOptions(options, {
+    'b': 'block',
+    'c': 'character',
+    'd': 'directory',
+    'e': 'exists',
+    'f': 'file',
+    'L': 'link',
+    'p': 'pipe',
+    'S': 'socket'
+  });
+
+  var canInterpret = false;
+  for (var key in options)
+    if (options[key] === true) {
+      canInterpret = true;
+      break;
+    }
+
+  if (!canInterpret)
+    common.error('could not interpret expression');
+
+  if (options.link) {
+    try {
+      return fs.lstatSync(path).isSymbolicLink();
+    } catch(e) {
+      return false;
+    }
+  }
+
+  if (!fs.existsSync(path))
+    return false;
+
+  if (options.exists)
+    return true;
+
+  var stats = fs.statSync(path);
+
+  if (options.block)
+    return stats.isBlockDevice();
+
+  if (options.character)
+    return stats.isCharacterDevice();
+
+  if (options.directory)
+    return stats.isDirectory();
+
+  if (options.file)
+    return stats.isFile();
+
+  if (options.pipe)
+    return stats.isFIFO();
+
+  if (options.socket)
+    return stats.isSocket();
+} // test
+module.exports = _test;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/to.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/to.js
new file mode 100644 (file)
index 0000000..f029999
--- /dev/null
@@ -0,0 +1,29 @@
+var common = require('./common');
+var fs = require('fs');
+var path = require('path');
+
+//@
+//@ ### 'string'.to(file)
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ cat('input.txt').to('output.txt');
+//@ ```
+//@
+//@ Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as
+//@ those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_
+function _to(options, file) {
+  if (!file)
+    common.error('wrong arguments');
+
+  if (!fs.existsSync( path.dirname(file) ))
+      common.error('no such file or directory: ' + path.dirname(file));
+
+  try {
+    fs.writeFileSync(file, this.toString(), 'utf8');
+  } catch(e) {
+    common.error('could not write to file (code '+e.code+'): '+file, true);
+  }
+}
+module.exports = _to;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/toEnd.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/toEnd.js
new file mode 100644 (file)
index 0000000..f6d099d
--- /dev/null
@@ -0,0 +1,29 @@
+var common = require('./common');
+var fs = require('fs');
+var path = require('path');
+
+//@
+//@ ### 'string'.toEnd(file)
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ cat('input.txt').toEnd('output.txt');
+//@ ```
+//@
+//@ Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as
+//@ those returned by `cat`, `grep`, etc).
+function _toEnd(options, file) {
+  if (!file)
+    common.error('wrong arguments');
+
+  if (!fs.existsSync( path.dirname(file) ))
+      common.error('no such file or directory: ' + path.dirname(file));
+
+  try {
+    fs.appendFileSync(file, this.toString(), 'utf8');
+  } catch(e) {
+    common.error('could not append to file (code '+e.code+'): '+file, true);
+  }
+}
+module.exports = _toEnd;
diff --git a/config/tizen/tpk-tools/cli/node_modules/shelljs/src/which.js b/config/tizen/tpk-tools/cli/node_modules/shelljs/src/which.js
new file mode 100644 (file)
index 0000000..2822ecf
--- /dev/null
@@ -0,0 +1,83 @@
+var common = require('./common');
+var fs = require('fs');
+var path = require('path');
+
+// Cross-platform method for splitting environment PATH variables
+function splitPath(p) {
+  for (i=1;i<2;i++) {}
+
+  if (!p)
+    return [];
+
+  if (common.platform === 'win')
+    return p.split(';');
+  else
+    return p.split(':');
+}
+
+function checkPath(path) {
+  return fs.existsSync(path) && fs.statSync(path).isDirectory() == false;
+}
+
+//@
+//@ ### which(command)
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ var nodeExec = which('node');
+//@ ```
+//@
+//@ Searches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions.
+//@ Returns string containing the absolute path to the command.
+function _which(options, cmd) {
+  if (!cmd)
+    common.error('must specify command');
+
+  var pathEnv = process.env.path || process.env.Path || process.env.PATH,
+      pathArray = splitPath(pathEnv),
+      where = null;
+
+  // No relative/absolute paths provided?
+  if (cmd.search(/\//) === -1) {
+    // Search for command in PATH
+    pathArray.forEach(function(dir) {
+      if (where)
+        return; // already found it
+
+      var attempt = path.resolve(dir + '/' + cmd);
+      if (checkPath(attempt)) {
+        where = attempt;
+        return;
+      }
+
+      if (common.platform === 'win') {
+        var baseAttempt = attempt;
+        attempt = baseAttempt + '.exe';
+        if (checkPath(attempt)) {
+          where = attempt;
+          return;
+        }
+        attempt = baseAttempt + '.cmd';
+        if (checkPath(attempt)) {
+          where = attempt;
+          return;
+        }
+        attempt = baseAttempt + '.bat';
+        if (checkPath(attempt)) {
+          where = attempt;
+          return;
+        }
+      } // if 'win'
+    });
+  }
+
+  // Command not found anywhere?
+  if (!checkPath(cmd) && !where)
+    return null;
+
+  where = where || path.resolve(cmd);
+
+  return common.ShellString(where);
+}
+module.exports = _which;
diff --git a/config/tizen/tpk-tools/cli/node_modules/string-template/.npmignore b/config/tizen/tpk-tools/cli/node_modules/string-template/.npmignore
new file mode 100644 (file)
index 0000000..f1250e5
--- /dev/null
@@ -0,0 +1,4 @@
+support
+test
+examples
+*.sock
diff --git a/config/tizen/tpk-tools/cli/node_modules/string-template/.travis.yml b/config/tizen/tpk-tools/cli/node_modules/string-template/.travis.yml
new file mode 100644 (file)
index 0000000..57c94b2
--- /dev/null
@@ -0,0 +1,7 @@
+language: node_js
+node_js:
+  - "0.10"
+before_script:
+ - npm install
+ - npm install istanbul coveralls
+script: npm run travis-test
diff --git a/config/tizen/tpk-tools/cli/node_modules/string-template/LICENCE b/config/tizen/tpk-tools/cli/node_modules/string-template/LICENCE
new file mode 100644 (file)
index 0000000..a5609a1
--- /dev/null
@@ -0,0 +1,19 @@
+Copyright (c) 2013 Matt Esch.
+
+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/config/tizen/tpk-tools/cli/node_modules/string-template/Readme.md b/config/tizen/tpk-tools/cli/node_modules/string-template/Readme.md
new file mode 100644 (file)
index 0000000..9b976e9
--- /dev/null
@@ -0,0 +1,103 @@
+# string-template
+
+[![build status][1]][2] [![dependency status][3]][4] [![coverage report][9]][10] [![stability index][15]][16]
+
+[![npm stats][13]][14]
+
+[![browser support][5]][6]
+
+  A simple string template function based on named or indexed arguments
+
+## Example
+
+```js
+var format = require("string-template")
+var greeting
+
+// Format using an object hash with keys matching [0-9a-zA-Z]+
+
+greeting = format("Hello {name}, you have {count} unread messages", {
+    name: "Robert",
+    count: 12
+})
+// greeting -> "Hello Robert, you have 12 unread messages"
+
+
+// Format using a number indexed array
+
+greeting = format("Hello {0}, you have {1} unread messages", ["Robert", 12])
+// greeting -> "Hello Robert, you have 12 unread messages"
+
+
+// Format using optional arguments
+
+greeting = format("Hello {0}, you have {1} unread messages",
+     "Robert",
+     12)
+// greeting -> "Hello Robert, you have 12 unread messages"
+
+
+// Escape {} pairs by using double {{}}
+
+var text = format("{{0}}")
+// text -> "{0}"
+
+```
+
+## Compiling templates
+
+`string-template` exposes two template compiling options for when you need the
+additional performance. Arguments passed to the compiled template are of the
+same structure as the main `string-template` function, so either a single
+object/array or a list of arguments.
+
+```js
+var compile = require("string-template/compile")
+
+var greetingTemplate = compile("Hello {0}, you have {1} unread messages")
+
+var greeting = greetingTemplate("Robert", 12)
+// -> "Hello Robert, you have 12 unread messages"
+```
+
+Passing a truthy second argument to `compile` will opt into using `new Function`
+to generate a function. The function returned contains a literal string
+concatenation statement, interleaving the correct arguments you have passed in.
+
+```js
+var compile = require("string-template/compile")
+
+var greetingTemplate = compile("Hello {0}, you have {1} unread messages", true)
+// -> greetingTemplate generated using new Function
+
+var greeting = greetingTemplate(["Robert", 12])
+// -> "Hello Robert, you have 12 unread messages"
+```
+
+## Installation
+
+`npm install string-template`
+
+## Contributors
+
+ - Matt-Esch
+
+## MIT Licenced
+
+  [1]: https://secure.travis-ci.org/Matt-Esch/string-template.png
+  [2]: https://travis-ci.org/Matt-Esch/string-template
+  [3]: https://david-dm.org/Matt-Esch/string-template.png
+  [4]: https://david-dm.org/Matt-Esch/string-template
+  [5]: https://ci.testling.com/Matt-Esch/string-template.png
+  [6]: https://ci.testling.com/Matt-Esch/string-template
+  [9]: https://coveralls.io/repos/Matt-Esch/string-template/badge.png
+  [10]: https://coveralls.io/r/Matt-Esch/string-template
+  [13]: https://nodei.co/npm/string-template.png?downloads=true&stars=true
+  [14]: https://nodei.co/npm/string-template
+  [15]: http://hughsk.github.io/stability-badges/dist/unstable.svg
+  [16]: http://github.com/hughsk/stability-badges
+
+  [7]: https://badge.fury.io/js/string-template.png
+  [8]: https://badge.fury.io/js/string-template
+  [11]: https://gemnasium.com/Matt-Esch/string-template.png
+  [12]: https://gemnasium.com/Matt-Esch/string-template
diff --git a/config/tizen/tpk-tools/cli/node_modules/string-template/compile.js b/config/tizen/tpk-tools/cli/node_modules/string-template/compile.js
new file mode 100644 (file)
index 0000000..18a48bf
--- /dev/null
@@ -0,0 +1,143 @@
+var template = require("./index")
+
+var whitespaceRegex = /["'\\\n\r\u2028\u2029]/g
+var nargs = /\{[0-9a-zA-Z]+\}/g
+
+var replaceTemplate =
+"    var args\n" +
+"    var result\n" +
+"    if (arguments.length === 1 && typeof arguments[0] === \"object\") {\n" +
+"        args = arguments[0]\n" +
+"    } else {\n" +
+"        args = arguments" +
+"    }\n\n" +
+"    if (!args || !(\"hasOwnProperty\" in args)) {\n" +
+"       args = {}\n" +
+"    }\n\n" +
+"    return {0}"
+
+var literalTemplate = "\"{0}\""
+var argTemplate = "(result = args.hasOwnProperty(\"{0}\") ? " +
+    "args[\"{0}\"] : null, \n        " +
+    "(result === null || result === undefined) ? \"\" : result)"
+
+module.exports = compile
+
+function compile(string, inline) {
+    var replacements = string.match(nargs)
+    var interleave = string.split(nargs)
+    var replace = []
+
+    for (var i = 0; i < interleave.length; i++) {
+        var current = interleave[i];
+        var replacement = replacements[i];
+        var escapeLeft = current.charAt(current.length - 1)
+        var escapeRight = (interleave[i + 1] || "").charAt(0)
+
+        if (replacement) {
+            replacement = replacement.substring(1, replacement.length - 1)
+        }
+
+        if (escapeLeft === "{" && escapeRight === "}") {
+            replace.push(current + replacement)
+        } else {
+            replace.push(current);
+            if (replacement) {
+                replace.push({ name: replacement })
+            }
+        }
+    }
+
+    var prev = [""]
+
+    for (var j = 0; j < replace.length; j++) {
+        var curr = replace[j]
+
+        if (String(curr) === curr) {
+            var top = prev[prev.length - 1]
+
+            if (String(top) === top) {
+                prev[prev.length - 1] = top + curr
+            } else {
+                prev.push(curr)
+            }
+        } else {
+            prev.push(curr)
+        }
+    }
+
+    replace = prev
+
+    if (inline) {
+        for (var k = 0; k < replace.length; k++) {
+            var token = replace[k]
+
+            if (String(token) === token) {
+                replace[k] = template(literalTemplate, escape(token))
+            } else {
+                replace[k] = template(argTemplate, escape(token.name))
+            }
+        }
+
+        var replaceCode = replace.join(" +\n    ")
+        var compiledSource = template(replaceTemplate, replaceCode)
+        return new Function(compiledSource)
+    }
+
+    return function template() {
+        var args
+
+        if (arguments.length === 1 && typeof arguments[0] === "object") {
+            args = arguments[0]
+        } else {
+            args = arguments
+        }
+
+        if (!args || !("hasOwnProperty" in args)) {
+            args = {}
+        }
+
+        var result = []
+
+        for (var i = 0; i < replace.length; i++) {
+            if (i % 2 === 0) {
+                result.push(replace[i])
+            } else {
+                var argName = replace[i].name
+                var arg = args.hasOwnProperty(argName) ? args[argName] : null
+                if (arg !== null || arg !== undefined) {
+                    result.push(arg)
+                }
+            }
+        }
+
+        return result.join("")
+    }
+}
+
+function escape(string) {
+    string = '' + string;
+
+    return string.replace(whitespaceRegex, escapedWhitespace);
+}
+
+function escapedWhitespace(character) {
+    // Escape all characters not included in SingleStringCharacters and
+    // DoubleStringCharacters on
+    // http://www.ecma-international.org/ecma-262/5.1/#sec-7.8.4
+    switch (character) {
+        case '"':
+        case "'":
+        case '\\':
+            return '\\' + character
+        // Four possible LineTerminator characters need to be escaped:
+        case '\n':
+            return '\\n'
+        case '\r':
+            return '\\r'
+        case '\u2028':
+            return '\\u2028'
+        case '\u2029':
+            return '\\u2029'
+    }
+}
diff --git a/config/tizen/tpk-tools/cli/node_modules/string-template/index.js b/config/tizen/tpk-tools/cli/node_modules/string-template/index.js
new file mode 100644 (file)
index 0000000..012cec2
--- /dev/null
@@ -0,0 +1,34 @@
+var nargs = /\{([0-9a-zA-Z]+)\}/g
+var slice = Array.prototype.slice
+
+module.exports = template
+
+function template(string) {
+    var args
+
+    if (arguments.length === 2 && typeof arguments[1] === "object") {
+        args = arguments[1]
+    } else {
+        args = slice.call(arguments, 1)
+    }
+
+    if (!args || !args.hasOwnProperty) {
+        args = {}
+    }
+
+    return string.replace(nargs, function replaceArg(match, i, index) {
+        var result
+
+        if (string[index - 1] === "{" &&
+            string[index + match.length] === "}") {
+            return i
+        } else {
+            result = args.hasOwnProperty(i) ? args[i] : null
+            if (result === null || result === undefined) {
+                return ""
+            }
+
+            return result
+        }
+    })
+}
diff --git a/config/tizen/tpk-tools/cli/node_modules/string-template/package.json b/config/tizen/tpk-tools/cli/node_modules/string-template/package.json
new file mode 100644 (file)
index 0000000..5886ede
--- /dev/null
@@ -0,0 +1,119 @@
+{
+  "_args": [
+    [
+      {
+        "raw": "string-template@0.2.1",
+        "scope": null,
+        "escapedName": "string-template",
+        "name": "string-template",
+        "rawSpec": "0.2.1",
+        "spec": "0.2.1",
+        "type": "version"
+      },
+      "/home/sumin/iotjs-tpk/cli"
+    ]
+  ],
+  "_from": "string-template@0.2.1",
+  "_id": "string-template@0.2.1",
+  "_inCache": true,
+  "_location": "/string-template",
+  "_nodeVersion": "0.10.32",
+  "_npmUser": {
+    "name": "mattesch",
+    "email": "matt@mattesch.info"
+  },
+  "_npmVersion": "2.7.4",
+  "_phantomChildren": {},
+  "_requested": {
+    "raw": "string-template@0.2.1",
+    "scope": null,
+    "escapedName": "string-template",
+    "name": "string-template",
+    "rawSpec": "0.2.1",
+    "spec": "0.2.1",
+    "type": "version"
+  },
+  "_requiredBy": [
+    "/"
+  ],
+  "_resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz",
+  "_shasum": "42932e598a352d01fc22ec3367d9d84eec6c9add",
+  "_shrinkwrap": null,
+  "_spec": "string-template@0.2.1",
+  "_where": "/home/sumin/iotjs-tpk/cli",
+  "author": {
+    "name": "Matt-Esch",
+    "email": "matt@mattesch.info"
+  },
+  "bugs": {
+    "url": "https://github.com/Matt-Esch/string-template/issues",
+    "email": "matt@mattesch.info"
+  },
+  "contributors": [
+    {
+      "name": "Matt-Esch"
+    }
+  ],
+  "dependencies": {},
+  "description": "A simple string template function based on named or indexed arguments",
+  "devDependencies": {
+    "tape": "~1.1.1"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "42932e598a352d01fc22ec3367d9d84eec6c9add",
+    "tarball": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz"
+  },
+  "gitHead": "311a15c48344fe386ec139906efc382af22f33b6",
+  "homepage": "https://github.com/Matt-Esch/string-template",
+  "keywords": [
+    "template",
+    "string",
+    "format",
+    "replace",
+    "arguments"
+  ],
+  "licenses": [
+    {
+      "type": "MIT",
+      "url": "http://github.com/Matt-Esch/string-template/raw/master/LICENSE"
+    }
+  ],
+  "main": "index",
+  "maintainers": [
+    {
+      "name": "mattesch",
+      "email": "matt@mattesch.info"
+    }
+  ],
+  "name": "string-template",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/Matt-Esch/string-template.git"
+  },
+  "scripts": {
+    "cover": "istanbul cover --report none --print detail ./test/index.js",
+    "test": "node ./test/index.js",
+    "travis-test": "istanbul cover ./test/index.js && ((cat coverage/lcov.info | coveralls) || exit 0)",
+    "view-cover": "istanbul report html && google-chrome ./coverage/index.html"
+  },
+  "testling": {
+    "files": "test/index.js",
+    "browsers": [
+      "ie/8..latest",
+      "firefox/16..latest",
+      "firefox/nightly",
+      "chrome/22..latest",
+      "chrome/canary",
+      "opera/12..latest",
+      "opera/next",
+      "safari/5.1..latest",
+      "ipad/6.0..latest",
+      "iphone/6.0..latest",
+      "android-browser/4.2..latest"
+    ]
+  },
+  "version": "0.2.1"
+}
diff --git a/config/tizen/tpk-tools/cli/package.json b/config/tizen/tpk-tools/cli/package.json
new file mode 100644 (file)
index 0000000..b6db175
--- /dev/null
@@ -0,0 +1,34 @@
+{
+  "name": "jsn-cli",
+  "version": "0.1.0",
+  "preferGlobal": "true",
+  "description": "command-line interface for js native runtime",
+  "main": "jsn-cli",
+  "bin": {
+    "jsn-cli": "./bin/jsn-cli"
+  },
+  "engines": {
+    "node": ">= 0.10.25"
+  },
+  "dependencies": {
+    "elementtree": "0.1.6",
+    "pretty-data": "0.40.0",
+    "q": "1.4.1",
+    "shelljs": "0.5.3",
+    "string-template": "0.2.1"
+  },
+  "author": {
+    "name": "Yongseop Kim",
+    "email": "yons.kim@samsung.com"
+  },
+  "contributors": [
+    {
+      "name": "Yongseop Kim",
+      "email": "yons.kim@samsung.com"
+    },
+    {
+      "name": "Joonghyun Cho",
+      "email": "jh5.cho@samsung.com"
+    }
+  ]
+}
diff --git a/config/tizen/tpk-tools/cli/tizen-app-template/icon.png b/config/tizen/tpk-tools/cli/tizen-app-template/icon.png
new file mode 100755 (executable)
index 0000000..9765b1b
Binary files /dev/null and b/config/tizen/tpk-tools/cli/tizen-app-template/icon.png differ
diff --git a/config/tizen/tpk-tools/cli/tizen-app-template/index.js b/config/tizen/tpk-tools/cli/tizen-app-template/index.js
new file mode 100755 (executable)
index 0000000..e65e40c
--- /dev/null
@@ -0,0 +1,38 @@
+console.log("Hello, This is an iotjs.app on Tizen");
+console.log("Please, set date on your device before start, > date -s \"2017-MM-DD\" ");
+
+
+var gcontext = require('gcontext');
+gcontext.init();
+
+var https = require('https');
+var isRequest1Finished = false;
+// 1. GET req
+options = {
+  method: 'GET',
+  host: "httpbin.org",
+  path: '/user-agent',
+  headers: {'user-agent': 'iotjs'}
+};
+
+var getResponseHandler = function (res) {
+  var res_body = '';
+
+  console.log("statusCode:"+res.statusCode);
+
+  var endHandler = function(){
+    var response = JSON.parse(res_body);
+    console.log(response['user-agent']);
+    isRequest1Finished = true;
+  };
+  res.on('end', endHandler);
+
+  res.on('data', function(chunk){
+    res_body += chunk.toString();
+  });
+};
+
+for (i = 0; i < 50; i++) {
+  https.get(options, getResponseHandler);
+}
+gcontext.uninit();
diff --git a/config/tizen/tpk-tools/cli/tizen-app-template/pkgid.appid b/config/tizen/tpk-tools/cli/tizen-app-template/pkgid.appid
new file mode 100755 (executable)
index 0000000..054bfe9
--- /dev/null
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+iotjs /opt/usr/home/owner/apps_rw/{pkgid}/res/{appid}/index.js
diff --git a/config/tizen/tpk-tools/cli/tizen-app-template/tizen-manifest.xml b/config/tizen/tpk-tools/cli/tizen-app-template/tizen-manifest.xml
new file mode 100755 (executable)
index 0000000..3f79fa7
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="4.0" package="{pkgid}" version="1.0.0">
+</manifest>
diff --git a/config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/author-signature.xml b/config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/author-signature.xml
new file mode 100644 (file)
index 0000000..b57e8d5
--- /dev/null
@@ -0,0 +1,74 @@
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="AuthorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="bin%2Ftizen.org.iotjs-pkg.tizen.org.iotjs-app">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1zmZfiVUlhHcMioUj3Fh8N1VrMrSIDabsib1faJ+svQ=</DigestValue>
+</Reference>
+<Reference URI="buildscript.sh">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>Wh8+69+ns0t+IPANgzs+ZmxY3pHZHZjb4ZD9FSRJP1A=</DigestValue>
+</Reference>
+<Reference URI="res%2Ftizen.org.iotjs-app%2Findex.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>CfBPOs/yNozVCWXdNJgPj5564KAQGTTXzavekbo4tv0=</DigestValue>
+</Reference>
+<Reference URI="shared%2Fres%2Ficon.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="tizen-manifest.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>jxD3m601uAX1pp1TCme05OMQVGScExlGZ6qaHSJ1tEw=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>lpo8tUDs054eLlBQXiDPVDVKfw30ZZdtkRs1jd7H5K8=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+Rn1gUr+Oxlm4L3t1ReKq+QnEzrb6joVou4H2SeRcCnzr6mq5LrmwOYu2YDkBDQ2PWX6jxkJrRIrc
+nRDTnEmD553DomkhSBWnZwxspj+PHP0fIsC7VkUxpnhec36/LVm6rkFTv9Nij9NwBKmIbD7QdBkq
+IpQ0iRCvaZzKMdBpNXs=
+</SignatureValue>
+<KeyInfo>
+<X509Data>
+<X509Certificate>
+MIIClDCCAXygAwIBAgIGAV4+hGehMA0GCSqGSIb3DQEBBQUAMFYxGjAYBgNVBAoMEVRpemVuIEFz
+c29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4gRGV2
+ZWxvcGVycyBDQTAeFw0xMjExMDEwMDAwMDBaFw0xOTAxMDEwMDAwMDBaMBAxDjAMBgNVBAMMBWth
+bmdhMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCEoDh1k+4ojdpRMJ9UvZ5C4qfs3KKyOIhd
+RJCahiiTaPlTDZwlfZKv5l9wKBboZjWm2DLgoXLpUclFgHFnRL0ANaQs9XZ+FqdtSzYNoDM3e6MX
+M5DBFJwhnA+fP9py/V7TcB20Fv5fc3E7q3vyUid2eG59N7JYpjk+46FUaSM/IQIDAQABozIwMDAM
+BgNVHRMBAf8EAjAAMAsGA1UdDwQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzANBgkqhkiG9w0B
+AQUFAAOCAQEAQb6rnntv/dcmiTgSCn5MxjUMqUKt4kU20tTBTUonLftmUlFC0JFfZksED8igTsmO
+sWTVbIwFC9DaqDE3Vcr4GD0fKtjGI18oY42rG3j28GoJeIA0YKaYySvcgFKeLF7ZaAUtsifKitrH
+COWpcbLOfm3u9ueWM9Z0NwvCp3+NEBPw4w5fgoEVL64U+rZXAYrSEabdR16lK17AZdQIqwcrhlOR
+2KSgPj2WsqqZDyOF4s9W6wNsH5W2H6vMd2dNy1FLNb6QyY8CI0x3ranSwuLaZVLe9gfe+2ij6ooX
+0R2LXaVK5UdHaWa+d6rJMVGQMHFdZ7fxdRizGOaZjIZ88q/2jA==
+</X509Certificate>
+<X509Certificate>
+MIIDOTCCAiGgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMRowGAYDVQQKDBFUaXplbiBBc3NvY2lh
+dGlvbjEaMBgGA1UECwwRVGl6ZW4gQXNzb2NpYXRpb24xHjAcBgNVBAMMFVRpemVuIERldmVsb3Bl
+cnMgUm9vdDAeFw0xMjAxMDEwMDAwMDBaFw0yNzAxMDEwMDAwMDBaMFYxGjAYBgNVBAoMEVRpemVu
+IEFzc29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4g
+RGV2ZWxvcGVycyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANVGhRGmMIUyBA7o
+PCz8Sxut6z6HNkF4oDIuzuKaMzRYPeWodwe9O0gmqAkToQHfwg2giRhE5GoPld0fq+OYMMwSasCu
+g8dwODx1eDeSYVuOLWRxpAmbTXOsSFi6VoWeyaPEm18JBHvZBsU5YQtgZ6Kp7MqzvQg3pXOxtajj
+vyHxiatJl+xXrHgcXC1wgyG3buty7u/Fi2mvKXJ0PRJcCjjK81dqe/Vr20sRUCrbk02zbm5ggFt/
+jIEhV8wbFRQpliobc7J4dSTKhFfrqGM8rdd54LYhD7gSI1CFSe16pUXfcVR7FhJztRaiGLnCrwBE
+dyTZ248+D4L/qR/D0axb3jcCAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOC
+AQEAnOXXQ/1O/QTDHyrmQDtFziqPY3xWlJBqJtEqXiT7Y+Ljpe66e+Ee/OjQMlZe8gu21/8cKklH
+95RxjopMWCVedXDUbWdvS2+CdyvVW/quT2E0tjqIzXDekUTYwwhlPWlGxvfj3VsxqSFq3p8Brl04
+1Gx5RKAGyKVsMfTLhbbwSWwApuBUxYfcNpKwLWGPXkysu+HctY03OKv4/xKBnVWiN8ex/Sgesi0M
++OBAOMdZMPK32uJBTeKFx1xZgTLIhk45V0hPOomPjZloiv0LSS11eyd451ufjW0iHRE7WlpR6EvI
+W6TFyZgMpQq+kg4hWl2SBTf3s2VI8Ygz7gj8TMlClg==
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#AuthorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#AuthorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-author"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#AuthorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/bin/tizen.org.iotjs-pkg.tizen.org.iotjs-app b/config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/bin/tizen.org.iotjs-pkg.tizen.org.iotjs-app
new file mode 100755 (executable)
index 0000000..b5b0c9f
--- /dev/null
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+iotjs /opt/usr/home/owner/apps_rw/tizen.org.iotjs-pkg/res/tizen.org.iotjs-app/index.js
diff --git a/config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/buildscript.sh b/config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/buildscript.sh
new file mode 100755 (executable)
index 0000000..9bc167c
--- /dev/null
@@ -0,0 +1 @@
+jsn-cli build sign ~/tizen-studio/tools/ide/bin/native-signing ~/tizen-studio/tools/certificate-generator/certificates/developer/tizen-developer-ca.cer ~/tizen-studio-data/keystore/author/[AUTHOR_NAME].p12 [PASSWORD] ~/tizen-studio/tools/certificate-generator/certificates/distributor/tizen-distributor-signer.p12 tizenpkcs12passfordsigner ~/tizen-studio/tools/certificate-generator/certificates/distributor/tizen-distributor-ca.cer
diff --git a/config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/res/tizen.org.iotjs-app/index.js b/config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/res/tizen.org.iotjs-app/index.js
new file mode 100755 (executable)
index 0000000..1c7a152
--- /dev/null
@@ -0,0 +1,33 @@
+console.log("Hello, This is an iotjs.app on Tizen. Tizen-application, with App Framework will be prepared. ");
+
+/*
+#!/usr/bin/env node
+var app = require('tizen-application');
+
+app.on('appcontrol', function(appcontrol) {
+  // Handle the launch request
+  console.log('[appcontrol] operation : ' + appcontrol.operation);
+});
+
+app.on('pause', function() {
+  // Take necessary actions when application becomes invisible.
+  console.log('[pause]');
+});
+
+app.on('resume', function() {
+  // Take necessary actions when application becomes visible.
+  console.log('[resume]');
+});
+
+app.on('terminate', function() {
+  // Release all resources.
+  console.log('[terminate]');
+});
+
+app.start().then(function() {
+  // Initialize UI resources and application's data.
+  console.log('[started]');
+}).catch(function(e) {
+  console.log('Failed to start application : ' + e.message);
+});
+*/
diff --git a/config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/shared/res/icon.png b/config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/shared/res/icon.png
new file mode 100755 (executable)
index 0000000..9765b1b
Binary files /dev/null and b/config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/shared/res/icon.png differ
diff --git a/config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/signature1.xml b/config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/signature1.xml
new file mode 100644 (file)
index 0000000..f3b9eb2
--- /dev/null
@@ -0,0 +1,76 @@
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="author-signature.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>8erGopu9KXbXFy1228zGv/bSeYCtwZzH8IuBFkPtPrk=</DigestValue>
+</Reference>
+<Reference URI="bin%2Ftizen.org.iotjs-pkg.tizen.org.iotjs-app">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1zmZfiVUlhHcMioUj3Fh8N1VrMrSIDabsib1faJ+svQ=</DigestValue>
+</Reference>
+<Reference URI="buildscript.sh">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>Wh8+69+ns0t+IPANgzs+ZmxY3pHZHZjb4ZD9FSRJP1A=</DigestValue>
+</Reference>
+<Reference URI="res%2Ftizen.org.iotjs-app%2Findex.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>CfBPOs/yNozVCWXdNJgPj5564KAQGTTXzavekbo4tv0=</DigestValue>
+</Reference>
+<Reference URI="shared%2Fres%2Ficon.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="tizen-manifest.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>jxD3m601uAX1pp1TCme05OMQVGScExlGZ6qaHSJ1tEw=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+l+qc5AaScgHqxs0qwZFsw1G2YZo1sGiCfTSDUFG10jRwXgDff88EpTsDtpWyk54EPKvLePSYo9+M
+D7AMncUHy0t4JuezMQXKEdTtoDNMc2K8+sm550WwZPkLlIXa3EigSCngEljh5Gc1n6BOhQH8C0Dc
+u7MYV7jhVHKujKT8m9s=
+</SignatureValue>
+<KeyInfo>
+<X509Data>
+<X509Certificate>
+MIICmzCCAgQCCQDXI7WLdVZwiTANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCS1IxDjAMBgNV
+BAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6ZW4gVGVzdCBDQTEiMCAGA1UE
+CwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEkMCIGA1UEAwwbVGl6ZW4gUHVibGljIERpc3Ry
+aWJ1dG9yIENBMB4XDTEyMTAyOTEzMDMwNFoXDTIyMTAyNzEzMDMwNFowgZMxCzAJBgNVBAYTAktS
+MQ4wDAYDVQQIDAVTdXdvbjEOMAwGA1UEBwwFU3V3b24xFjAUBgNVBAoMDVRpemVuIFRlc3QgQ0Ex
+IjAgBgNVBAsMGVRpemVuIERpc3RyaWJ1dG9yIFRlc3QgQ0ExKDAmBgNVBAMMH1RpemVuIFB1Ymxp
+YyBEaXN0cmlidXRvciBTaWduZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALtMvlc5hENK
+90ZdA+y66+Sy0enD1gpZDBh5T9RP0oRsptJv5jjNTseQbQi0SZOdOXb6J7iQdlBCtR343RpIEz8H
+mrBy7mSY7mgwoU4EPpp4CTSUeAuKcmvrNOngTp5Hv7Ngf02TTHOLK3hZLpGayaDviyNZB5PdqQdB
+hokKjzAzAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAvGp1gxxAIlFfhJH1efjb9BJK/rtRkbYn9+Ez
+GEbEULg1svsgnyWisFimI3uFvgI/swzr1eKVY3Sc8MQ3+Fdy3EkbDZ2+WAubhcEkorTWjzWz2fL1
+vKaYjeIsuEX6TVRUugHWudPzcEuQRLQf8ibZWjbQdBmpeQYBMg5x+xKLCJc=
+</X509Certificate>
+<X509Certificate>
+MIICtDCCAh2gAwIBAgIJAMDbehElPNKvMA0GCSqGSIb3DQEBBQUAMIGVMQswCQYDVQQGEwJLUjEO
+MAwGA1UECAwFU3V3b24xDjAMBgNVBAcMBVN1d29uMRYwFAYDVQQKDA1UaXplbiBUZXN0IENBMSMw
+IQYDVQQLDBpUVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEpMCcGA1UEAwwgVGl6ZW4gUHVibGlj
+IERpc3RyaWJ1dG9yIFJvb3QgQ0EwHhcNMTIxMDI5MTMwMjUwWhcNMjIxMDI3MTMwMjUwWjCBjzEL
+MAkGA1UEBhMCS1IxDjAMBgNVBAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6
+ZW4gVGVzdCBDQTEiMCAGA1UECwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEkMCIGA1UEAwwb
+VGl6ZW4gUHVibGljIERpc3RyaWJ1dG9yIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDe
+OTS/3nXvkDEmsFCJIvRlQ3RKDcxdWJJp625pFqHdmoJBdV+x6jl1raGK2Y1sp2Gdvpjc/z92yzAp
+bE/UVLPh/tRNZPeGhzU4ejDDm7kzdr2f7Ia0U98K+OoY12ucwg7TYNItj9is7Cj4blGfuMDzd2ah
+2AgnCGlwNwV/pv+uVQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBACqJ
+KO33YdoGudwanZIxMdXuxnnD9R6u72ltKk1S4zPfMJJv482CRGCI4FK6djhlsI4i0Lt1SVIJEed+
+yc3qckGm19dW+4xdlkekon7pViEBWuyHw8OWv3RXtTum1+PGHjBJ2eYY4ZKIpz73U/1NC16sTB/0
+VhfnkHwPltmrpYVe
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#DistributorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#DistributorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#DistributorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
diff --git a/config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/tizen-manifest.xml b/config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/tizen-manifest.xml
new file mode 100644 (file)
index 0000000..49f2886
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version='1.0' encoding='utf-8'?>
+<manifest api-version="4.0" package="tizen.org.iotjs-pkg" version="1.0.0" 
+  xmlns="http://tizen.org/ns/packages">
+  <ui-application appid="tizen.org.iotjs-app" exec="tizen.org.iotjs-pkg.tizen.org.iotjs-app" multiple="false" nodisplay="false" taskmanage="true" type="jsapp">
+    <icon>icon.png</icon>
+    <label>tizen.org.iotjs-app</label>
+  </ui-application>
+</manifest>
diff --git a/config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/tizen.org.iotjs-pkg.tpk b/config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/tizen.org.iotjs-pkg.tpk
new file mode 100644 (file)
index 0000000..75c8226
Binary files /dev/null and b/config/tizen/tpk-tools/sample_app/tizen.org.iotjs-pkg/tizen.org.iotjs-pkg.tpk differ