[ 
https://issues.apache.org/jira/browse/CB-7601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14140314#comment-14140314
 ] 

Sergey Grebnov commented on CB-7601:
------------------------------------

Elementtree library which is used to work with XML uses Qualified Name when you 
access tag name: elem.tag for <m3:Capability Name="contacts" /> returns tag 
name with manifest prefix ('m3:Capability') so sort function works incorrectly.

As per research there is no way to force 'elementtree' to ignore manifest 
prefixes and return local name instead. So sort function should take care of 
this.

> Build fails due to capabilities with m: prefixes are incorrectly sorted
> -----------------------------------------------------------------------
>
>                 Key: CB-7601
>                 URL: https://issues.apache.org/jira/browse/CB-7601
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Windows
>    Affects Versions: 3.6.0
>            Reporter: Sergey Grebnov
>            Assignee: Sergey Grebnov
>              Labels: windows
>
> Repro steps:
> {code}
> cordova create app
> cd app
> cordova platform add windows
> cordova plugin add https://github.com/apache/cordova-plugin-contacts
> cordova plugin add https://github.com/apache/cordova-plugin-contacts
> cordova build windows
> {code}
> Observe the following error
> {code}
> C:\temp\win81\contactsTest\platforms\windows\build\phone\debug\anycpu\AppxM 
> anifest.xml(41,6): error APPX1404: File content does not conform to specified 
> schema. The element 'Capabilities' in namespace 'http://schemas.microsof 
> t.com/appx/2010/manifest' has invalid child element 'Capability' in namespace 
> 'http://schemas.microsoft.com/appx/2014/manifest'. List of possible elem ents 
> expected: 'DeviceCapabilityChoice, DeviceCapability' in namespace 
> 'http://schemas.microsoft.com/appx/2010/manifest' as well as 
> 'DeviceCapability'
>  in namespace 'http://schemas.microsoft.com/appx/2013/manifest'. [C:\temp\w 
> in81\contactsTest\platforms\windows\CordovaApp.Phone.jsproj]
> {code}
> *package.phone.appxmanifest* contains the following section which is invalid 
> since all Capabilities should go before DeviceCapabilities
> {code}
>     <Capabilities>
>         <Capability Name="internetClientServer" />
>         <Capability Name="picturesLibrary" />
>         <DeviceCapability Name="webcam" />
>         <m3:Capability Name="contacts" />
>     </Capabilities>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to