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