configurationengine/doc/plugins/genconfml-plugin/genconfmlplugin.rst
author terytkon
Thu, 11 Mar 2010 17:04:37 +0200
changeset 0 2e8eeb919028
permissions -rw-r--r--
Adding EPL version of configurationengine.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
     1
User guide for Generic Configuration File Markup Language (GenConfML) Plugin
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
     2
----------------------------------------------------------------------------
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
     3
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
     4
Introduction
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
     5
'''''''''''''
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
     6
This page describes how to use and configure Generic Configuration File Markup Language 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
     7
(GenConfML) plugin fo ConE. GenConfML is one of the implementation mapping languages for
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
     8
Configuration Markup Language (ConfML). This plugin is used to generate arbitrary text file
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
     9
formats. Currently this language uses a `eXtensible Stylesheet Language Transformations 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    10
(XSLT) <http://www.w3.org/TR/xslt>`_ style sheet for generating a file for selected settings. 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    11
Support for other style sheet or transformation mechanisms than 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    12
`XSLT <http://www.w3.org/TR/xslt>`_ could be added later.
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    13
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    14
GenConfML files are executed by default in **normal** :ref:`invocation phase <implml-common-invocation-phase>`.
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    15
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    16
GenConfML
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    17
'''''''''
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    18
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    19
The GenConfML (Generic Configuration File ML) syntax is a extension of Configuration markup 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    20
language (confml). The term in confml for this extension is implementation method language 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    21
(implml), which in GenConfML case is a xml file. 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    22
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    23
  * Namespace: ``http://www.s60.com/xml/genconfml/1``
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    24
  * File extension: ``gcfml``
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    25
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    26
.. note::
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    27
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    28
   More information about :ref:`file extensions <implml-file-extensions>`. 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    29
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    30
GenConfML Elements
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    31
..................
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    32
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    33
The GenConfML model is drawn out as a uml model in below picture.
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    34
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    35
  .. image:: gcfml.jpg
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    36
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    37
.. note::
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    38
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    39
   GenConfML supports also common ImplML elements. More information about :ref:`ImplML elements <implml-common-elements>` . 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    40
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    41
<file> Element
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    42
**************
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    43
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    44
The ``file`` element is the root element of the configuration, and acts as a container to the rest of the elements. Each 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    45
generated file must be defined in its own Generic Configuration File XML file.  The input file for XSLT processor is 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    46
the Configuration ML file including only the data element containing values for all selected settings. Following XSLT 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    47
output types are supported: XML, HTML, and text.  
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    48
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    49
Attributes
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    50
++++++++++
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    51
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    52
====================  ======================  ===============================================================================
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    53
Attribute             Required                Description
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    54
====================  ======================  ===============================================================================
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    55
name                  Yes                     Defines a name of the output file. Can contain path that is used to create 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    56
                                              subfolders under output directory.
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    57
target                No                      Defines a Symbian specific attribute for additional path information. Final 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    58
                                              target path is a combination of target and name. The combined path is used in 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    59
                                              output directory and in IBY file. If target attribute is not supported full 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    60
                                              path can be defined also as a value of name attribute.
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    61
====================  ======================  ===============================================================================
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    62
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    63
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    64
Child Elements
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    65
++++++++++++++
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    66
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    67
====================  ======================  ===============================================================================
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    68
Element               Cardinality             Description
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    69
====================  ======================  ===============================================================================
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    70
setting               0 .. *                  Defines a configuration setting reference that is used as an input in  XSLT
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    71
                                              prosessing.
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    72
xsl:stylesheet        1                       Defines stylesheet for XSLT processor. 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    73
====================  ======================  ===============================================================================
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    74
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    75
Example
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    76
+++++++
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    77
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    78
.. code-block:: xml
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    79
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    80
    <file xmlns="http://www.s60.com/xml/genconfml/1" name="myname.txt" target="">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    81
     ...
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    82
    </file>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    83
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    84
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    85
<setting> Element
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    86
*****************
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    87
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    88
Setting element is mandatory element containing the settings used in this transformation.
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    89
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    90
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    91
Attributes
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    92
++++++++++
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    93
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    94
====================  ======================  ===============================================================================
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    95
Attribute             Required                Description
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    96
====================  ======================  ===============================================================================
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    97
ref                   Yes                     Defines a Feature/setting reference pair. All settings inside one feature 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    98
                                              can be selected by using Feature/*.
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    99
====================  ======================  ===============================================================================
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   100
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   101
Example
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   102
+++++++
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   103
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   104
.. code-block:: xml
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   105
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   106
    <setting ref="MyFeature/Setting1"/> 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   107
    
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   108
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   109
<xsl:stylesheet> Element
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   110
************************
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   111
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   112
Xsl:stylesheet element defines the XSLT [3] stylesheet used to transform input data from ConfML to output file.
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   113
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   114
The style sheet can be defined inside file element or in external file identified using stylesheet attribute.
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   115
If style sheet is completely omitted then input file is to be used as such as the configuration file without any transformation.
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   116
The MIME type for XML files of Generic Configuration File ML is ``text/application+xml``. 
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   117
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   118
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   119
Full example files
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   120
''''''''''''''''''
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   121
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   122
Example Generic Configuration File ML file:
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   123
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   124
.. literalinclude:: genconfml_example1.txt
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   125
   :language: xml
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   126
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   127
Example file that is passed to the included XSLT processor contains only selected data elements:
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   128
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   129
.. literalinclude:: genconfml_example2.txt
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   130
   :language: xml
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   131
   
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   132
Example output file that is generated by XSLT processor:
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   133
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   134
.. literalinclude:: genconfml_example3.txt
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   135
   :language: xml
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   136
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   137
The output file will be located under the output folder in a sub-folder determined based on the
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   138
name and target attributes of the file element. E.g., in this case the output file's path is
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   139
``output_dir/private/2000BEE5/CamcorderData.xml``.
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   140
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   141
Notice that same result is obtained by having the following line in the GenConfML file:
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   142
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   143
.. literalinclude:: genconfml_example5.txt
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   144
   :language: xml
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   145
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   146
XSD
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   147
'''''''''
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   148
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   149
Download: :download:`gcfml.xsd </xsd/gcfml.xsd>`
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   150
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   151
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   152
FAQ
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   153
'''''''''
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   154
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   155
This will be updated based on the questions.
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   156