Permalink
Browse files

Build files for fix for 2532796

  • Loading branch information...
allenrabinovich committed Oct 5, 2012
1 parent 1ae8381 commit 494b9937d700996291e87447286cfa516b2409ab

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -149,7 +149,7 @@ SchemaXML = {
try {
result = SchemaXML._getXPathResult(locator, context, xmldoc);
while ((res = result.iterateNext())) {
- value = res.textContent || res.value || res.text || res.innerHTML || null;
+ value = res.textContent || res.value || res.text || res.innerHTML || res.innerText || null;
}
// FIXME: Why defer to a method that is mixed into this object?
@@ -183,6 +183,7 @@ SchemaXML = {
// Standards mode
if (! Lang.isUndefined(xmldoc.evaluate)) {
return xmldoc.evaluate(locator, context, xmldoc.createNSResolver(context.ownerDocument ? context.ownerDocument.documentElement : context.documentElement), 0, null);
+
}
// IE mode
else {
@@ -191,7 +192,10 @@ SchemaXML = {
// XPath is supported
try {
// this fixes the IE 5.5+ issue where childnode selectors begin at 0 instead of 1
- xmldoc.setProperty("SelectionLanguage", "XPath");
+ try {
+ xmldoc.setProperty("SelectionLanguage", "XPath");
+ } catch (e) {}
+
values = context.selectNodes(locator);
}
// Fallback for DOM nodes and fragments

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -148,7 +148,7 @@ SchemaXML = {
try {
result = SchemaXML._getXPathResult(locator, context, xmldoc);
while ((res = result.iterateNext())) {
- value = res.textContent || res.value || res.text || res.innerHTML || null;
+ value = res.textContent || res.value || res.text || res.innerHTML || res.innerText || null;
}
// FIXME: Why defer to a method that is mixed into this object?
@@ -181,6 +181,7 @@ SchemaXML = {
// Standards mode
if (! Lang.isUndefined(xmldoc.evaluate)) {
return xmldoc.evaluate(locator, context, xmldoc.createNSResolver(context.ownerDocument ? context.ownerDocument.documentElement : context.documentElement), 0, null);
+
}
// IE mode
else {
@@ -189,7 +190,10 @@ SchemaXML = {
// XPath is supported
try {
// this fixes the IE 5.5+ issue where childnode selectors begin at 0 instead of 1
- xmldoc.setProperty("SelectionLanguage", "XPath");
+ try {
+ xmldoc.setProperty("SelectionLanguage", "XPath");
+ } catch (e) {}
+
values = context.selectNodes(locator);
}
// Fallback for DOM nodes and fragments
@@ -26,10 +26,10 @@ _yuitest_coverage["build/datatype-xml-format/datatype-xml-format.js"] = {
path: "build/datatype-xml-format/datatype-xml-format.js",
code: []
};
-_yuitest_coverage["build/datatype-xml-format/datatype-xml-format.js"].code=["YUI.add('datatype-xml-format', function (Y, NAME) {","","/**"," * The Number Utility provides type-conversion and string-formatting"," * convenience methods for Numbers."," *"," * @module datatype-xml"," * @submodule datatype-xml-format"," */","","/**"," * XML provides a set of utility functions to operate against XML documents."," *"," * @class XML"," * @static"," */","var LANG = Y.Lang;","","Y.mix(Y.namespace(\"XML\"), {"," /**"," * Converts data to type XMLDocument."," *"," * @method format"," * @param data {XMLDoc} Data to convert."," * @return {String} String."," */"," format: function(data) {"," try {"," if(!LANG.isUndefined(XMLSerializer)) {"," return (new XMLSerializer()).serializeToString(data);"," }"," }"," catch(e) {"," if(data && data.xml) {"," return data.xml;"," }"," else {"," return (LANG.isValue(data) && data.toString) ? data.toString() : \"\";"," }"," }"," }","});","","Y.namespace(\"DataType\");","Y.DataType.XML = Y.XML;","","","}, '@VERSION@');"];
-_yuitest_coverage["build/datatype-xml-format/datatype-xml-format.js"].lines = {"1":0,"17":0,"19":0,"28":0,"29":0,"30":0,"34":0,"35":0,"38":0,"44":0,"45":0};
+_yuitest_coverage["build/datatype-xml-format/datatype-xml-format.js"].code=["YUI.add('datatype-xml-format', function (Y, NAME) {","","/**"," * The Number Utility provides type-conversion and string-formatting"," * convenience methods for Numbers."," *"," * @module datatype-xml"," * @submodule datatype-xml-format"," */","","/**"," * XML provides a set of utility functions to operate against XML documents."," *"," * @class XML"," * @static"," */","var LANG = Y.Lang;","","Y.mix(Y.namespace(\"XML\"), {"," /**"," * Converts data to type XMLDocument."," *"," * @method format"," * @param data {XMLDoc} Data to convert."," * @return {String} String."," */"," format: function(data) {"," try {"," if(!LANG.isUndefined(data.getXml)) {"," return data.getXml();"," }",""," if(!LANG.isUndefined(XMLSerializer)) {"," return (new XMLSerializer()).serializeToString(data);"," }"," }"," catch(e) {"," if(data && data.xml) {"," return data.xml;"," }"," else {"," return (LANG.isValue(data) && data.toString) ? data.toString() : \"\";"," }"," }"," }","});","","Y.namespace(\"DataType\");","Y.DataType.XML = Y.XML;","","","}, '@VERSION@');"];
+_yuitest_coverage["build/datatype-xml-format/datatype-xml-format.js"].lines = {"1":0,"17":0,"19":0,"28":0,"29":0,"30":0,"33":0,"34":0,"38":0,"39":0,"42":0,"48":0,"49":0};
_yuitest_coverage["build/datatype-xml-format/datatype-xml-format.js"].functions = {"format:27":0,"(anonymous 1):1":0};
-_yuitest_coverage["build/datatype-xml-format/datatype-xml-format.js"].coveredLines = 11;
+_yuitest_coverage["build/datatype-xml-format/datatype-xml-format.js"].coveredLines = 13;
_yuitest_coverage["build/datatype-xml-format/datatype-xml-format.js"].coveredFunctions = 2;
_yuitest_coverline("build/datatype-xml-format/datatype-xml-format.js", 1);
YUI.add('datatype-xml-format', function (Y, NAME) {
@@ -66,28 +66,34 @@ Y.mix(Y.namespace("XML"), {
_yuitest_coverline("build/datatype-xml-format/datatype-xml-format.js", 28);
try {
_yuitest_coverline("build/datatype-xml-format/datatype-xml-format.js", 29);
-if(!LANG.isUndefined(XMLSerializer)) {
+if(!LANG.isUndefined(data.getXml)) {
_yuitest_coverline("build/datatype-xml-format/datatype-xml-format.js", 30);
+return data.getXml();
+ }
+
+ _yuitest_coverline("build/datatype-xml-format/datatype-xml-format.js", 33);
+if(!LANG.isUndefined(XMLSerializer)) {
+ _yuitest_coverline("build/datatype-xml-format/datatype-xml-format.js", 34);
return (new XMLSerializer()).serializeToString(data);
}
}
catch(e) {
- _yuitest_coverline("build/datatype-xml-format/datatype-xml-format.js", 34);
+ _yuitest_coverline("build/datatype-xml-format/datatype-xml-format.js", 38);
if(data && data.xml) {
- _yuitest_coverline("build/datatype-xml-format/datatype-xml-format.js", 35);
+ _yuitest_coverline("build/datatype-xml-format/datatype-xml-format.js", 39);
return data.xml;
}
else {
- _yuitest_coverline("build/datatype-xml-format/datatype-xml-format.js", 38);
+ _yuitest_coverline("build/datatype-xml-format/datatype-xml-format.js", 42);
return (LANG.isValue(data) && data.toString) ? data.toString() : "";
}
}
}
});
-_yuitest_coverline("build/datatype-xml-format/datatype-xml-format.js", 44);
+_yuitest_coverline("build/datatype-xml-format/datatype-xml-format.js", 48);
Y.namespace("DataType");
-_yuitest_coverline("build/datatype-xml-format/datatype-xml-format.js", 45);
+_yuitest_coverline("build/datatype-xml-format/datatype-xml-format.js", 49);
Y.DataType.XML = Y.XML;
@@ -26,6 +26,10 @@ Y.mix(Y.namespace("XML"), {
*/
format: function(data) {
try {
+ if(!LANG.isUndefined(data.getXml)) {
+ return data.getXml();
+ }
+
if(!LANG.isUndefined(XMLSerializer)) {
return (new XMLSerializer()).serializeToString(data);
}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -26,6 +26,10 @@ Y.mix(Y.namespace("XML"), {
*/
format: function(data) {
try {
+ if(!LANG.isUndefined(data.getXml)) {
+ return data.getXml();
+ }
+
if(!LANG.isUndefined(XMLSerializer)) {
return (new XMLSerializer()).serializeToString(data);
}
Oops, something went wrong.

0 comments on commit 494b993

Please sign in to comment.