Symbian3/PDK/Source/GUID-99CC6D00-DC3E-51C2-8152-060FB80F5FCD.dita
changeset 1 25a17d01db0c
child 3 46218c8b8afa
equal deleted inserted replaced
0:89d6a7a84779 1:25a17d01db0c
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-99CC6D00-DC3E-51C2-8152-060FB80F5FCD" xml:lang="en"><title>Composing
       
    13 the XML Data</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p>An MMS client may choose to use the SMIL composer to generate the presentation
       
    15 part of outgoing messages, alternatively, it may use template SMIL files.
       
    16 The first option results in a more flexible MMS composer, while the second
       
    17 may be easier to implement. </p>
       
    18 <section><title>Procedure</title> <ol id="GUID-10B85996-706E-5886-B0CB-254B14386863">
       
    19 <li id="GUID-422300FD-099F-54DD-AEFB-6179F15934DE"><p><xref href="GUID-99CC6D00-DC3E-51C2-8152-060FB80F5FCD.dita#GUID-99CC6D00-DC3E-51C2-8152-060FB80F5FCD/GUID-E6F8AD16-4AEC-50DA-A234-5BFB1B54E44C">Build a DOM tree</xref>. </p> </li>
       
    20 <li id="GUID-6AC3C78D-478B-5055-8275-0F9E264CD9A5"><p><xref href="GUID-99CC6D00-DC3E-51C2-8152-060FB80F5FCD.dita#GUID-99CC6D00-DC3E-51C2-8152-060FB80F5FCD/GUID-86533BEC-CF53-5F97-A5D9-A35392B70091">Generate XML data from the DOM tree</xref>. </p> </li>
       
    21 </ol> <p id="GUID-E6F8AD16-4AEC-50DA-A234-5BFB1B54E44C"><b>Build a DOM tree</b> </p> <p>The
       
    22 following steps are required to build the DOM tree: </p> <ol id="GUID-44FDC571-1E07-529B-B15A-F4106B7D5DE0">
       
    23 <li id="GUID-6A5B91D2-8BC8-5A6F-9B48-02C564EBD877"><p>Create a <xref href="GUID-2A597821-BF7F-379A-A32C-99CF9B5CDFAA.dita"><apiname>CMDXMLDocument</apiname></xref> object. </p> </li>
       
    24 <li id="GUID-9095F646-AA1C-5C8E-AB18-CF39FAB0E2E4"><p>Validate it using any
       
    25 of the following methods, if required. </p> <ul>
       
    26 <li id="GUID-5683A64F-25A0-5546-B23B-E6977F8614A2"><p>To validate SMIL data
       
    27 as it is parsed, an instance of the SMIL DTD class must be passed to the <xref href="GUID-3AF26F84-F4C0-312D-9ABD-1C6EC0BD1675.dita"><apiname>CMDXMLParser</apiname></xref> on
       
    28 construction. </p> </li>
       
    29 <li id="GUID-07982E51-D361-5E59-9136-462F5ACF3731"><p>To validate SMIL composition,
       
    30 the SMIL DTD class must be passed to the <xref href="GUID-2A597821-BF7F-379A-A32C-99CF9B5CDFAA.dita"><apiname>CMDXMLDocument</apiname></xref> on
       
    31 construction. </p> </li>
       
    32 </ul> <p> <b>Note: </b> The DTD class provided standard is the SMIL DTD; however
       
    33 it is possible to implement others. In order to provide support for validating
       
    34 other DTDs, it is necessary to derive a class from <xref href="GUID-F294DC1C-D762-3CF7-BB64-18E742BA6EAA.dita"><apiname>MXMLDtd</apiname></xref>. </p> </li>
       
    35 <li id="GUID-FF8536D6-4037-56D5-9028-5ED1586B9879"><p>Call <xref href="GUID-2A597821-BF7F-379A-A32C-99CF9B5CDFAA.dita#GUID-2A597821-BF7F-379A-A32C-99CF9B5CDFAA/GUID-C6D821B2-7571-305C-A6D8-1B031BAE3774"><apiname>CMDXMLDocument::DocumentElement()</apiname></xref> to
       
    36 get the root node of the DOM tree. </p> </li>
       
    37 <li id="GUID-5DC5A1B2-5A5A-5BC1-923C-648B39937D4A"><p>Create a child node
       
    38 of the required type, for example <xref href="GUID-DF432AB6-7895-30E8-9B4B-378E61A7A901.dita"><apiname>CMDXMLElement</apiname></xref> or <xref href="GUID-20E3DBF1-98CB-3B4D-AF93-38061F1E827A.dita"><apiname>CMDXMLComment</apiname></xref>. </p> </li>
       
    39 <li id="GUID-D4E61C95-2811-5016-9750-E7CDBB684D26"><p>Add the node using <xref href="GUID-8BBCB6A5-A133-3BDD-8614-E5E2F1FED7E5.dita#GUID-8BBCB6A5-A133-3BDD-8614-E5E2F1FED7E5/GUID-F726866F-6CE0-34E5-B49C-7CC57B37BC1B"><apiname>CMDXMLNode::AppendChild()</apiname></xref>. </p> </li>
       
    40 <li id="GUID-E83CDD32-A47D-55BF-A693-B561B4EA7947"><p>The tree can be navigated
       
    41 as above, as more child nodes are added. </p> <p>Nodes can also be manipulated
       
    42 by using the following functions: </p> <ul>
       
    43 <li id="GUID-64E13F5C-D7DA-5BA5-89DA-B3D6AA7E94CB"><p> <xref href="GUID-8BBCB6A5-A133-3BDD-8614-E5E2F1FED7E5.dita#GUID-8BBCB6A5-A133-3BDD-8614-E5E2F1FED7E5/GUID-34A68CA0-F498-3D7F-963D-F4AE695E0094"><apiname>CMDXMLNode::RemoveChild()</apiname></xref>  </p> </li>
       
    44 <li id="GUID-190BF096-EEB7-5B3B-9BF6-1D950EA0A56D"><p> <xref href="GUID-8BBCB6A5-A133-3BDD-8614-E5E2F1FED7E5.dita#GUID-8BBCB6A5-A133-3BDD-8614-E5E2F1FED7E5/GUID-97E6C080-E365-3B56-B30A-CB7FAB4C399F"><apiname>CMDXMLNode::InsertBefore()</apiname></xref>  </p> </li>
       
    45 <li id="GUID-81622B01-DB8E-5F07-87D1-943D246403E9"><p> <xref href="GUID-8BBCB6A5-A133-3BDD-8614-E5E2F1FED7E5.dita#GUID-8BBCB6A5-A133-3BDD-8614-E5E2F1FED7E5/GUID-0C84FB21-298C-3295-A02E-D2F1005424A6"><apiname>CMDXMLNode::ReplaceChild()</apiname></xref>  </p> </li>
       
    46 </ul> </li>
       
    47 </ol> <p id="GUID-86533BEC-CF53-5F97-A5D9-A35392B70091"><b>Generate XML data
       
    48 from the DOM tree</b> </p> <p>Once the DOM tree has been built it can be used
       
    49 to generate the XML data. The following steps must be followed to compose
       
    50 the data: </p> <ol id="GUID-7C5B89A4-77D5-5755-8B33-E6D61AEEE437">
       
    51 <li id="GUID-952A92F5-FD89-5723-93F7-D0A09F716DD4"><p>Create an instance of <xref href="GUID-78751199-C2AA-37C4-970B-191C4D496AAA.dita"><apiname>CMDXMLComposer</apiname></xref>,
       
    52 passing in an observer. </p> </li>
       
    53 <li id="GUID-7897ABE8-8C44-512B-A5D6-F3E1D3F6E87A"><p>Call <xref href="GUID-78751199-C2AA-37C4-970B-191C4D496AAA.dita#GUID-78751199-C2AA-37C4-970B-191C4D496AAA/GUID-4252C6FB-970D-3ABB-A134-704C62CD4D52"><apiname>CMDXMLComposer::ComposeFile()</apiname></xref>,
       
    54 passing in the name of the file where the XML data is to be written. </p> </li>
       
    55 <li id="GUID-DD8EDCDD-3A0D-56F6-8923-2FF97DE100E8"><p>The composer calls the <xref href="GUID-5D55EC1A-8AF3-360F-A19C-FC93ED9312C6.dita#GUID-5D55EC1A-8AF3-360F-A19C-FC93ED9312C6/GUID-E230031A-8C89-3EC9-8D1A-F31A73723AAA"><apiname>MMDXMLComposerObserver::ComposeFileCompleteL()</apiname></xref> function
       
    56 on the observer when it has completed. The observer can then check the composer
       
    57 to see if the XML has been generated successfully. </p> </li>
       
    58 </ol> </section>
       
    59 </conbody><related-links>
       
    60 <link href="GUID-FDC0004A-A2EE-5B73-9E2D-B6864C600AF9.dita"><linktext>SMIL Parser
       
    61 Overview</linktext></link>
       
    62 <link href="GUID-2468D736-9F95-5412-B687-765D630651C7.dita"><linktext>Parsing the
       
    63 XML Data</linktext></link>
       
    64 </related-links></concept>