configurationengine/doc/plugins/general.rst
changeset 3 e7e0ae78773e
parent 0 2e8eeb919028
equal deleted inserted replaced
2:87cfa131b535 3:e7e0ae78773e
    53                 CustomSettings.StartupSoundFile.localPath configures StartupSettings.StartupSoundPath
    53                 CustomSettings.StartupSoundFile.localPath configures StartupSettings.StartupSoundPath
    54                     = Startup.StartupSoundPath filenamejoin CustomSettings.StartupSoundFile.localPath
    54                     = Startup.StartupSoundPath filenamejoin CustomSettings.StartupSoundFile.localPath
    55             </rule>
    55             </rule>
    56         </ruleml>
    56         </ruleml>
    57 
    57 
    58         <content xmlns="http://www.s60.com/xml/content/3">
    58         <content xmlns="http://www.s60.com/xml/content/2">
    59             <output file="${StartupSettings.StartupSoundPath}">
    59             <output file="${StartupSettings.StartupSoundPath}">
    60                 <input file="${CustomSettings.StartupSoundFile.localPath}"/>
    60                 <input file="${CustomSettings.StartupSoundFile.localPath}"/>
    61             </output>
    61             </output>
    62         </content>        
    62         </content>        
    63     </container>
    63     </container>
    69 correct place. 
    69 correct place. 
    70 Notice how the XML namespaces are defined. 
    70 Notice how the XML namespaces are defined. 
    71 
    71 
    72  - The container is in http://www.symbianfoundation.org/xml/implml/1, the root element of implml namespace must always be container
    72  - The container is in http://www.symbianfoundation.org/xml/implml/1, the root element of implml namespace must always be container
    73  - The ruleml is in http://www.s60.com/xml/ruleml/2
    73  - The ruleml is in http://www.s60.com/xml/ruleml/2
    74  - The content is in xmlns="http://www.s60.com/xml/content/3"
    74  - The content is in xmlns="http://www.s60.com/xml/content/2"
    75 
    75 
    76 When reading the implementation file, ConE checks the document root and its namespace 
    76 When reading the implementation file, ConE checks the document root and its namespace 
    77 to find out from namespace to start parsing. 
    77 to find out from namespace to start parsing. 
    78 
    78 
    79 .. _implml-file-extensions:
    79 .. _implml-file-extensions:
   155 .. code-block:: xml
   155 .. code-block:: xml
   156 
   156 
   157     <?xml version="1.0" encoding="UTF-8"?>
   157     <?xml version="1.0" encoding="UTF-8"?>
   158     <container xmlns="http://www.symbianfoundation.org/xml/implml/1">
   158     <container xmlns="http://www.symbianfoundation.org/xml/implml/1">
   159         <container>
   159         <container>
   160             <phase name="pre">
   160             <phase name="pre"/>
   161             <ruleml xmlns="http://www.s60.com/xml/ruleml/2">
   161             <ruleml xmlns="http://www.s60.com/xml/ruleml/2">
   162                 <rule>
   162                 <rule>
   163                     CustomSettings.StartupSoundFile.localPath configures 
   163                     CustomSettings.StartupSoundFile.localPath configures 
   164                     StartupSettings.StartupSoundPath = Startup.StartupSoundPath + "/" + CustomSettings.StartupSoundFile.localPath
   164                     StartupSettings.StartupSoundPath = Startup.StartupSoundPath + "/" + CustomSettings.StartupSoundFile.localPath
   165                 </rule>
   165                 </rule>
   166             </ruleml>
   166             </ruleml>
   167         </container>
   167         </container>
   168      
   168      
   169         <container>
   169         <container>
   170             <phase name="normal">
   170             <phase name="normal"/>
   171             <content xmlns="http://www.s60.com/xml/content/3">
   171             <content xmlns="http://www.s60.com/xml/content/2">
   172                 <output file="${StartupSettings.StartupSoundPath}">
   172                 <output file="${StartupSettings.StartupSoundPath}">
   173                     <input file="${CustomSettings.StartupSoundFile.localPath}"/>
   173                     <input file="${CustomSettings.StartupSoundFile.localPath}"/>
   174                 </output>
   174                 </output>
   175             </content>
   175             </content>
   176             
   176             
   177             <!-- Another ContentML section, copies the file to another directory -->
   177             <!-- Another ContentML section, copies the file to another directory -->
   178             <content xmlns="http://www.s60.com/xml/content/3">
   178             <content xmlns="http://www.s60.com/xml/content/2">
   179                 <output dir="some/dir">
   179                 <output dir="some/dir">
   180                     <input file="${CustomSettings.StartupSoundFile.localPath}"/>
   180                     <input file="${CustomSettings.StartupSoundFile.localPath}"/>
   181                 </output>
   181                 </output>
   182             </content>
   182             </content>
   183         </container>
   183         </container>
   289                     <include files="test/file1.txt"/>
   289                     <include files="test/file1.txt"/>
   290                 </input>
   290                 </input>
   291             </output>
   291             </output>
   292         </content>
   292         </content>
   293         
   293         
   294         <ruleml xmlns="http://www.s60.com/xml/ruleml/1" xmlns:implml="http://www.symbianfoundation.org/xml/implml/1">                    
   294         <ruleml xmlns="http://www.s60.com/xml/ruleml/1">                    
   295             <rule>X.Y configures X.Z = X.Y</rule>
   295             <rule>X.Y configures X.Z = X.Y</rule>
   296         </ruleml>
   296         </ruleml>
   297     </container>
   297     </container>
   298 
   298 
   299 
   299 
   308 
   308 
   309     <?xml version="1.0" encoding="UTF-8"?>
   309     <?xml version="1.0" encoding="UTF-8"?>
   310     <container xmlns="http://www.symbianfoundation.org/xml/implml/1">        
   310     <container xmlns="http://www.symbianfoundation.org/xml/implml/1">        
   311         <container>
   311         <container>
   312             <phase name='pre'/>
   312             <phase name='pre'/>
   313             <ruleml xmlns="http://www.s60.com/xml/ruleml/1" xmlns:implml="http://www.symbianfoundation.org/xml/implml/1">                    
   313             <ruleml xmlns="http://www.s60.com/xml/ruleml/1">                    
   314                 <rule>X.Y configures X.Z = X.Y</rule>
   314                 <rule>X.Y configures X.Z = X.Y</rule>
   315             </ruleml>
   315             </ruleml>
   316         </container>
   316         </container>
   317     
   317     
   318         <container>
   318         <container>
   354 There can be multiple tags with the same name, in which case the resulting value
   354 There can be multiple tags with the same name, in which case the resulting value
   355 for that tag will be a list of all the specified values. Examples:
   355 for that tag will be a list of all the specified values. Examples:
   356 
   356 
   357 .. code-block:: xml
   357 .. code-block:: xml
   358 
   358 
   359     <tag name="target" value="core">
   359     <tag name="target" value="core"/>
   360     <tag name="target" value="rofs2">
   360     <tag name="target" value="rofs2"/>
   361     <tag name="target" value="uda">
   361     <tag name="target" value="uda"/>
   362     <tag name="content" value="music">
   362     <tag name="content" value="music"/>
   363 
   363 
   364 Tags can also get their values from ConfML settings, which can be referenced in the usual way:
   364 Tags can also get their values from ConfML settings, which can be referenced in the usual way:
   365 
   365 
   366 .. code-block:: xml
   366 .. code-block:: xml
   367 
   367 
   535             <!-- copy.                                        -->
   535             <!-- copy.                                        -->
   536             <eval_globals file="scripts/file_copy.py"/>
   536             <eval_globals file="scripts/file_copy.py"/>
   537         </ruleml>
   537         </ruleml>
   538         
   538         
   539         <!-- ContentML implementation for copying the created file list to output -->
   539         <!-- ContentML implementation for copying the created file list to output -->
   540         <content xmlns="http://www.s60.com/xml/content/3">
   540         <content xmlns="http://www.s60.com/xml/content/2">
   541             <output dir="some_dir/">
   541             <output dir="some_dir/">
   542                 <input files="${FileCopyTemp.Files.Path}"/>
   542                 <input files="${FileCopyTemp.Files.Path}"/>
   543             </output>
   543             </output>
   544         </content>
   544         </content>
   545         
   545         
   608 .. code-block:: xml
   608 .. code-block:: xml
   609 
   609 
   610     <?xml version="1.0" encoding="UTF-8"?>
   610     <?xml version="1.0" encoding="UTF-8"?>
   611     <container xmlns="http://www.symbianfoundation.org/xml/implml/1">
   611     <container xmlns="http://www.symbianfoundation.org/xml/implml/1">
   612         
   612         
   613         <!-- Temporary sequence setting for storing a generation-time created list of files to copy -->
       
   614         <outputRootDir value="\epoc32\data"/>
   613         <outputRootDir value="\epoc32\data"/>
   615         <outputSubDir value="widgets"/>
   614         <outputSubDir value="widgets"/>
   616 
   615 
   617         <!-- ContentML implementation for copying the created file list to output -->
   616         <content xmlns="http://www.s60.com/xml/content/2">
   618         <content xmlns="http://www.s60.com/xml/content/3">
       
   619             <output dir="some_dir/">
   617             <output dir="some_dir/">
   620                 <input file="test.wgz"/>
   618                 <input file="test.wgz"/>
   621             </output>
   619             </output>
   622         </content>
   620         </content>
   623         
   621         
   624     </container>
   622     </container>
   625 
   623 
   626 In the above example the content is copied to \epoc32\data\widgets\some_dir\text.wgz.
   624 In the above example the content is copied to \\epoc32\\data\\widgets\\some_dir\\text.wgz.
   627 
       
   628 
       
   629 .. rubric:: Footnotes
       
   630 
       
   631 .. [#multi-content-note] In this case the run-time behavior would still be same; ContentML
       
   632    allows multiple ``output`` elements. However, this might not be the case for all
       
   633    implementation languages.
       
   634 
       
   635 .. [#legacy-implml-root-name-note] The specifications for the legacy implementation
       
   636    languages CRML and GenConfML do give the root element names, and say that each
       
   637    implementation must be in its own crml/gcfml file.
       
   638    It is recommended to stick to this convention for these two implementation languages
       
   639    also in the future. Indeed, using them in a multi-implementation file has not been
       
   640    tested and may not even work correctly.