cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktop <...@git.apache.org>
Subject [GitHub] cordova-lib pull request: CB-11023 Add attribute through config-fi...
Date Fri, 20 May 2016 16:06:02 GMT
Github user ktop commented on the pull request:

    https://github.com/apache/cordova-lib/pull/432#issuecomment-220647997
  
    I'd like to clear up some confusion I have on adding attributes. 
    Before, we had decided on going with this syntax where the child elements of config-file
tag would point to the child tags of the parent we want to add attributes to, so that we could
add attributes to more than one child in a single config-file tag.
    
    With the following syntax, I wouldn't be able to at add to the second activity. 
    ```xml
    <config-file target="AndroidManifest.xml" parent="/manifest/application" mode="merge"
>
        <activity android:enabled="true" />
    </config-file>
    ```
    
    Now with your suggestion, the tag would look like this:
    Here, I would be able to specify the second activity, but this contradicts with what we
had before since activity tag isn't a child of the parent. 
    ```xml
    <config-file target="AndroidManifest.xml" parent="/manifest/application/activity[@android:name='SecondActivity']"
mode="merge" >
        <activity android:enabled="true" />
    </config-file>
    ```
    
    Would we lose the ability to add attributes to more than one child? Or should we try to
do both? Detect that we want to add to the tag that is the same as the parent as well as child
tags. (Not sure if this makes sense)
    ```xml
    <config-file target="AndroidManifest.xml" parent="/manifest/application/activity[@android:name='SecondActivity']"
mode="merge" >
        <activity android:enabled="true" />
        <intent-filter android:priority="1" />
    </config-file>
    ```
    Or any other ideas?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message