{
"id": "91677",
"key": "TIMOB-9084",
"fields": {
"issuetype": {
"id": "1",
"description": "A problem which impairs or prevents the functions of the product.",
"name": "Bug",
"subtask": false
},
"project": {
"id": "10153",
"key": "TIMOB",
"name": "Titanium SDK/CLI",
"projectCategory": {
"id": "10100",
"description": "Titanium and related SDKs used in application development",
"name": "Client"
}
},
"fixVersions": [
{
"id": "13271",
"description": "Release 2.1.0",
"name": "Release 2.1.0",
"archived": false,
"released": true,
"releaseDate": "2012-06-29"
},
{
"id": "13407",
"description": "Sprint 2012-11 API",
"name": "Sprint 2012-11 API",
"archived": true,
"released": true,
"releaseDate": "2012-06-03"
}
],
"resolution": {
"id": "1",
"description": "A fix for this issue is checked into the tree and tested.",
"name": "Fixed"
},
"resolutiondate": "2012-06-01T17:07:15.000+0000",
"created": "2012-05-09T14:55:36.000+0000",
"priority": {
"name": "High",
"id": "2"
},
"labels": [
"api",
"parity",
"qe-port"
],
"versions": [
{
"id": "13271",
"description": "Release 2.1.0",
"name": "Release 2.1.0",
"archived": false,
"released": true,
"releaseDate": "2012-06-29"
}
],
"issuelinks": [],
"assignee": {
"name": "vduggal",
"key": "vduggal",
"displayName": "Vishal Duggal",
"active": false,
"timeZone": "America/Los_Angeles"
},
"updated": "2012-08-17T12:40:43.000+0000",
"status": {
"description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.",
"name": "Closed",
"id": "6",
"statusCategory": {
"id": 3,
"key": "done",
"colorName": "green",
"name": "Done"
}
},
"components": [
{
"id": "10206",
"name": "iOS",
"description": "iOS Platform"
}
],
"description": "h1. Problem\r\nWhen defining namespaces, xmlns:xmlns is explicitly defined. This isn't a valid definition, and if it isn't stripped out, other xml validators or libraries will choke on it.\r\n\r\nh2. Workaround\r\nStringify the XML and rip out the xmlns:xmlns attribute.\r\n\r\nh2. Reproduction\r\n{code:title=app.js}\r\n(function (document, Ti) {\r\n document = document || Ti && Ti.XML.parseString('');\r\n\r\n function xmlAddNamespaceAttribute(domNode, name, attributeNamespace) {\r\n var doc = domNode.ownerDocument || document;\r\n var attribute = doc.createAttributeNS('http://www.w3.org/2000/xmlns/', name);\r\n attribute.nodeValue = attributeNamespace;\r\n (domNode.documentElement || domNode).setAttributeNode(attribute);\r\n }\r\n\r\n var feed = document.implementation.createDocument('http://www.w3.org/2005/Atom', 'atom:feed', null);\r\n xmlAddNamespaceAttribute(feed, \"xmlns:m\", 'http://schemas.microsoft.com/ado/2007/08/dataservices/metadata');\r\n xmlAddNamespaceAttribute(feed, \"xmlns:d\", 'http://schemas.microsoft.com/ado/2007/08/dataservices');\r\n\r\n var expected = '\\\r\n '.replace(/\\s{1,}/ig, ' ').replace(/> <');\r\n\r\n var actual = '' + ((Ti && Ti.XML) || new XMLSerializer()).serializeToString(feed);\r\n\r\n if (Ti) {\r\n Ti.API.info('Expected:\\n' + expected);\r\n Ti.API.info('Actual:\\n' + actual);\r\n }\r\n else {\r\n console.log('Expected:\\n' + expected);\r\n console.log('Actual:\\n' + actual);\r\n }\r\n\r\n if (expected != actual) {\r\n alert('FAIL! Check logs for more information.');\r\n }\r\n else {\r\n alert('PASS!');\r\n }\r\n})(this['document'], this['Ti']);\r\n{code}\r\n\r\nh2. Tested With\r\nPasses in Chrome 18.0\r\nFails in iOS Simulator with Titanium Mobile 2.1.0 (05/03/12 17:34 c366287)\r\n\r\nExpected XML results:\r\n{code:title=expected.xml}\r\n\r\n\r\n{code}\r\n\r\nActual XML results:\r\n{code:title=actual.xml}\r\n\r\n\r\n{code}\r\n\r\nDiscrepancies:\r\n- xmlns:xmlns\r\n- absence of xmlns:atom",
"attachment": [],
"flagged": false,
"summary": "iOS: XML xmlns:xmlns definition",
"creator": {
"name": "dtoth",
"key": "dtoth",
"displayName": "Dawson Toth",
"active": true,
"timeZone": "America/New_York"
},
"subtasks": [],
"reporter": {
"name": "dtoth",
"key": "dtoth",
"displayName": "Dawson Toth",
"active": true,
"timeZone": "America/New_York"
},
"environment": null,
"comment": {
"comments": [
{
"id": "196840",
"author": {
"name": "jenglish",
"key": "jenglish",
"displayName": "Jeff English",
"active": true,
"timeZone": "America/Chicago"
},
"body": "Creating a document without a prefix for the root item should output a default namespace definition when serialized. For example, \r\n{code}\r\nvar entry = document.implementation.createDocument('http://www.w3.org/2005/Atom', 'entry', null);\r\n{code}\r\nshould result in the following when serialized:\r\n{code}\r\n\r\n\r\n{code}\r\ninstead I'm getting this:\r\n{code}\r\n\r\n\r\n{code}",
"updateAuthor": {
"name": "jenglish",
"key": "jenglish",
"displayName": "Jeff English",
"active": true,
"timeZone": "America/Chicago"
},
"created": "2012-06-01T08:15:54.000+0000",
"updated": "2012-06-01T09:00:23.000+0000"
},
{
"id": "196924",
"author": {
"name": "mstepanov",
"key": "mstepanov",
"displayName": "Max Stepanov",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "PR merged https://github.com/appcelerator/titanium_mobile/pull/2302",
"updateAuthor": {
"name": "mstepanov",
"key": "mstepanov",
"displayName": "Max Stepanov",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2012-06-01T17:07:15.000+0000",
"updated": "2012-06-01T17:07:15.000+0000"
},
{
"id": "214990",
"author": {
"name": "oromero",
"key": "oromero",
"displayName": "Olga Romero",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "Verified fix with:\r\nTitanium Studio, build: 2.1.1.201207271312\r\nTitanium SDK: 2.2.0.v20120816212512\r\nDevices:\r\niPhone 4s 5.0.1\r\nSimulator 5.1\r\nMac osx 10.8 Mountain Lion",
"updateAuthor": {
"name": "oromero",
"key": "oromero",
"displayName": "Olga Romero",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2012-08-17T12:40:26.000+0000",
"updated": "2012-08-17T12:40:26.000+0000"
}
],
"maxResults": 3,
"total": 3,
"startAt": 0
}
}
}