[ALOY-840] Alloy: XML elements may be without end slash?
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-02-06T00:50:15.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.4.0 |
Components | XML |
Labels | n/a |
Reporter | Matej |
Assignee | Tony Lukasavage |
Created | 2013-09-29T04:59:45.000+0000 |
Updated | 2014-05-08T11:07:32.000+0000 |
Description
XML elements may be without end slash? It may confuse developer if he forgets to finish element.
*Example:* (Works without any problem)
<Alloy>
<Window class="container">
<Label text="Hello!" top="50"> <!-- <Label /> or <Label></Label> is right-->
<ImageView image="appicon.png" bottom="50">
</Window>
</Alloy>
I am not sure I understand how this is an issue if the element is being closed?
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...
XML elements can't be without end slash, it's not valid XML, IMHO.
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
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
re-open for review/modification
code
PR: https://github.com/appcelerator/alloy/pull/331 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-840functional review
Attempt to run the test app
You should get a compile time error that looks like this:
Verified the FIXED with: Appc-Studio:3.3.0.201405011408 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.