Titanium JIRA Archive
Alloy (ALOY)

[ALOY-840] Alloy: XML elements may be without end slash?

GitHub Issuen/a
Resolution Date2014-02-06T00:50:15.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.4.0
AssigneeTony Lukasavage


XML elements may be without end slash? It may confuse developer if he forgets to finish element. *Example:* (Works without any problem)
   <Window class="container">
      <Label text="Hello!" top="50"> <!-- <Label /> or <Label></Label> is right-->
      <ImageView image="appicon.png" bottom="50">


  1. Jamie Buckley 2013-10-06

    I am not sure I understand how this is an issue if the element is being closed?
  2. Matej 2013-10-06

    Everything works OK problem is that compiler accept element that is not closed. If is xml document too big it can be confusing to see opened element without end...
  3. Ivan Skugor 2014-01-22

    XML elements can't be without end slash, it's not valid XML, IMHO.
  4. Tim Poulsen 2014-01-23

    This appears to be an issue with the xmldom parser. I have filed an issue on that project https://github.com/jindw/xmldom/issues/76
  5. Tim Poulsen 2014-02-05

    PR: https://github.com/appcelerator/alloy/pull/328 Test app: testing/ALOY-840 Functional test: 1. Build the app 2. It should die (fail to compile) with a message that there was an Unclosed XML tag or attribute
  6. Tony Lukasavage 2014-02-06

    re-open for review/modification
  7. Tony Lukasavage 2014-02-06


    PR: https://github.com/appcelerator/alloy/pull/331 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-840

    functional review

    Attempt to run the test app

    You should get a compile time error that looks like this:

       [INFO]  ----- MVC GENERATION -----
       [INFO]  [global style] writing to cache...
       [INFO]  [index.xml] view processing...
       [INFO]    style:      "index.tss"
       [INFO]    view:       "index.xml"
       [ERROR] Error parsing XML file.
       [ERROR] Unclosed XML tag or attribute
       [ERROR] @#[line:3,col:3]
       [ERROR] Alloy compiler failed
  8. Priya Agarwal 2014-05-08

    Verified the FIXED with: Appc-Studio: sdk:3.3.0.v20140507163312 acs:1.0.14 alloy:1.4.0-dev npm:1.3.2 titanium:3.3.0-dev titanium-code-processor:1.1.1 xcode:5.1.1 Device:Iphone5s(v7.1.1),Nexus7(v4.4.2) Working as expected. Hence closing the issue.

JSON Source