~ubuntu-branches/ubuntu/quantal/maas/quantal-updates

« back to all changes in this revision

Viewing changes to src/maasserver/static/jslibs/yui/3.4.1/build/datatype-xml-parse/datatype-xml-parse-debug.js

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2012-07-03 17:42:37 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20120703174237-p8l0keuuznfg721k
Tags: 0.1+bzr709+dfsg-0ubuntu1
* New Upstream release
* debian/control:
  - Depends on python-celery, python-tempita, libjs-yui3-{full,min},
    libjs-raphael
* debian/maas.install:
  - Install apiclient, celeryconfig.py, maas-import-pxe-files, preseeds_v2.
  - Update to install various files from chroot, rather tha manually copy
    them from the source.
* debian/maas.links: symlink celeryconfig.py
* debian/maas.maas-celery.upstart: Add job.
* debian/rules:
  - Install celery upstart job.
  - Do not install jslibs as packages are now used.
  - Drop copying of maas_local_settings_sample.py as source now ships
    a maas_local_settings.py
* debian/patches:
  - 04-maas-http-fix.patch: Drop. Merged upstream.
  - 01-fix-database-settings.patch: Refreshed.
  - 99_enums_js.patch: Added until creation of enum.js / build process
    is fixed.
* debian/maas.postinst: Update bzr version to correctly handle upgrades.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
YUI 3.4.1 (build 4118)
3
 
Copyright 2011 Yahoo! Inc. All rights reserved.
4
 
Licensed under the BSD License.
5
 
http://yuilibrary.com/license/
6
 
*/
7
 
YUI.add('datatype-xml-parse', function(Y) {
8
 
 
9
 
/**
10
 
 * Parse XML submodule.
11
 
 *
12
 
 * @module datatype
13
 
 * @submodule datatype-xml-parse
14
 
 * @for DataType.XML
15
 
 */
16
 
 
17
 
var LANG = Y.Lang;
18
 
 
19
 
Y.mix(Y.namespace("DataType.XML"), {
20
 
    /**
21
 
     * Converts data to type XMLDocument.
22
 
     *
23
 
     * @method parse
24
 
     * @param data {String} Data to convert.
25
 
     * @return {XMLDoc} XML Document.
26
 
     */
27
 
    parse: function(data) {
28
 
        var xmlDoc = null;
29
 
        if(LANG.isString(data)) {
30
 
            try {
31
 
                if(!LANG.isUndefined(ActiveXObject)) {
32
 
                        xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
33
 
                        xmlDoc.async = false;
34
 
                        xmlDoc.loadXML(data);
35
 
                }
36
 
            }
37
 
            catch(ee) {
38
 
                try {
39
 
                    if(!LANG.isUndefined(DOMParser)) {
40
 
                        xmlDoc = new DOMParser().parseFromString(data, "text/xml");
41
 
                    }
42
 
                }
43
 
                catch(e) {
44
 
                }
45
 
                    Y.log(ee.message + " (Could not parse data " + Y.dump(data) + " to type XML Document)", "warn", "datatype-xml");
46
 
            }
47
 
        }
48
 
        
49
 
        if( (LANG.isNull(xmlDoc)) || (LANG.isNull(xmlDoc.documentElement)) || (xmlDoc.documentElement.nodeName === "parsererror") ) {
50
 
            Y.log("Could not parse data " + Y.dump(data) + " to type XML Document", "warn", "datatype-xml");
51
 
        }
52
 
        
53
 
        return xmlDoc;
54
 
    }
55
 
});
56
 
 
57
 
// Add Parsers shortcut
58
 
Y.namespace("Parsers").xml = Y.DataType.XML.parse;
59
 
 
60
 
 
61
 
 
62
 
}, '3.4.1' );