--- a/extension_makefiles/test/xml_sitestfiledist.mk Fri Jun 11 16:29:19 2010 +0100
+++ b/extension_makefiles/test/xml_sitestfiledist.mk Thu Jul 22 16:49:54 2010 +0100
@@ -31,7 +31,7 @@
DEST_DIR = $(EPOCROOT)epoc32/data/z/system/xmltest/serviceindication
endif
-SOURCE_DIR = $(EXTENSION_ROOT)/../test/rtest/data/serviceindication
+SOURCE_DIR = $(EXTENSION_ROOT)/../data/serviceindication
# Ensure we have a clean canvas - this also avoids us having to specify
# switches to commands that are not recognised across platforms.
--- a/extension_makefiles/test/xml_stringdictionary00tagtable.mk Fri Jun 11 16:29:19 2010 +0100
+++ b/extension_makefiles/test/xml_stringdictionary00tagtable.mk Thu Jul 22 16:49:54 2010 +0100
@@ -22,9 +22,9 @@
GENERATED_FILES = $(BUILD_DIR)/t_stringdictionary00tagtable.cpp
-$(BUILD_DIR)/t_stringdictionary00tagtable.cpp : $(EXTENSION_ROOT)/../test/rtest/tsrc/t_stringdictionary00tagtable.st
+$(BUILD_DIR)/t_stringdictionary00tagtable.cpp : $(EXTENSION_ROOT)/../tsrc/t_stringdictionary00tagtable.st
$(call createdir,$(BUILD_DIR))
- @perl $(EPOCROOT)epoc32/tools/ecopyfile.pl $(EXTENSION_ROOT)/../test/rtest/tsrc/t_stringdictionary00tagtable.st $(BUILD_DIR)$/t_stringdictionary00tagtable.st
+ @perl $(EPOCROOT)epoc32/tools/ecopyfile.pl $(EXTENSION_ROOT)/../tsrc/t_stringdictionary00tagtable.st $(BUILD_DIR)$/t_stringdictionary00tagtable.st
@perl $(EPOCROOT)epoc32/tools/stringtable.pl $(BUILD_DIR)/t_stringdictionary00tagtable.st
DO_NOTHING:
--- a/extension_makefiles/test/xml_syncmltestfiledist.mk Fri Jun 11 16:29:19 2010 +0100
+++ b/extension_makefiles/test/xml_syncmltestfiledist.mk Thu Jul 22 16:49:54 2010 +0100
@@ -31,7 +31,7 @@
DEST_DIR = $(EPOCROOT)epoc32/data/z/system/xmltest/syncml
endif
-SOURCE_DIR = $(EXTENSION_ROOT)/../test/rtest/data/syncml
+SOURCE_DIR = $(EXTENSION_ROOT)/../data/syncml
# Ensure we have a clean canvas - this also avoids us having to specify
# switches to commands that are not recognised across platforms.
--- a/extension_makefiles/test/xml_wmltestfiledist.mk Fri Jun 11 16:29:19 2010 +0100
+++ b/extension_makefiles/test/xml_wmltestfiledist.mk Thu Jul 22 16:49:54 2010 +0100
@@ -31,7 +31,7 @@
DEST_DIR = $(EPOCROOT)epoc32/data/z/system/xmltest/wml
endif
-SOURCE_DIR = $(EXTENSION_ROOT)/../test/rtest/data/Wml
+SOURCE_DIR = $(EXTENSION_ROOT)/../data/Wml
# Ensure we have a clean canvas - this also avoids us having to specify
# switches to commands that are not recognised across platforms.
--- a/group/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -14,11 +14,23 @@
* Description: Build information file for xmlsrv package
*
*/
-
+PRJ_PLATFORMS
+DEFAULT
#include "../inc/xmlsrv.hrh"
#include "../xmlsrv_plat/group/bld.inf"
+
+#include "../extension_makefiles/group/bld.inf"
+#include "../xml/cxmllibrary/group/bld.inf"
+#include "../xml/xmlparser/group/bld.inf"
+#include "../xml/legacyminidomparser/GROUP/bld.inf"
+#include "../xml/xmlfw/GROUP/bld.inf"
+#include "../xml/libxml2libs/group/bld.inf"
+#include "../xml/xmldomandxpath/GROUP/bld.inf"
+#include "../xml/wbxmlparser/group/bld.inf"
+#include "../xml/xmllibxml2parser/group/bld.inf"
+#include "../xml/xmlexpatparser/group/bld.inf"
+
#include "../xmlsecurityengine/group/bld.inf"
-#include "../extension_makefiles/group/bld.inf"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/group/xml.pkg Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,118 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;
+; Installation file for STIF
+;
+
+; Languages
+&EN
+
+; Provide value for uid
+#{"XmlTest"},(0x00000000),1,0,0,TYPE=SA
+
+; Series60 product id for S60 3.0
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+; Logo
+; None
+
+; Package signature - Optional
+; None
+
+; Start of Package body
+
+; Condition blocks
+; None
+
+; Options list
+; None
+
+; Install files
+;Test exes
+"\epoc32\release\armv5\urel\t_gmxmlparser.exe" - "c:\Sys\Bin\t_gmxmlparser.exe"
+"\epoc32\release\armv5\urel\t_gmxmlfailure.exe" - "c:\Sys\Bin\t_gmxmlfailure.exe"
+"\epoc32\release\armv5\urel\t_smiltranslatortest.exe" - "c:\Sys\Bin\t_smiltranslatortest.exe"
+"\epoc32\release\armv5\urel\te_XML_FTmgrSuite.exe" - "c:\Sys\Bin\te_XML_FTmgrSuite.exe"
+"\epoc32\release\armv5\urel\def130695_Suite.exe" - "c:\Sys\Bin\def130695_Suite.exe"
+"\epoc32\release\armv5\urel\texml2.exe" - "c:\Sys\Bin\texml2.exe"
+"\epoc32\release\armv5\urel\t_wbxmlsyncmlparserstabilitytests.exe" - "c:\Sys\Bin\t_wbxmlsyncmlparserstabilitytests.exe"
+"\epoc32\release\armv5\urel\t_wbxmlwmlparserstabilitytests.exe" - "c:\Sys\Bin\t_wbxmlwmlparserstabilitytests.exe"
+"\epoc32\release\armv5\urel\t_wbxmlsiparserstabilitytests.exe" - "c:\Sys\Bin\t_wbxmlsiparserstabilitytests.exe"
+"\epoc32\release\armv5\urel\t_wbxmloomsyncmlparserstabilitytests.exe" - "c:\Sys\Bin\t_wbxmloomsyncmlparserstabilitytests.exe"
+"\epoc32\release\armv5\urel\t_wbxmloomwmlparserstabilitytests.exe" - "c:\Sys\Bin\t_wbxmloomwmlparserstabilitytests.exe"
+"\epoc32\release\armv5\urel\t_wbxmloomsiparserstabilitytests.exe" - "c:\Sys\Bin\t_wbxmloomsiparserstabilitytests.exe"
+"\epoc32\release\armv5\urel\t_wbxmlparsertests.exe" - "c:\Sys\Bin\t_wbxmlparsertests.exe"
+"\epoc32\release\armv5\urel\t_wbxmloomparsertests.exe" - "c:\Sys\Bin\t_wbxmloomparsertests.exe"
+"\epoc32\release\armv5\urel\t_wbxmlcorruptparsertests.exe" - "c:\Sys\Bin\t_wbxmlcorruptparsertests.exe"
+"\epoc32\release\armv5\urel\t_wbxmlunknownparsertests.exe" - "c:\Sys\Bin\t_wbxmlunknownparsertests.exe"
+"\epoc32\release\armv5\urel\t_wbxmlbehaviourparsertests.exe" - "c:\Sys\Bin\t_wbxmlbehaviourparsertests.exe"
+"\epoc32\release\armv5\urel\t_wbxmlparserucs4testspartone.exe" - "c:\Sys\Bin\t_wbxmlparserucs4testspartone.exe"
+"\epoc32\release\armv5\urel\t_wbxmldefects.exe" - "c:\Sys\Bin\t_wbxmldefects.exe"
+"\epoc32\release\armv5\urel\xmlengdom_tef.exe" - "c:\Sys\Bin\xmlengdom_tef.exe"
+"\epoc32\release\armv5\urel\xmlengdomnodeset_tef.exe" - "c:\Sys\Bin\xmlengdomnodeset_tef.exe"
+"\epoc32\release\armv5\urel\xmlengdomutils_tef.exe" - "c:\Sys\Bin\xmlengdomutils_tef.exe"
+"\epoc32\release\armv5\urel\xmlengxpathutils_tef.exe" - "c:\Sys\Bin\xmlengxpathutils_tef.exe"
+"\epoc32\release\armv5\urel\t_xmlparser.exe" - "c:\Sys\Bin\t_xmlparser.exe"
+"\epoc32\release\armv5\urel\t_xmlparserheap.exe" - "c:\Sys\Bin\t_xmlparserheap.exe"
+"\epoc32\release\armv5\urel\t_xmldefect.exe" - "c:\Sys\Bin\t_xmldefect.exe"
+"\epoc32\release\armv5\urel\tc_xmlcustomresolvercomptests.exe" - "c:\Sys\Bin\tc_xmlcustomresolvercomptests.exe"
+"\epoc32\release\armv5\urel\t_xmlcore.exe" - "c:\Sys\Bin\t_xmlcore.exe"
+"\epoc32\release\armv5\urel\t_xmlmisc.exe" - "c:\Sys\Bin\t_xmlmisc.exe"
+"\epoc32\release\armv5\urel\tp_xmlframeworkperftests.exe" - "c:\Sys\Bin\tp_xmlframeworkperftests.exe"
+"\epoc32\release\armv5\urel\tu_xmlcmatchdataunittests.exe" - "c:\Sys\Bin\tu_xmlcmatchdataunittests.exe"
+"\epoc32\release\armv5\urel\t_xmlprocessfilemancopyfile.exe" - "c:\Sys\Bin\t_xmlprocessfilemancopyfile.exe"
+"\epoc32\release\armv5\urel\t_parserucs4test.exe" - "c:\Sys\Bin\t_parserucs4test.exe"
+"\epoc32\release\armv5\urel\texmlparser2.exe" - "c:\Sys\Bin\texmlparser2.exe"
+
+; Test DLL's
+"\epoc32\release\armv5\urel\xmlengtester.dll" - "c:\Sys\Bin\xmlengtester.dll"
+
+;ECOM PLUGINS
+"\epoc32\release\armv5\urel\t_testxmlparserplugin1.dll" - "c:\Sys\Bin\t_testxmlparserplugin1.dll"
+"\epoc32\data\Z\Resource\Plugins\t_testxmlparserplugin1.RSC" - "c:\Resource\Plugins\t_testxmlparserplugin1.RSC"
+"\epoc32\release\armv5\urel\t_testxmlparserplugin2.dll" - "c:\Sys\Bin\t_testxmlparserplugin2.dll"
+"\epoc32\data\Z\Resource\Plugins\t_testxmlparserplugin2.RSC" - "c:\Resource\Plugins\t_testxmlparserplugin2.RSC"
+"\epoc32\release\armv5\urel\tu_xmlramparserplugins.dll" - "c:\Sys\Bin\tu_xmlramparserplugins.dll"
+"\epoc32\data\Z\Resource\Plugins\tu_xmlramparserplugins.RSC" - "c:\Resource\Plugins\tu_xmlramparserplugins.RSC"
+"\epoc32\release\armv5\urel\t_validator.dll" - "c:\Sys\Bin\t_validator.dll"
+"\epoc32\data\Z\Resource\Plugins\t_validator.RSC" - "c:\Resource\Plugins\t_validator.RSC"
+"\epoc32\release\armv5\urel\t_parser.dll" - "c:\Sys\Bin\t_parser.dll"
+"\epoc32\data\Z\Resource\Plugins\t_parser.RSC" - "c:\Resource\Plugins\t_parser.RSC"
+"\epoc32\release\armv5\urel\t_stringdictionary00.dll" - "c:\Sys\Bin\t_stringdictionary00.dll"
+"\epoc32\data\Z\Resource\Plugins\t_stringdictionary00.RSC" - "c:\Resource\Plugins\t_stringdictionary00.RSC"
+"\epoc32\release\armv5\urel\tu_xmlromparserplugins.dll" - "c:\Sys\Bin\tu_xmlromparserplugins.dll"
+"\epoc32\data\Z\Resource\Plugins\tu_xmlromparserplugins.RSC" - "c:\Resource\Plugins\tu_xmlromparserplugins.RSC"
+"\epoc32\release\armv5\urel\tetestcontentprocessor.dll" - "c:\Sys\Bin\tetestcontentprocessor.dll"
+"\epoc32\data\Z\Resource\Plugins\tetestcontentprocessor.RSC" - "c:\Resource\Plugins\tetestcontentprocessor.RSC"
+"\epoc32\release\armv5\urel\wml1_1stringdictionary255.dll" - "c:\Sys\Bin\wml1_1stringdictionary255.dll"
+"\epoc32\data\Z\Resource\Plugins\wml1_1stringdictionary255.RSC" - "c:\Resource\Plugins\wml1_1stringdictionary255.RSC"
+
+;Scripts
+"\epoc32\data\z\tef_xml2\xmlparser2tefsuite.script" - "c:\tef_xml2\xmlparser2tefsuite.script"
+"\epoc32\data\z\xmlengdom_tef\xmlengxpathutilstestsuite.script" - "c:\xmlengdom_tef\xmlengxpathutilstestsuite.script"
+"\epoc32\data\z\xmlengdom_tef\xmlengdomutiltefsuite.script" - "c:\xmlengdom_tef\xmlengdomutiltefsuite.script"
+"\epoc32\data\z\xmlengdom_tef\xmlengdomnodetesttefsuite.script" - "c:\xmlengdom_tef\xmlengdomnodetesttefsuite.script"
+"\epoc32\data\z\xmlengdom_tef\xmlengdomtefsuite.script" - "c:\xmlengdom_tef\xmlengdomtefsuite.script"
+"\epoc32\data\z\tef_xml2\xml2tefsuite.script" - "c:\tef_xml2\xml2tefsuite.script"
+"\epoc32\data\z\xml\scripts\xmlengutilssmoketest.script" - "c:\xml\scripts\xmlengutilssmoketest.script"
+"\epoc32\data\z\testdata\scripts\def130695_Suite.script" - "c:\testdata\scripts\def130695_Suite.script"
+"\epoc32\data\z\testdata\scripts\te_xml_ftmgrsuite.script" - "c:\testdata\scripts\te_xml_ftmgrsuite.script"
\ No newline at end of file
--- a/layers.sysdef.xml Fri Jun 11 16:29:19 2010 +0100
+++ b/layers.sysdef.xml Thu Jul 22 16:49:54 2010 +0100
@@ -10,5 +10,27 @@
<unit unitID="WSDo.xmlsrv" mrp="" bldFile="&layer_real_source_path;/group" name="xmlsrv" />
</module>
</layer>
+
+ <layer name="api_test_layer">
+ <module name="xmlsrv_test_rtest">
+ <unit unitID="WSDo.xmlsrv_test_rtest1" mrp="" bldFile="&layer_real_source_path;/xml/legacyminidomparser/XMLParser/test/group" name="xmlsrv" />
+ <unit unitID="WSDo.xmlsrv_test_rtest2" mrp="" bldFile="&layer_real_source_path;/xml/wbxmlparser/test/rtest/group" name="xmlsrv" />
+ <unit unitID="WSDo.xmlsrv_test_rtest3" mrp="" bldFile="&layer_real_source_path;/xml/xmlexpatparser/test/rtest/group" name="xmlsrv" />
+ <unit unitID="WSDo.xmlsrv_test_rtest4" mrp="" bldFile="&layer_real_source_path;/xml/xmlfw/test/rtest/group" name="xmlsrv" />
+ </module>
+ <module name="xmlsrv_test_tef">
+ <unit unitID="WSDo.xmlsrv_test_tef1" mrp="" bldFile="&layer_real_source_path;/xml/libxml2libs/test/common/group" name="xmlsrv" />
+ <unit unitID="WSDo.xmlsrv_test_tef2" mrp="" bldFile="&layer_real_source_path;/xml/libxml2libs/test/tef/def130695/group" name="xmlsrv" />
+ <unit unitID="WSDo.xmlsrv_test_tef3" mrp="" bldFile="&layer_real_source_path;/xml/libxml2libs/test/tef/xml2/group" name="xmlsrv" />
+ <unit unitID="WSDo.xmlsrv_test_tef4" mrp="" bldFile="&layer_real_source_path;/xml/xmldomandxpath/test/tef/xmlengdom_tef/group" name="xmlsrv" />
+ <unit unitID="WSDo.xmlsrv_test_tef5" mrp="" bldFile="&layer_real_source_path;/xml/xmldomandxpath/test/tef/xmlengdomnodeset_tef/group" name="xmlsrv" />
+ <unit unitID="WSDo.xmlsrv_test_tef6" mrp="" bldFile="&layer_real_source_path;/xml/xmldomandxpath/test/tef/xmlengdomutils_tef/group" name="xmlsrv" />
+ <unit unitID="WSDo.xmlsrv_test_tef7" mrp="" bldFile="&layer_real_source_path;/xml/xmldomandxpath/test/tef/xmlengxpathutils_tef/group" name="xmlsrv" />
+ <unit unitID="WSDo.xmlsrv_test_tef8" mrp="" bldFile="&layer_real_source_path;/xml/xmllibxml2parser/test/tef/xmlparser2/group" name="xmlsrv" />
+ </module>
+ <module name="xmlsrv_test_stif">
+ <unit unitID="WSDo.xmlsrv_test_stif1" mrp="" bldFile="&layer_real_source_path;/xml/libxml2libs/test/xmlengtester/xmlengtester_target/group" name="xmlsrv" />
+ </module>
+ </layer>
</systemModel>
-</SystemDefinition>
\ No newline at end of file
+</SystemDefinition>
--- a/package_definition.xml Fri Jun 11 16:29:19 2010 +0100
+++ b/package_definition.xml Thu Jul 22 16:49:54 2010 +0100
@@ -68,7 +68,13 @@
<component id="wbxmlparser" name="WBXML Parser" introduced="7.0s" purpose="optional" class="plugin">
<unit bldFile="xml/wbxmlparser/group" mrp="xml/wbxmlparser/group/syslibs_wbxmlparser.mrp"/>
</component>
- </collection>
+ <component id="cxmllibrary" filter="s60" name="CXML Parser">
+ <unit bldFile="xml/cxmllibrary/group"/>
+ </component>
+ <component id="xmlparser" filter="s60" name="XML Parser">
+ <unit bldFile="xml/xmlparser/group"/>
+ </component>
+ </collection>
<collection id="xmlsrv_info" name="XML Services Info" level="specific">
<component id="xmlsrv_plat" filter="s60" name="XML Services Platform Interfaces" class="api">
<unit bldFile="xmlsrv_plat/group"/>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/dictionary/channel_1.1.dict Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,45 @@
+#
+# Dictionary for the WTA "Channel" content type;
+#
+# Specification version = 1.2
+#
+######################################################
+#
+# dictionary name
+#
+channel
+#
+# Public id for WML 1.2
+#
+8
+#
+# Doc type for WML 1.2
+#
+-//WAPFORUM//DTD CHANNEL 1.1//EN
+#
+# Tag table - all are in code page 0
+#
+TAGS_FOR_CODE_PAGE 0
+0x05 channel
+0x06 title
+0x07 abstract
+0x08 resource
+#
+# Attribute table - all are in code page 0
+#
+ATTRIBUTES_FOR_CODE_PAGE 0
+0x05 maxspace
+0x06 base
+0x07 href
+0x08 href=http://
+0x09 href=https://
+0x0A lastmod
+0x0B etag
+0x0C md5
+0x0D success
+0x0E success=http://
+0x0F success=https://
+0x10 failure
+0x11 failure=http://
+0x12 failure=https://
+0x13 EventId
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/dictionary/dict_creator.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,1051 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Author: Frank Richichi
+* Created: Thu Apr 25 10:34:06 2002
+* Modified: Thu Apr 25 11:12:35 2002 (Frank Richichi) richichi@D5250215
+* Language: C
+* Subsystem: N/A
+* RCS: $Id$
+*
+*/
+
+
+/* ****************************************************************
+** Copyright 2000 - Nokia Corporation All rights reserved.
+** Nokia Americas
+** 6000 Connection Drive
+** Irving, Texas 75039
+**
+** Restricted Rights: Use, duplication, or disclosure by the
+** U.S. Government is subject to restrictions as set forth in
+** subparagraph (c)(1)(ii) of DFARS 252.227-7013, or in FAR
+** 52.227-19, or in FAR 52.227-14 Alt. III, as applicable.
+**
+** This software is proprietary to and embodies the confidential
+** technology of Nokia Possession, use, or copying of this software
+** and media is authorized only pursuant to a valid written license
+** from Nokia or an authorized sublicensor.
+**
+** Nokia - Wireless Software Solutions
+*****************************************************************/
+
+#include <stdio.h>
+#include <io.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <time.h>
+
+
+/* ----------------------------------------------------------------------- **
+ The following strings are used to identify the beginning of a tag or
+ attribute list in the input file.
+** ----------------------------------------------------------------------- **/
+
+#define TAG_TABLE_HEADING "TAGS_FOR_CODE_PAGE"
+#define ATTR_TABLE_HEADING "ATTRIBUTES_FOR_CODE_PAGE"
+#define NO_STRINGS "NO_STRINGS"
+
+/* ----------------------------------------------------------------------- **
+ Types for various tables.
+** ----------------------------------------------------------------------- **/
+#define NAME_TABLE_T "NW_Byte"
+#define TOKEN_TABLE_T "NW_WBXML_DictEntry_t"
+#define CODEPAGE_TABLE_T "NW_WBXML_Codepage_t"
+#define DICTIONARY_TABLE_T "NW_WBXML_Dictionary_t"
+#define NAMES_T "NW_String_UCS2Buff_t"
+#define ELEMENT_T "NW_%s_Element"
+#define ATTRIBUTE_T "NW_%s_Attribute"
+#define ELEMENT_TOKEN_T "NW_%s_ElementToken"
+#define ATTRIBUTE_TOKEN_T "NW_%s_AttributeToken"
+
+/* ----------------------------------------------------------------------- **
+ Misc array limits
+** ----------------------------------------------------------------------- **/
+#define TABLE_SIZE 255
+#define MAX_LINE 255
+#define MAX_NAME 255
+#define MAX_TOKEN 4
+#define MAX_DICT_NAME 255
+#define MAX_PUBLIC_ID 255
+#define MAX_DOC_TYPE 255
+#define MAX_START_NAME 255
+#define MAX_TYPE_NAME 255
+
+/* ----------------------------------------------------------------------- **
+ Names used in the generated tables
+** ----------------------------------------------------------------------- **/
+#define TAG_NAME "tag"
+#define ATTR_NAME "attribute"
+
+
+/* ----------------------------------------------------------------------- **
+ Define a type for codepage storage
+** ----------------------------------------------------------------------- **/
+typedef struct codepage_s {
+ int num; /* the code page number */
+ int size; /* the number of entries in table */
+} codepage_t;
+
+
+/* ----------------------------------------------------------------------- **
+ Header information
+** ----------------------------------------------------------------------- **/
+char dict_name[MAX_DICT_NAME];
+char doc_type[MAX_DOC_TYPE];
+char public_id[10];
+
+/* ----------------------------------------------------------------------- **
+ Scratch tables
+** ----------------------------------------------------------------------- **/
+char * tokens[TABLE_SIZE];
+char * names[TABLE_SIZE];
+int sorted_indexes[TABLE_SIZE];
+codepage_t tag_codepages[TABLE_SIZE];
+codepage_t attr_codepages[TABLE_SIZE];
+
+
+/* ----------------------------------------------------------------------- **
+ Records time of program execution and command line arguments
+** ----------------------------------------------------------------------- **/
+static time_t timestamp;
+static int main_argc = 1;
+static char** main_argv;
+
+/* ----------------------------------------------------------------------- **
+ Globals so error clean up is easy
+** ----------------------------------------------------------------------- **/
+static FILE* input_dict;
+static FILE* output_c;
+static FILE* output_h;
+
+static void exit_error(int exit_code) {
+ static char errmsg[]
+ = "#error \"Bad input dictionary data cannot complete code generation\"\n";
+ if (input_dict) fclose(input_dict);
+ if (output_c) {
+ fprintf(output_c, errmsg);
+ fclose(output_c);
+ }
+ if (output_h) {
+ fprintf(output_h, errmsg);
+ fclose(output_h);
+ }
+ exit(exit_code);
+}
+
+void print_usage(char* progname)
+{
+ fprintf(stderr,
+ "Dictionary creator - creates a .c and .h source file for a\n"
+ "NW_Wbxml_Dictionary_t structure from a dictionary data file.\n"
+ "\n"
+ "Usage: %s data_input_file dot_c_output_file dot_h_output_file\n"
+ "\n"
+ " - all args are required\n"
+ "\n"
+ "Comments are defined to be:\n"
+ "\n"
+ " - A line whose first non-whitespace char is '#'\n"
+ " - A blank line or line with only whitespace\n"
+ " Note: Comments are NOT permitted at the end of other lines.\n"
+ "\n"
+ "Input format:\n"
+ "\n"
+ " - Dictionary name = the first non-comment line. The dictionary\n"
+ " that will be created will use this string in the dictionary \n"
+ " name. For example, if the dictionary name is \"wml\", the\n"
+ " following dictionary will be created:\n"
+ "\n"
+ " NW_Wbxml_Dictionary_t NW_wml_dictionary = { ... }\n"
+ "\n"
+ " - Public id = the second non-comment line. This is the Public \n"
+ " Identifier as specified in section 7.2 of the WBML spec. If\n"
+ " a public id has not been defined, use \"1\".\n"
+ "\n"
+ " - Doc Type = the third non-comment line. This is the source\n"
+ " document's Document Type Declaration.\n"
+ "\n"
+ " - The beginning of a Tag table has the following syntax:\n"
+ "\n"
+ " TAGS_FOR_CODE_PAGE <codepage_number> [NO_STRINGS]\n"
+ "\n"
+ " <codepage_number> is required and is a base 10 number\n"
+ "\n"
+ " [NO_STRINGS] is an optional keyword which means output only\n"
+ " the token structures, treat all token names as empty strings\n"
+ "\n"
+ " - The beginning of an Attribute table has the following syntax:\n"
+ "\n"
+ " ATTRIBUTES_FOR_CODE_PAGE <codepage_number> [NO_STRINGS]\n"
+ " \n"
+ " <codepage_number> is required and is a base 10 number\n"
+ "\n"
+ " [NO_STRINGS] is an optional keyword which means output only\n"
+ " the token structures, treat all token names as empty strings\n"
+ "\n"
+ " - The syntax for an entry is the same for both Tag and Attribute \n"
+ " tables\n"
+ "\n"
+ " <token> <name>\n"
+ "\n"
+ " <token> must be a hexadecimal number written as 0x?? (e.g., 0x07)\n"
+ " NOTE: Tokens are sorted as strings so 0x7 MUST be entered as 0x07\n"
+ " or the sorting won't work! It is ok to mix case as all hex\n"
+ " digits are converted to lower case before the sort.\n"
+ "\n"
+ " <name> is any sequence of printable characters without whitespace\n"
+ "\n"
+ " - The input tables do NOT have to be sorted \n"
+ "\n"
+ " - If a language has \"Attribute Value Tokens\", they should be included\n"
+ " in the Attribute table\n"
+ "\n"
+ "Example input file (example.dict):\n"
+ "\n"
+ " #\n"
+ " # Sample dictionary for the WML language\n"
+ " #\n"
+ " wml\n"
+ " #\n"
+ " # WML version 1.2 has a public id of 9\n"
+ " #\n"
+ " 9\n"
+ " #\n"
+ " # WML 1.2 doc type\n"
+ " #\n"
+ " -//WAPFORUM//DTD WML 1.1//EN\n"
+ " #\n"
+ " # Tags\n"
+ " #\n"
+ " TAGS_FOR_CODE_PAGE 0\n"
+ " 0x2b go\n"
+ " 0x1d td\n"
+ " #\n"
+ " # Attributes\n"
+ " #\n"
+ " ATTRIBUTES_FOR_CODE_PAGE 0\n"
+ " 0x12 format\n"
+ " 0xA0 wrap\n"
+ " 0x23 newcontext=true\n"
+ " 0x8F http://www.\n"
+ "\n"
+ "Example run command:\n"
+ "\n"
+ " %s example.dict example.c example.h\n",
+ progname, progname);
+}
+
+static void print_automaticallyGeneratedCodeWarning(FILE *f)
+{
+ int i;
+ static char automaticallyGeneratedCodeWarning[] =
+ "/*\n"
+ "** WARNING\n"
+ "**\n"
+ "** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED\n"
+ "** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM";
+
+ fprintf(f, "%s\n", automaticallyGeneratedCodeWarning);
+ fprintf(f,
+ "**\n"
+ "** This file generated on %s"
+ "** (coordinated universal time)\n"
+ "**\n"
+ "** Command line: ",
+ asctime(gmtime(×tamp))); /* asctime() generates a newline at the end */
+ fprintf(f, "%s", main_argv[0]);
+ for (i = 1; i < main_argc; i++) {
+ fprintf(f, " %s", main_argv[i]);
+ }
+ fprintf(f, "\n*/");
+}
+
+static void print_copyright(FILE *f)
+{
+ struct tm* tm_time;
+ static const char copyright[] =
+ "/* ****************************************************************\n"
+ "** Copyright %d - Nokia Corporation All rights reserved.\n"
+ "** Nokia Americas\n"
+ "** 6000 Connection Drive\n"
+ "** Irving, Texas 75039\n"
+ "**\n"
+ "** Restricted Rights: Use, duplication, or disclosure by the\n"
+ "** U.S. Government is subject to restrictions as set forth in\n"
+ "** subparagraph (c)(1)(ii) of DFARS 252.227-7013, or in FAR\n"
+ "** 52.227-19, or in FAR 52.227-14 Alt. III, as applicable.\n"
+ "**\n"
+ "** This software is proprietary to and embodies the confidential\n"
+ "** technology of Nokia Possession, use, or copying of this software\n"
+ "** and media is authorized only pursuant to a valid written license\n"
+ "** from Nokia or an authorized sublicensor.\n"
+ "**\n"
+ "** Nokia - Wireless Software Solutions\n"
+ "*****************************************************************/";
+
+ tm_time = gmtime(×tamp);
+ fprintf(f, copyright,
+ tm_time->tm_year + 1900);
+}
+
+static FILE * open_file(char* fn, char *perms){
+ FILE* f;
+
+ if ((fn == 0)||((f = fopen(fn, perms)) == 0)){
+ return 0;
+ }else{
+ return f;
+ }
+
+}
+
+static init() {
+ int i;
+
+ for (i=0; i < TABLE_SIZE; i++) {
+ tag_codepages[i].num = -1;
+ attr_codepages[i].num = -1;
+ }
+}
+
+
+/* ----------------------------------------------------------------------- **
+ Read the next line of input and store it in s.
+
+ NOTE: s will have the new-line character stripped
+
+ RETURN: 1 for success and 0 for EOF or failure
+** ----------------------------------------------------------------------- **/
+static int get_line(FILE *f, char s[], int n){
+ int i = 0, j, indx, len;
+ char line[MAX_LINE];
+
+ for(;;) {
+ if ((fgets(line, n, f)) == 0) {
+ /* Either EOF or an error occurred */
+ return 0;
+ }
+ len = (int) strlen(line);
+ /* Skip any preceeding whitespace */
+ for (i=0; i < len; i++) {
+ if (isspace(line[i]))
+ continue;
+ break;
+ }
+ if (i >= len || line[i] == '#')
+ continue;
+ break;
+ }
+
+ /* Fill in s */
+ for (j=i, indx = 0; j < (int) strlen(line); i++, j++, indx++) {
+ if (line[j] == '\n') {
+ break;
+ }
+ if (line[j] == '\t') {
+ /* convert tab to space for isprint() test */
+ line[j] = ' ';
+ }
+ if (!isprint(line[j])) {
+ /* stops on bogus char */
+ fprintf(stderr,
+ "ERROR: Illegal character (may be control char) in input text "
+ "near file byte offset %ld\n",
+ ftell(f));
+ exit_error(1);
+ }
+ s[indx] = line[j];
+ if (indx + 1 == MAX_LINE) break;
+ }
+
+ if (indx > 0)
+ s[indx] = '\000';
+
+ return 1;
+}
+
+
+/* ----------------------------------------------------------------------- **
+ Read the a line of input and break it into three items:
+ For table header
+ 1. Table type name
+ 2. Code page number
+ 3. Optional "NO_STRINGS"
+ For table entry
+ 1. 0x?? token value
+ 2. token string (optional, extends from first nonspace to eol)
+ 3. null
+
+ RETURN: 1 for success and 0 for EOF or failure
+ ** ----------------------------------------------------------------------- **/
+static int get_tuple(FILE *f, char item1[], char item2[], char item3[])
+{
+ char line[MAX_LINE];
+ int i;
+ int j;
+ int len;
+
+ if ((get_line(f, line, MAX_LINE)) != 1) {
+ return 0;
+ }
+
+ len = (int)strlen(line);
+
+ /* tablename or token hex value */
+ j = 0;
+ for (i = 0; i < len; i++) {
+ if (isspace(line[i])) break;
+ if (item1[0] == '0' && j == MAX_TOKEN) {
+ /* have to check for leading '0' because this func is called to process
+ TAG_TABLE_HEADING lines too where length could be longer than MAX_TOKEN */
+ fprintf(stderr, "ERROR: token value too long near input file byte offset %ld\n",
+ ftell(f));
+ exit_error(1);
+ break;
+ }
+ item1[j++] = line[i];
+ }
+ item1[j] = '\0';
+
+ /* whitespace */
+ for (; i < len; i++) {
+ if (!isspace(line[i])) break;
+ }
+
+ /* codepage or token string */
+ j = 0;
+ for (/* continue with i */; i < len; i++) {
+ if (item1[0] != '0' && isspace(line[i])) break;
+ if (j == MAX_NAME) {
+ fprintf(stderr, "ERROR: token string too long near input file byte offset %ld\n",
+ ftell(f));
+ exit_error(1);
+ break;
+ }
+ item2[j++] = line[i];
+ }
+ item2[j] = '\0';
+
+ /* whitespace */
+ for (; i < len; i++) {
+ if (!isspace(line[i])) break;
+ }
+
+ /* nostrings or nothing */
+ j = 0;
+ for (/* continue with i */; i < len; i++) {
+ item3[j++] = line[i];
+ }
+ item3[j] = '\0';
+
+ return 1;
+}
+
+static void process_header(FILE *f)
+{
+ if ((get_line(f, dict_name, MAX_DICT_NAME)) != 1) {
+ fprintf(stderr, "ERROR: reading dictionary name\n");
+ exit_error(1);
+ }
+
+ if ((get_line(f, public_id, MAX_PUBLIC_ID)) != 1) {
+ fprintf(stderr, "ERROR: reading public id\n");
+ exit_error(1);
+ }
+
+ if ((get_line(f, doc_type, MAX_DOC_TYPE)) != 1) {
+ fprintf(stderr, "ERROR: reading doc type\n");
+ exit_error(1);
+ }
+}
+
+static void print_file_header(FILE *output, FILE *outputHeader)
+{
+ fprintf(output, "/*\n");
+ fprintf(output, " * Dictionary = %s\n", dict_name);
+ fprintf(output, " * Public id = %s\n", public_id);
+ fprintf(output, " * Doc Type = %s\n", doc_type);
+ fprintf(output, " */\n");
+ fprintf(output, "\n");
+
+ fprintf(output, "#include \"%s\"\n", main_argv[3]);
+ fprintf(output, "#include \"xml\/cxml\/nw_wbxml_dictionary.h\"\n");
+
+ fprintf(output, "\n");
+
+ /* Including the typedef for public id */
+ fprintf(outputHeader, "#define NW_%s_PublicId %s\n", dict_name, public_id);
+}
+
+static void print_table_header(FILE *output, char * table_type, char *type, char *key, char *code_page, int n)
+{
+ print_automaticallyGeneratedCodeWarning(output);
+ fprintf(output, "\n\n");
+ fprintf(output, "/*\n");
+ fprintf(output, " * %s entries - sorted by %s\n", type, key);
+ fprintf(output, " */\n");
+ fprintf(output, "static const\n");
+ fprintf(output, "%s NW_%s_%s_%s_%s[%d] = {\n", table_type, dict_name, type, key, code_page, n);
+}
+
+static void process_entry(int i, char *token, char *name)
+{
+ tokens[i] = strdup(token);
+ names[i] = strdup(name);
+ sorted_indexes[i] = i;
+}
+
+
+/* ----------------------------------------------------------------------- **
+ Print the table of tokens and names - sorted by token
+ Also create a list of the items, sorted by name
+ ** ----------------------------------------------------------------------- **/
+static void print_token_table(FILE *output, FILE* outputHeader,
+ char *type, char *key, char *code_page, int n,
+ int use_strings)
+{
+ static char tagTypeString[MAX_TYPE_NAME];
+ static char tokenTypeString[MAX_TYPE_NAME];
+
+ /* Must first sort by token */
+ int i, j;
+ char *tmp_token;
+ char *tmp_name;
+ char *tagType = &tagTypeString[0];
+
+ if (strcmp("tag", type) == 0)
+ {
+ (void)sprintf(tagTypeString, ELEMENT_T, dict_name);
+ (void)sprintf(tokenTypeString, ELEMENT_TOKEN_T, dict_name);
+ }
+ else if (strcmp("attribute", type) == 0)
+ {
+ (void)sprintf(tagTypeString, ATTRIBUTE_T, dict_name);
+ (void)sprintf(tokenTypeString, ATTRIBUTE_TOKEN_T, dict_name);
+ }
+ else {
+ fprintf(stderr, "ERROR: internal error\n");
+ exit_error(1);
+ }
+
+ /* make all the tokens lower case */
+ for (i=0; i < n; i++) {
+ int l = (int)strlen(tokens[i]);
+ if (l != 4) {
+ fprintf(stderr,
+ "ERROR: Badly formatted token %s\n"
+ "All token values must be in the form 0x?? (e.g., 0x07) "
+ "or the sorting algorithm won't work.\n"
+ , tokens[i]);
+ exit_error(1);
+ }
+ for (j=0; j < l; j++) {
+ if (isupper(tokens[i][j])) {
+ tokens[i][j] = (char)tolower(tokens[i][j]);
+ }
+ if ((tokens[i][j] != 'x') && isalpha(tokens[i][j])) {
+ if ((tokens[i][j] < 'a') || (tokens[i][j] > 'f')) {
+ fprintf(stderr,
+ "ERROR: Illegal hex digit in token %s\n"
+ , tokens[i]);
+ exit_error(1);
+ }
+ }
+ }
+ }
+
+ for (i=0; i < n-1; i++) {
+ for (j=0; j < n-1; j++) {
+ /*
+ * Sort by token
+ */
+ if ((strcmp(tokens[j], tokens[j+1])) > 0) {
+ /* Swap the two elements */
+ tmp_token = tokens[j];
+ tmp_name = names[j];
+ tokens[j] = tokens[j+1];
+ names[j] = names[j+1];
+ tokens[j+1] = tmp_token;
+ names[j+1] = tmp_name;
+ }
+ }
+ }
+
+ /*
+ * print variables
+ */
+ fprintf(output, "\n");
+ for (i=0; i < n; i++) {
+ char tempName[MAX_NAME+1];
+ int l;
+ if (isdigit(names[i][0])) {
+ tempName[0] = '_';
+ strcpy(tempName+1, names[i]);
+ } else {
+ strcpy(tempName, names[i]);
+ }
+ l = (int)strlen(tempName);
+ for (j = 0; j < l; j++) {
+ if (isdigit(tempName[j])
+ || isalpha(tempName[j])
+ || (tempName[j] == '_')) {
+ continue;
+ }
+ tempName[j] = '_';
+ }
+ if (use_strings) {
+ fprintf(output,
+ "static const NW_Ucs2 %sTag_%s[] = {"
+ , tagType, tempName);
+ for (j=0; j < (int) strlen(names[i]); j++) {
+ if (names[i][j] == '\\') {
+ fprintf(output, "\'\\\\\',");
+ } else {
+ fprintf(output, "\'%c\',", names[i][j]);
+ }
+ }
+ fprintf(output, "\'\\0\'};\n");
+ }
+ }
+ if (!use_strings) {
+ fprintf(output,
+ "static const NW_Ucs2 %sTag_emptyString_%s[] = { \'\\0\' };\n"
+ , tagType, code_page);
+ }
+ fprintf(output, "\n");
+
+ print_table_header(output, TOKEN_TABLE_T, type, key, code_page, n);
+ if (use_strings) {
+ fprintf(outputHeader,
+ "\ntypedef enum %sToken_%s_e{\n",
+ tagType, code_page);
+ }
+ /*
+ * Print the table
+ */
+ for (i=0; i < n; i++) {
+ char tempName[MAX_NAME+1] ;
+ char tempToken[6] ;
+ char *token;
+ int l;
+ if (isdigit(names[i][0])) {
+ tempName[0] = '_';
+ strcpy(tempName+1, names[i]);
+ } else {
+ strcpy(tempName, names[i]);
+ }
+ l = (int)strlen(tempName);
+ for (j = 0; j < l; j++) {
+ if (isdigit(tempName[j])
+ || isalpha(tempName[j])
+ || (tempName[j] == '_')) {
+ continue;
+ }
+ tempName[j] = '_';
+ }
+ strcpy(tempToken, tokens[i]);
+ token = strchr(tempToken, 'x');
+ token++;
+ if (use_strings) {
+ fprintf(output, "\t{%s, (%s *) %sTag_%s", tokens[i], NAMES_T, tagType, tempName);
+ fprintf(outputHeader, "\t%s_%s = 0x0%s%s", tokenTypeString, tempName, code_page, token);
+ } else {
+ fprintf(output, "\t{%s, &%sTag_emptyString_%s", tokens[i], tagType, code_page);
+ }
+
+ if (i == (n-1))
+ {
+ fprintf(output, "}\n");
+ if (use_strings) {
+ fprintf(outputHeader, "\n");
+ }
+ }
+ else
+ {
+ fprintf(output, "},\n");
+ if (use_strings) {
+ fprintf(outputHeader, ",\n");
+ }
+ }
+ }
+ fprintf(output, "};\n\n");
+ if (use_strings) {
+ fprintf(outputHeader, "}%sToken_%s_t;\n\n", tagType, code_page);
+ }
+
+ if (use_strings) {
+ /*
+ * Create an array of the names sorted by index
+ */
+ for (i=0; i < n-1; i++) {
+ for (j=0; j < n-1; j++) {
+ /*
+ * Since we will need an array of the names sorted by index,
+ * generate that arrary now.
+ */
+ if ((strcmp(names[j], names[j+1])) > 0) {
+ /* Swap the two names */
+ int tmp_token;
+ tmp_name = names[j];
+ tmp_token = sorted_indexes[j];
+ names[j] = names[j+1];
+ names[j+1] = tmp_name;
+ sorted_indexes[j] = sorted_indexes[j+1];
+ sorted_indexes[j+1] = tmp_token;
+ }
+ }
+ }
+ }
+}
+
+static void cache_codepage(codepage_t table[], char *cp_num, int n)
+{
+ int num = atoi(cp_num);
+
+ if (num >= TABLE_SIZE) {
+ fprintf(stderr, "ERROR: Codepage '%d' is too large!\n", num);
+ exit(1);
+ }
+
+ table[num].num = num;
+ table[num].size = n;
+}
+
+/*
+ * Print a table of the names
+ */
+static void print_name_table(FILE *output, char *type, char *key, char *code_page, int n,
+ int use_strings)
+{
+ int i;
+
+ print_table_header(output, NAME_TABLE_T, type, key, code_page, n);
+
+ for (i=0; i < n; i++) {
+ if (use_strings) {
+ fprintf(output, "\t%d,\n", sorted_indexes[i]);
+ } else {
+ fprintf(output, "\t0,\n");
+ }
+ }
+
+ fprintf(output, "};\n");
+}
+
+static process_content(FILE *f, FILE *output, FILE* outputHeader)
+{
+ char token[MAX_START_NAME+1]; /* Must be big enough to hold a
+ tag/attr start string */
+ char name[MAX_NAME+1];
+ char optional[MAX_LINE+1];
+ char *tag_code_page = "";
+ char *attr_code_page = "";
+ char processing_tag = 2; /* processing state: 1 = tag, 0 = attribute, 2 = init */
+ int n = 0;
+ int use_strings = 1;
+
+ for(;;) {
+
+ if ((get_tuple(f, token, name, optional)) != 1) {
+ break;
+ }
+
+ if (!strcmp(token, TAG_TABLE_HEADING)) {
+ use_strings = strcmp(optional, NO_STRINGS);
+ if (processing_tag == 1) {
+ /* Process the current tag table */
+ print_token_table(output, outputHeader, TAG_NAME, "token", tag_code_page, n, use_strings);
+ print_name_table(output, TAG_NAME, "name", tag_code_page, n, use_strings);
+ cache_codepage(tag_codepages, tag_code_page, n);
+ n = 0;
+ } else if (processing_tag == 0) {
+ /* Process the current attribute table */
+ print_token_table(output, outputHeader, ATTR_NAME, "token", attr_code_page, n, use_strings);
+ print_name_table(output, ATTR_NAME, "name", attr_code_page, n, use_strings);
+ cache_codepage(attr_codepages, attr_code_page, n);
+ n = 0;
+ }
+ tag_code_page = strdup(name);
+ processing_tag = 1;
+ }
+ else if (!strcmp(token, ATTR_TABLE_HEADING)) {
+ use_strings = strcmp(optional, NO_STRINGS);
+ if (processing_tag == 1) {
+ /* Process the current tag table */
+ print_token_table(output, outputHeader, TAG_NAME, "token", tag_code_page, n, use_strings);
+ print_name_table(output, TAG_NAME, "name", tag_code_page, n, use_strings);
+ cache_codepage(tag_codepages, tag_code_page, n);
+ n = 0;
+ } else if (processing_tag == 0) {
+ /* Process the current attribute table */
+ print_token_table(output, outputHeader, ATTR_NAME, "token", attr_code_page, n, use_strings);
+ print_name_table(output, ATTR_NAME, "name", attr_code_page, n, use_strings);
+ cache_codepage(attr_codepages, attr_code_page, n);
+ n = 0;
+ }
+ attr_code_page = strdup(name);
+ processing_tag = 0;
+ } else {
+ process_entry(n, token, name);
+ n++;
+ }
+ }
+
+ if (processing_tag == 2) {
+ fprintf(stderr,
+ "ERROR: Could not find tag or attribute table starts in file.\n"
+ " Input file syntax has changed.\n"
+ " See usage by executing this program with no arguments.\n");
+ exit_error(1);
+ }
+
+ /*
+ * If anything is left, process it
+ */
+ if (n > 0) {
+ if (processing_tag == 1) {
+ print_token_table(output, outputHeader, TAG_NAME, "token", tag_code_page, n, use_strings);
+ print_name_table(output, TAG_NAME, "name", tag_code_page, n, use_strings);
+ cache_codepage(tag_codepages, tag_code_page, n);
+ } else if (processing_tag == 0) {
+ print_token_table(output, outputHeader, ATTR_NAME, "token", attr_code_page, n, use_strings);
+ print_name_table(output, ATTR_NAME, "name", attr_code_page, n, use_strings);
+ cache_codepage(attr_codepages, attr_code_page, n);
+ }
+ }
+}
+
+static void get_num_codepages(codepage_t cp[], int *n, int *max)
+{
+ int i;
+ /* Determine the number of codepages */
+ for (i=0; i < TABLE_SIZE; i++) {
+ if (cp[i].num != -1) {
+ *max = i;
+ (*n)++;
+ }
+ }
+}
+
+static void print_codepage_table(FILE *output, codepage_t cp[], int n, int max, char *type)
+{
+ int i;
+
+ if (n == 0)
+ return;
+
+ fprintf(output, "static const\n");
+ fprintf(output, "%s NW_%s_%s_codepages[%d] = {\n", CODEPAGE_TABLE_T,
+ dict_name, type, max + 1);
+
+ for (i=0; i <= max && i < TABLE_SIZE; i++) {
+ if (cp[i].num == -1) {
+ fprintf(output, "\t{0, 0, 0},\n");
+ } else {
+ fprintf(output, "\t{%d, (%s*)&NW_%s_%s_token_%d[0], ",
+ cp[i].size, TOKEN_TABLE_T, dict_name, type, cp[i].num);
+ fprintf(output, "(NW_Byte *)&NW_%s_%s_name_%d[0]},\n",
+ dict_name, type, cp[i].num);
+ }
+ }
+ fprintf(output, "};\n");
+}
+
+static void print_codepage_tables(FILE *output)
+{
+ int n=0, max=0;
+
+ /* Tag tables */
+ fprintf(output,
+ "\n"
+ "/*\n"
+ " * Tag codepage table\n"
+ " */\n"
+ );
+
+ get_num_codepages(tag_codepages, &n, &max);
+ print_codepage_table(output, tag_codepages, n, max, TAG_NAME);
+
+ /* Attr tables */
+ fprintf(output,
+ "\n"
+ "/*\n"
+ " * Attribute codepage table\n"
+ " */\n"
+ );
+
+ n = max = 0;
+ get_num_codepages(attr_codepages, &n, &max);
+ print_codepage_table(output, attr_codepages, n, max, ATTR_NAME);
+}
+
+static void add_codepage(FILE *output, codepage_t cp[], char *type)
+{
+ int n=0, max=0;
+
+ get_num_codepages(cp, &n, &max);
+
+ if (n == 0)
+ fprintf(output, "\t0, 0,\n");
+ else
+ fprintf(output, "\t%d, (%s*)&NW_%s_%s_codepages[0],\n", max + 1, CODEPAGE_TABLE_T, dict_name, type);
+}
+
+static void print_dictionary_table(FILE *output, FILE *outputHeader)
+{
+ int i;
+ if (strlen(doc_type) > 0)
+ {
+ fprintf(output, "\nstatic const NW_Ucs2 NW_%s_docType[] = {", dict_name);
+ for (i=0; i < (int) strlen(doc_type); i++)
+ fprintf(output, "\'%c\',", doc_type[i]);
+ fprintf(output, "\'\\0\'};\n");
+ }
+
+ fprintf(output,
+ "\n"
+ "/*\n"
+ " * Dictionary\n"
+ " */\n"
+ );
+
+ fprintf(outputHeader, "extern const %s NW_%s_WBXMLDictionary\n",
+ DICTIONARY_TABLE_T, dict_name);
+ fprintf(output, "%s NW_%s_WBXMLDictionary = {\n", DICTIONARY_TABLE_T, dict_name);
+ fprintf(output, "\tNW_%s_PublicId,\n", dict_name);
+
+ /* Print the doc type as a UCS2 string */
+ fprintf(output, "\t(%s *)NW_%s_docType,\n", "NW_Ucs2", dict_name);
+
+ /* Add the tag and attribute code page */
+ add_codepage(output, tag_codepages, TAG_NAME);
+ add_codepage(output, attr_codepages, ATTR_NAME);
+
+ fprintf(output, "};\n");
+}
+
+static void process_file(FILE *f, FILE *output, FILE* outputHeader)
+{
+ process_header(f);
+
+ print_file_header(output, outputHeader);
+
+ process_content(f, output, outputHeader);
+
+ print_codepage_tables(output);
+
+ print_dictionary_table(output, outputHeader);
+}
+
+int main(int argc, char ** argv){
+ if (argc < 4) {
+ print_usage(argv[0]);
+ exit_error(1);
+ }
+
+ init();
+
+ input_dict = NULL;
+ output_c = NULL;
+ output_h = NULL;
+
+ /* ----------------------------------------------------------------------- **
+ Save info used in print_automaticallyGeneratedCodeWarning()
+ ** ----------------------------------------------------------------------- **/
+ (void)time(×tamp);
+ main_argc = argc;
+ main_argv = argv;
+
+
+ /* ----------------------------------------------------------------------- **
+ Work on files in text mode to ease end-of-line processing in DOS.
+ ** ----------------------------------------------------------------------- **/
+ if ((input_dict = open_file(argv[1], "rt")) == NULL) {
+ fprintf(stderr, "ERROR: Input File '%s' could NOT be opened!\n", argv[1]);
+ exit_error(1);
+ }
+
+ if ((output_c = open_file(argv[2], "wt")) == NULL) {
+ fprintf(stderr, "ERROR: Output .c File '%s' could NOT be opened!\n", argv[2]);
+ exit_error(1);
+ }
+
+ if ((output_h = open_file(argv[3], "wt")) == NULL) {
+ fprintf(stderr, "ERROR: Output .h File '%s' could NOT be opened!\n", argv[3]);
+ exit_error(1);
+ }
+
+ print_copyright(output_c);
+ fprintf(output_c, "\n\n");
+ print_automaticallyGeneratedCodeWarning(output_c);
+ fprintf(output_c, "\n\n");
+
+ print_copyright(output_h);
+ fprintf(output_h, "\n\n");
+ print_automaticallyGeneratedCodeWarning(output_h);
+ fprintf(output_h, "\n\n");
+
+ {
+ int l;
+ char* p = strrchr(argv[3], '.');
+ l = (p == NULL) ? (int)strlen(argv[3]) : p - argv[3];
+
+ fprintf(output_h, "#ifndef HEADER_GUARD_%.*s", l, argv[3]);
+ if (p != NULL) fprintf(output_h, "_%s", p+1);
+ fprintf(output_h,
+ "\n"
+ "#define HEADER_GUARD_%.*s"
+ , l, argv[3]);
+ if (p != NULL) fprintf(output_h, "_%s", p+1);
+ fprintf(output_h,
+ "\n"
+ "\n"
+ "#ifdef __cplusplus\n"
+ "extern \"C\"\n"
+ "{\n"
+ "#endif\n"
+ "\n"
+ "\n"
+ );
+ }
+
+ /* process input */
+ process_file(input_dict, output_c, output_h);
+
+ fprintf(output_c, "\n");
+ print_automaticallyGeneratedCodeWarning(output_c);
+
+ fprintf(output_c, "\n");
+ fprintf(output_h, "\n");
+ print_automaticallyGeneratedCodeWarning(output_h);
+
+ fprintf(output_h,
+ "\n"
+ "\n"
+ "#ifdef __cplusplus\n"
+ "} /* extern \"C\" */\n"
+ "#endif\n"
+ "\n"
+ "#endif\n"
+ );
+
+ /* close files */
+ fclose(input_dict);
+ fclose(output_c);
+ fclose(output_h);
+
+ return 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/dictionary/push_nokprov.dict Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,81 @@
+#
+# Dictionary for push_nokprov
+#
+######################################################
+#
+# dictionary name
+#
+push_nokprov
+#
+# Public id
+#
+1
+#
+# Doc type
+#
+-//WAPFORUM//DTD PROV 1.//EN
+#
+# Tag table - all are in code page
+#
+TAGS_FOR_CODE_PAGE 0
+0x05 characteristic-list
+0x06 characteristic
+0x07 parm
+
+#
+# Attribute table - all are in code page
+#
+ATTRIBUTES_FOR_CODE_PAGE 0
+0x06 type=ADDRESS
+0x07 type=URL
+0x08 type=NAME
+0x10 name
+0x11 value
+0x12 name=BEARER
+0x13 name=PROXY
+0x14 name=PORT
+0x15 name=NAME
+0x16 name=PROXY_TYPE
+0x17 name=URL
+0x18 name=PROXY_AUTHNAME
+0x19 name=PROXY_AUTHSECRET
+0x1A name=SMS_SMSC_ADDRESS
+0x1B name=USSD_SERVICE_CODE
+0x1C name=GPRS_ACCESSPOINTNAME
+0x1D name=PPP_LOGINTYPE
+0x1E name=PROXY_LOGINTYPE
+0x21 name=CSD_DIALSTRING
+0x22 name=PPP_AUTHTYPE
+0x23 name=PPP_AUTHNAME
+0x24 name=PPP_AUTHSECRET
+0x28 name=CSD_CALLTYPE
+0x29 name=CSD_CALLSPEED
+0x45 GSM/CSD
+0x46 GSM/SMS
+0x47 GSM/USSD
+0x48 IS-136/CSD
+0x49 GPRS
+0x60 9200
+0x61 9201
+0x62 9202
+0x63 9203
+0x64 AUTOMATIC
+0x65 MANUAL
+0x6A AUTO
+0x6B 9600
+0x6C 14400
+0x6D 19200
+0x6E 28800
+0x6F 38400
+0x70 PAP
+0x71 CHAP
+0x72 ANALOGUE
+0x73 ISDN
+0x74 43200
+0x75 57600
+0x76 MSISDN_NO
+0x77 IPV4
+0x78 MS_CHAP
+0x7D type=ID
+0x7E name=ISP_NAME
+0x7F type=BOOKMARK
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/dictionary/readme.txt Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,41 @@
+About the WBXML Token Dictionaries
+
+WBXML can use tokens to represent tag names, attribute names, attribute
+names combined with part or all of the attribute value, and part or all
+of an attribute value.
+
+The cXML code needs internal tables that map tokens to strings and strings
+to tokens. To simplify the generation of these tables (dictionaries) a
+simple data file giving token-string pairs is processed by a dictionary
+creator utility program which outputs the required .h and .c files.
+
+The dictionary creator program source code is in dict_creator.c and it
+is a stand-alone program. To compile it with the MS C compiler use the
+command: cl /Zi /W4 /WX dict_creator.c
+
+If you encounter following errors about lib.c can't be found or stdio.h is
+not found in path, you need to set up system var:
+
+INCLUDE: C:\progra~1\micros~3\VC98\Include
+LIB: C:\progra~1\micros~3\VC98\lib
+
+To get dict_creator usage info run dict_creator with no arguments.
+
+Files with extension ".dict" are data input files.
+
+Example runs:
+
+dict_creator xhtml_1_0.dict xhtml_1_0_dict.c nw_xhtml_xhtml_1_0_tokens.h
+dict_creator wml_1_3.dict wml_1_3_dict.c nw_wml1x_wml_1_3_tokens.h
+
+dict_creator si.dict si_dict.c si_dict.h
+
+
+You have to get through dict_creator without errors and then you have to
+get through the C compiler on the output. If the output doesn't compile,
+it may be because dict_creator did something wrong. Dict_creator has to
+make a few transformations on the input to create C variable names and it
+is possible (though we hope never encountered in use) that this produces
+output that won't compile.
+
+END
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/dictionary/si.dict Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,48 @@
+#
+# Dictionary for SI
+#
+######################################################
+#
+# dictionary name
+#
+SI
+#
+# Public id
+#
+5
+#
+# Doc type
+#
+-//WAPFORUM//DTD SI 1.0//EN
+#
+# Tag table - all are in code page 0
+#
+TAGS_FOR_CODE_PAGE 0
+0x05 si
+0x06 indication
+0x07 info
+0x08 item
+
+#
+# Attribute table - all are in code page 0
+#
+ATTRIBUTES_FOR_CODE_PAGE 0
+0x05 action=signal-none
+0x06 action=signal-low
+0x07 action=signal-medium
+0x08 action=signal-high
+0x09 action=delete
+0x0a created
+0x0b href
+0x0c href=http://
+0x0d href=http://www.
+0x0e href=https://
+0x0f href=https://www.
+0x10 si-expires
+0x11 si-id
+0x12 class
+0x13 action
+0x85 .com/
+0x86 .edu/
+0x87 .net/
+0x88 .org/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/dictionary/sl.dict Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,38 @@
+#
+# Dictionary for SL
+#
+######################################################
+#
+# dictionary name
+#
+SL
+#
+# Public id
+#
+6
+#
+# Doc type
+#
+-//WAPFORUM//DTD SL 1.0//EN
+#
+# Tag table - all are in code page 0
+#
+TAGS_FOR_CODE_PAGE 0
+0x05 sl
+
+#
+# Attribute table - all are in code page 0
+#
+ATTRIBUTES_FOR_CODE_PAGE 0
+0x05 action=execute-low
+0x06 action=execute-high
+0x07 action=cache
+0x08 href
+0x09 href=http://
+0x0a href=http://www.
+0x0b href=https://
+0x0c href=https://www.
+0x85 .com/
+0x86 .edu/
+0x87 .net/
+0x88 .org/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/dictionary/syncml_1.1.dict Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,118 @@
+#
+# Dictionary for SyncML#
+######################################################
+#
+# dictionary name
+#
+SyncML_1_0
+#
+# Public id for SyncML 1.0
+#
+0
+#
+# Doc type for WML 1.1
+#
+-//SYNCML/DTD SyncML v1.0/EN
+#
+# Tag table - all are in code page 0
+#
+TAGS_FOR_CODE_PAGE 0
+0x06 Add
+0x07 Alert
+0x08 Archive
+0x09 Atomic
+0x0a Cmd
+0x0b CmdID
+0x0c CmdRef
+0x0d Col
+0x0e Copy
+0x0f Create
+0x10 Cred
+0x11 Data
+0x12 Delete
+0x13 Exec
+0x14 Final
+0x15 Get
+0x16 Item
+0x17 Lang
+0x18 LocID
+0x19 LocName
+0x1a LocURI
+0x1b Map
+0x1c MapItem
+0x1d Meta
+0x1e MsgID
+0x1f MsgRef
+0x20 NoResp
+0x21 NoResults
+0x22 Proto
+0x23 Put
+0x24 Remove
+0x25 Replace
+0x26 Reply
+0x27 RespURI
+0x28 Results
+0x29 Search
+0x2a Sequence
+0x2b SessionID
+0x2c SftDel
+0x2d Source
+0x2e SourceRef
+0x2f Status
+0x30 StatusItem
+0x31 Sync
+0x32 SyncBody
+0x33 SyncHdr
+0x34 SyncML
+0x35 Target
+0x36 TargetRef
+0x37 Update
+0x38 Version
+#
+# Tag table - all are in code page 1
+#
+TAGS_FOR_CODE_PAGE 1
+0x10 Data
+0x11 Format
+0x12 Mark
+0x13 Size
+0x14 Type
+0x15 Version
+#
+# Tag table - all are in code page 2
+#
+TAGS_FOR_CODE_PAGE 2
+0x10 DevInf
+0x11 Man
+0x12 Mod
+0x13 OEM
+0x14 FwV
+0x15 FwD
+0x16 SwV
+0x17 SwD
+0x18 IrV
+0x19 HwD
+0x1a HwV
+0x1b DevID
+0x1c DevTyp
+0x1d KB
+0x1e Mouse
+0x1f Pen
+0x20 Spkr
+0x2a Mic
+0x2b ScnCol
+0x2c ScnSiz
+0x2d AB
+0x2e Cal
+0x2f Msg
+0x30 IMsg
+0x31 Jour
+0x32 Tx
+0x33 Rx
+0x34 Mul
+0x35 SbX
+0x36 Ext
+0x37 XNam
+0x38 XVal
+0x39 FreeID
+0x3a FreeMem
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/dictionary/wml_1.1.dict Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,168 @@
+#
+# Dictionary for WML 1.1
+#
+######################################################
+#
+# dictionary name
+#
+Wml_1_1
+#
+# Public id for WML 1.1
+#
+4
+#
+# Doc type for WML 1.1
+#
+-//WAPFORUM//DTD WML 1.1//EN
+#
+# Tag table - all are in code page 0
+#
+TAGS_FOR_CODE_PAGE 0
+0x1c a
+0x23 access
+0x22 anchor
+0x24 b
+0x25 big
+0x26 br
+0x27 card
+0x28 do
+0x29 em
+0x2a fieldset
+0x2b go
+0x2c head
+0x2d i
+0x2e img
+0x2f input
+0x30 meta
+0x31 noop
+0x33 onevent
+0x34 optgroup
+0x35 option
+0x20 p
+0x32 prev
+0x21 postfield
+0x36 refresh
+0x37 select
+0x3e setvar
+0x38 small
+0x39 strong
+0x1f table
+0x1d td
+0x3b template
+0x3c timer
+0x1e tr
+0x3d u
+0x3f wml
+#
+# Attribute table - all are in code page 0
+#
+ATTRIBUTES_FOR_CODE_PAGE 0
+0x05 accept-charset
+0x52 align
+0x06 align=bottom
+0x07 align=center
+0x08 align=left
+0x09 align=middle
+0x0A align=right
+0x0B align=top
+0x0C alt
+0x54 class
+0x53 columns
+0x0D content
+0x5C content=application/vnd.wap.wmlc;charset=
+0x0F domain
+0x10 emptyok=false
+0x11 emptyok=true
+0x12 format
+0x56 forua=false
+0x57 forua=true
+0x13 height
+0x4A href
+0x4B href=http://
+0x4C href=https://
+0x14 hspace
+0x5A http-equiv
+0x5B http-equiv=Content-Type
+0x5D http-equiv=Expires
+0x55 id
+0x15 ivalue
+0x16 iname
+0x18 label
+0x19 localsrc
+0x1A maxlength
+0x1B method=get
+0x1C method=post
+0x1D mode=nowrap
+0x1E mode=wrap
+0x1F multiple=false
+0x20 multiple=true
+0x21 name
+0x22 newcontext=false
+0x23 newcontext=true
+0x25 onenterbackward
+0x26 onenterforward
+0x24 onpick
+0x27 ontimer
+0x28 optional=false
+0x29 optional=true
+0x33 ordered=false
+0x34 ordered=true
+0x2A path
+0x2E scheme
+0x2F sendreferer=false
+0x30 sendreferer=true
+0x31 size
+0x32 src
+0x58 src=http://
+0x59 src=https://
+0x35 tabindex
+0x36 title
+0x37 type
+0x38 type=accept
+0x39 type=delete
+0x3A type=help
+0x3B type=password
+0x3D type=onenterbackward
+0x3E type=onenterforward
+0x3C type=onpick
+0x3F type=ontimer
+0x45 type=options
+0x46 type=prev
+0x47 type=reset
+0x48 type=text
+0x49 type=vnd.
+0x4D value
+0x4E vspace
+0x4F width
+0x50 xml:lang
+#
+# The attribute value tokens are treated just like the
+# attribute start tokens
+#
+0x85 .com/
+0x86 .edu/
+0x87 .net/
+0x88 .org/
+0x89 accept
+0x8A bottom
+0x8B clear
+0x8C delete
+0x8D help
+0x8E http://
+0x8F http://www.
+0x90 https://
+0x91 https://www.
+0x93 middle
+0x94 nowrap
+0x95 onpick
+0x96 onenterbackward
+0x97 onenterforward
+0x98 ontimer
+0x99 options
+0x9A password
+0x9B reset
+0x9D text
+0x9E top
+0x9F unknown
+0xA0 wrap
+0xA1 www.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/dictionary/wml_1.2.dict Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,177 @@
+#
+# Dictionary for WML 1.2
+#
+######################################################
+#
+# dictionary name
+#
+Wml_1_2
+#
+# Public id for WML 1.2
+#
+9
+#
+# Doc type for WML 1.2
+#
+-//WAPFORUM//DTD WML 1.2//EN
+#
+# Tag table - all are in code page 0
+#
+TAGS_FOR_CODE_PAGE 0
+0x1c a
+0x23 access
+0x22 anchor
+0x24 b
+0x25 big
+0x26 br
+0x27 card
+0x28 do
+0x29 em
+0x2a fieldset
+0x2b go
+0x2c head
+0x2d i
+0x2e img
+0x2f input
+0x30 meta
+0x31 noop
+0x33 onevent
+0x34 optgroup
+0x35 option
+0x20 p
+0x21 postfield
+0x1b pre
+0x32 prev
+0x36 refresh
+0x37 select
+0x3e setvar
+0x38 small
+0x39 strong
+0x1f table
+0x1d td
+0x3b template
+0x3c timer
+0x1e tr
+0x3d u
+0x3f wml
+#
+# Attribute table - all are in code page 0
+#
+ATTRIBUTES_FOR_CODE_PAGE 0
+0x05 accept-charset
+0x5E accesskey
+0x52 align
+0x06 align=bottom
+0x07 align=center
+0x08 align=left
+0x09 align=middle
+0x0A align=right
+0x0B align=top
+0x0C alt
+0x64 cache-control=no-cache
+0x54 class
+0x53 columns
+0x0D content
+0x5C content=application/vnd.wap.wmlc;charset=
+0x0F domain
+0x10 emptyok=false
+0x11 emptyok=true
+0x5F enctype
+0x60 enctype=application/x-www-form-urlencoded
+0x61 enctype=multipart/form-data
+0x12 format
+0x56 forua=false
+0x57 forua=true
+0x13 height
+0x4A href
+0x4B href=http://
+0x4C href=https://
+0x14 hspace
+0x5A http-equiv
+0x5B http-equiv=Content-Type
+0x5D http-equiv=Expires
+0x55 id
+0x15 ivalue
+0x16 iname
+0x18 label
+0x19 localsrc
+0x1A maxlength
+0x1B method=get
+0x1C method=post
+0x1D mode=nowrap
+0x1E mode=wrap
+0x1F multiple=false
+0x20 multiple=true
+0x21 name
+0x22 newcontext=false
+0x23 newcontext=true
+0x25 onenterbackward
+0x26 onenterforward
+0x24 onpick
+0x27 ontimer
+0x28 optional=false
+0x29 optional=true
+0x34 ordered=false
+0x33 ordered=true
+0x2A path
+0x2E scheme
+0x2F sendreferer=false
+0x30 sendreferer=true
+0x31 size
+0x32 src
+0x58 src=http://
+0x59 src=https://
+0x35 tabindex
+0x36 title
+0x37 type
+0x38 type=accept
+0x39 type=delete
+0x3A type=help
+0x3B type=password
+0x3D type=onenterbackward
+0x3E type=onenterforward
+0x3C type=onpick
+0x3F type=ontimer
+0x45 type=options
+0x46 type=prev
+0x47 type=reset
+0x48 type=text
+0x49 type=vnd.
+0x4D value
+0x4E vspace
+0x4F width
+0x50 xml:lang
+0x63 xml:space=default
+0x62 xml:space=preserve
+#
+# The attribute value tokens are treated just like the
+# attribute start tokens
+#
+# The following attributes are not being used.
+0x85 .com/
+0x86 .edu/
+0x87 .net/
+0x88 .org/
+0x89 accept
+0x8A bottom
+0x8B clear
+0x8C delete
+0x8D help
+0x8E http://
+0x8F http://www.
+0x90 https://
+0x91 https://www.
+0x93 middle
+0x94 nowrap
+# 0x95 onpick
+# 0x96 onenterbackward
+# 0x97 onenterforward
+# 0x98 ontimer
+0x99 options
+0x9A password
+0x9B reset
+0x9D text
+0x9E top
+0x9F zzzunknown
+0xA0 wrap
+0xA1 www.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/dictionary/wml_1_3.dict Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,196 @@
+#
+# Dictionary for WML 1.3
+#
+######################################################
+#
+# dictionary name
+#
+Wml_1_3
+#
+# Public id for WML 1.3
+#
+0x0A
+#
+# Doc type for WML 1.3
+#
+-//WAPFORUM//DTD WML 1.3//EN
+#
+# Tag table - all are in code page 0
+#
+TAGS_FOR_CODE_PAGE 0
+0x1c a
+0x23 access
+0x22 anchor
+0x24 b
+0x25 big
+0x26 br
+0x27 card
+0x28 do
+0x29 em
+0x2a fieldset
+0x2b go
+0x2c head
+0x2d i
+0x2e img
+0x2f input
+0x30 meta
+0x31 noop
+0x33 onevent
+0x34 optgroup
+0x35 option
+0x20 p
+0x21 postfield
+0x1b pre
+0x32 prev
+0x36 refresh
+0x37 select
+0x3e setvar
+0x38 small
+0x39 strong
+0x1f table
+0x1d td
+0x3b template
+0x3c timer
+0x1e tr
+0x3d u
+0x3f wml
+#
+# Tag table, code page 1
+#
+TAGS_FOR_CODE_PAGE 1
+0x18 zzzunknown
+
+#
+# Attribute table - all are in code page 0
+#
+ATTRIBUTES_FOR_CODE_PAGE 0
+0x05 accept-charset
+0x5e accesskey
+0x52 align
+0x06 align=bottom
+0x07 align=center
+0x08 align=left
+0x09 align=middle
+0x0a align=right
+0x0b align=top
+0x0c alt
+0x64 cache-control=no-cache
+0x54 class
+0x53 columns
+0x0d content
+0x5c content=application/vnd.wap.wmlc;charset=
+0x0f domain
+0x10 emptyok=false
+0x11 emptyok=true
+0x5f enctype
+0x60 enctype=application/x-www-form-urlencoded
+0x61 enctype=multipart/form-data
+0x12 format
+0x56 forua=false
+0x57 forua=true
+0x13 height
+0x4a href
+0x4b href=http://
+0x4c href=https://
+0x14 hspace
+0x5a http-equiv
+0x5b http-equiv=Content-Type
+0x5d http-equiv=Expires
+0x55 id
+0x15 ivalue
+0x16 iname
+0x18 label
+0x19 localsrc
+0x1a maxlength
+0x1b method=get
+0x1c method=post
+0x1d mode=nowrap
+0x1e mode=wrap
+0x1f multiple=false
+0x20 multiple=true
+0x21 name
+0x22 newcontext=false
+0x23 newcontext=true
+0x25 onenterbackward
+0x26 onenterforward
+0x24 onpick
+0x27 ontimer
+0x28 optional=false
+0x29 optional=true
+0x34 ordered=false
+0x33 ordered=true
+0x2a path
+0x2e scheme
+0x2f sendreferer=false
+0x30 sendreferer=true
+0x31 size
+0x32 src
+0x58 src=http://
+0x59 src=https://
+0x35 tabindex
+0x36 title
+0x37 type
+0x38 type=accept
+0x39 type=delete
+0x3a type=help
+0x3b type=password
+0x3d type=onenterbackward
+0x3e type=onenterforward
+0x3c type=onpick
+0x3f type=ontimer
+0x45 type=options
+0x46 type=prev
+0x47 type=reset
+0x48 type=text
+0x49 type=vnd.
+0x4d value
+0x4e vspace
+0x4f width
+0x50 xml:lang
+0x63 xml:space=default
+0x62 xml:space=preserve
+0x65 cache-control
+0x66 emptyok
+0x67 forua
+0x68 method
+0x69 mode
+0x6a multiple
+0x6b optional
+0x6c newcontext
+0x6d ordered
+0x6e sendreferer
+0x6f xml:space
+0x40 zzzunknown
+
+#
+# The attribute value tokens are treated just like the
+# attribute start tokens
+#
+# The following attributes are not being used.
+0x85 .com/
+0x86 .edu/
+0x87 .net/
+0x88 .org/
+0x89 accept
+0x8a bottom
+0x8b clear
+0x8c delete
+0x8d help
+0x8e http://
+0x8f http://www.
+0x90 https://
+0x91 https://www.
+0x93 middle
+0x94 nowrap
+0x95 onpick
+0x96 onenterbackward
+0x97 onenterforward
+0x98 ontimer
+0x99 options
+0x9a password
+0x9b reset
+0x9d text
+0x9e top
+0x9f unknown
+0xa0 wrap
+0xa1 www.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/dictionary/xhtml_1_0.dict Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,409 @@
+#
+# Dictionary for XHTML/WML2.0
+#
+######################################################
+#
+# dictionary name
+#
+XHTML_1_0
+#
+# Public id for XHTML/WML 2.0 - ref: WAP-192-WBXML-20010725-a Section 7.2
+# use 1 for "Unknown or missing public identifier"
+# Note: this should probably be 0 for "String table index follows; public
+# identifier is encoded as a literal in the string table" but dict_creator.c
+# probably doesn't have this functionality
+#
+4
+#
+# Doc type for WML 2.0
+#
+-//WAPFORUM//DTD WML 2.0//EN
+#
+# Element Tags , code page 0
+#
+TAGS_FOR_CODE_PAGE 0
+
+# Structural: HTML Elements Tags
+
+0x05 body
+0x06 head
+0x07 html
+0x08 title
+0x09 frameset
+0x0a noframes
+0x0b noembed
+0x0c script
+0x0d noscript
+
+
+#Table: HTML Element Tags
+
+0x0e caption
+0x0f table
+0x10 td
+0x11 th
+0x12 tr
+0x13 tbody
+0x14 thead
+0x15 tfoot
+
+#Form: HTML Element Tags
+
+0x16 form
+0x17 input
+0x18 label
+0x19 select
+0x1a option
+0x1b optgroup
+0x1c button
+0x1d textarea
+
+#Frame: HTML Element Tags
+
+0x1e frame
+
+#Style: HTML Element Tags
+
+0x1f style
+
+#Object: HTML Element Tags
+
+0x20 object
+0x21 embed
+0x22 bgsound
+
+#Meta: HTML Element Tags
+
+0x23 meta
+
+#Link: HTML Element Tags
+
+0x24 link
+
+#Image: HTML Element Tags
+
+0x25 img
+0x26 map
+0x27 area
+
+#HyperText: HTML Element Tags
+
+0x28 a
+
+#
+
+#Text: HTML Element Tags Part-1
+#As per WBXML spec. the max token number cab be
+# 0x3F so additional token goes to code page -2
+
+0x29 div
+0x2a font
+0x2b h1
+0x2c h2
+0x2d h3
+0x2e h4
+0x2f h5
+0x30 hr
+0x31 b
+0x32 big
+0x33 i
+0x34 menu
+0x35 span
+0x36 p
+0x37 center
+0x38 dl
+0x39 dt
+0x3a dd
+0x3b ul
+0x3c ol
+0x3d li
+0x3e br
+0x3f nobr
+
+#
+# Element Tags, code page 1
+#
+TAGS_FOR_CODE_PAGE 1
+#Text: HTML Element Tags Part-2
+
+
+0x05 h6
+0x06 em
+0x07 fieldset
+0x08 marquee
+0x09 dir
+0x0a small
+0x0b plaintext
+0x0c pre
+0x0d abbr
+0x0e acronym
+0x0f address
+0x10 blockquote
+0x11 blink
+0x12 cite
+0x13 code
+0x14 dfn
+0x15 u
+0x16 kbd
+0x17 q
+0x18 samp
+0x19 strong
+0x1a var
+0x1b tt
+0x1c sub
+0x1d sup
+0x1e ins
+0x1f del
+0x20 strike
+0x21 s
+
+#Misc Tokens
+
+0x22 param
+
+#Base: HTML Element Tags
+
+0x23 base
+
+#Unknown Tag: Make this Last always
+0x24 zzzunknown
+
+
+#
+# Attribute table, code page 0
+#
+ATTRIBUTES_FOR_CODE_PAGE 0
+0x05 abbr
+0x06 accept-charset
+0x07 accept
+0x08 accesskey
+0x09 action
+0x0a align
+0x0b alink
+0x0c alt
+0x0d archive
+0x0e axis
+0x0f background
+0x10 bgcolor
+0x11 border
+0x12 cellpadding
+0x13 char
+0x14 charoff
+0x15 charset
+0x16 checked
+0x17 cite
+0x18 class
+0x19 classid
+0x1a clear
+0x1b code
+0x1c codebase
+0x1d codetype
+0x1e color
+0x1f cols
+0x20 colspan
+#0x21 compact
+0x22 content
+0x23 coords
+0x24 data
+#0x25 datetime
+0x26 declare
+#0x27 defer
+0x28 dir
+0x29 disabled
+0x2a enctype
+0x2b encoding
+#0x2c for
+#0x2d frame
+0x2e frameborder
+#0x2f headers
+0x30 height
+0x31 href
+#0x32 hreflang
+0x33 hspace
+0x34 http-equiv
+0x35 id
+0x36 ismap
+0x37 label
+#0x38 lang
+0x39 language
+0x3a link
+#0x3b longdesc
+0x3c marginheight
+0x3d marginwidth
+0x3e maxlength
+0x3f media
+# must skip 0x40 - 0x44 - used for global tokens
+0x45 method
+0x46 multiple
+0x47 name
+0x48 nohref
+0x49 noresize
+0x4a noshade
+0x4b nowrap
+#0x4c object
+0x4d onblur
+0x4e onchange
+0x4f onclick
+#0x50 ondblclick
+0x51 onfocus
+#0x52 onkeydown
+#0x53 onkeypress
+#0x54 onkeyup
+0x55 onload
+#0x56 onmousedown
+#0x57 onmousemove
+#0x58 onmouseout
+#0x59 onmouseover
+#0x5a onmouseup
+0x5b onreset
+#0x5c onselect
+0x5d onsubmit
+0x5e onunload
+#0x5f profile
+#0x60 prompt
+0x61 readonly
+0x62 rel
+0x63 rev
+0x64 rows
+0x65 rowspan
+#0x66 rules
+0x67 scheme
+#0x68 scope
+0x69 scrolling
+0x6a selected
+0x6b shape
+0x6c size
+#0x?? span
+# Vodafone proprietary attribute: soundstart
+0x6d soundstart
+0x6e src
+0x6f standby
+0x70 start
+0x71 style
+#0x72 summary
+0x73 tabindex
+0x74 target
+#0x75 text
+0x76 title
+0x77 type
+0x78 usemap
+0x79 valign
+0x7a value
+#0x7b valuetype
+0x7c version
+#0x?? vlink
+# Vodafone proprietary attribute: volume
+0x7d volume
+0x7e vspace
+0x7f width
+#
+# The attribute value tokens are treated just like the
+# attribute start tokens
+#
+0x85 none
+0x86 left
+0x87 right
+0x88 normal
+0x89 italic
+0x8a bold
+0x8b circle
+0x8c disc
+0x8d square
+0x8e always
+0x8f avoid
+0x90 center
+0x91 justify
+0x92 underline
+0x93 blink
+0x94 marquee
+0x95 top
+0x96 middle
+0x97 bottom
+0x98 baseline
+0x9a get
+0x9b post
+#0x9c multiple
+0x9d ltr
+0x9e rtl
+#0x9f char
+0xa0 yes
+0xa1 no
+0xa2 auto
+0xa3 button
+0xa4 submit
+0xa5 reset
+#0xa6 selected
+#0xa7 readonly
+#0xa8 nohref
+#0xa9 noresize
+#0xaa noshade
+#0xab nowrap
+#0xac ismap
+#0xad 0
+0xae 1
+#0xaf declare
+#0xb0 defer
+#0xb1 disabled
+#0xb2 compact
+0xb3 all
+#0xb4 checked
+#0xb5 data
+#0xb6 ref
+#0xb7 object
+#0xb8 text
+0xb9 password
+0xba checkbox
+0xbb radio
+0xbc hidden
+# Vodafone proprietary attribute values: focus, select
+0xbd focus
+0xbe select
+
+#
+# Attribute table, code page 1
+#
+ATTRIBUTES_FOR_CODE_PAGE 1
+0x05 zzzunknown
+# xml-stylesheet is a processing instruction "target" name but is
+# treated as an attribute name
+0x06 xml-stylesheet
+0x07 alternate_name
+0x08 cellspacing
+0x09 text
+0x0a bgproperties
+#0x?? ordered
+#0x?? sendreferer
+
+
+
+#
+# IMODE attribute table - code page 2
+#
+ATTRIBUTES_FOR_CODE_PAGE 2
+0x05 behavior
+0x06 direction
+0x07 loop
+0x08 scrollamount
+0x09 scrolldelay
+#0x0a urn
+0x0b cti
+#0x0c utn
+0x0d telbook
+#0x0e kana
+0x0f email
+#
+# The IMODE attribute value tokens are treated just like the
+# attribute start tokens
+#
+0x86 A
+0x87 a
+0x88 I
+0x89 i
+0x8a scroll
+0x8b slide
+0x8c alternate
+0x21 directkey
+0x22 memoryname
+0x23 istyle
+0x24 mode
+0x25 bordercolor
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/group/BLD.INF Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: cXml Parser build info
+*
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+//WINS THUMB ARMI ARM4 WINSCW
+
+PRJ_EXPORTS
+
+../rom/cXmlParser.iby CORE_OS_LAYER_IBY_EXPORT_PATH(cXmlParser.iby)
+
+
+PRJ_MMPFILES
+cXmlParser.mmp
+
+PRJ_TESTMMPFILES
+//../test/xmlparser_test.mmp
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/group/BWINSCW/CXMLPARSERU.DEF Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,172 @@
+EXPORTS
+ CXML_Additional_Feature_Supprted @ 1 NONAME
+ CXML_Read_From_File @ 2 NONAME
+ CXML_XML_Get_Entity @ 3 NONAME
+ NW_DOM_AttrVal_getExtension @ 4 NONAME
+ NW_DOM_AttrVal_getOpaque @ 5 NONAME
+ NW_DOM_AttrVal_getType @ 6 NONAME
+ NW_DOM_AttrVal_initFromString @ 7 NONAME
+ NW_DOM_AttrVal_initFromToken @ 8 NONAME
+ NW_DOM_AttrVal_toString @ 9 NONAME
+ NW_DOM_AttributeHandle_addVal @ 10 NONAME
+ NW_DOM_AttributeHandle_getEncoding @ 11 NONAME
+ NW_DOM_AttributeHandle_getName @ 12 NONAME
+ NW_DOM_AttributeHandle_getNextVal @ 13 NONAME
+ NW_DOM_AttributeHandle_getToken @ 14 NONAME
+ NW_DOM_AttributeHandle_getValue @ 15 NONAME
+ NW_DOM_AttributeHandle_getValuePrefix @ 16 NONAME
+ NW_DOM_AttributeHandle_initWithStartToken @ 17 NONAME
+ NW_DOM_AttributeListIterator_getNextAttribute @ 18 NONAME
+ NW_DOM_DocumentNode_BuildTree @ 19 NONAME
+ NW_DOM_DocumentNode_BuildWBXMLTree @ 20 NONAME
+ NW_DOM_DocumentNode_Delete @ 21 NONAME
+ NW_DOM_DocumentNode_createDocumentWithNumberPublicId @ 22 NONAME
+ NW_DOM_DocumentNode_createElementNode @ 23 NONAME
+ NW_DOM_DocumentNode_createElementNodeByToken @ 24 NONAME
+ NW_DOM_DocumentNode_createTextNode @ 25 NONAME
+ NW_DOM_DocumentNode_createTextNodeWithTextItem @ 26 NONAME
+ NW_DOM_DocumentNode_getCharacterEncoding @ 27 NONAME
+ NW_DOM_DocumentNode_getDictionary @ 28 NONAME
+ NW_DOM_DocumentNode_getDocumentElement @ 29 NONAME
+ NW_DOM_DocumentNode_getPublicId @ 30 NONAME
+ NW_DOM_DocumentNode_getPublicIdAsNumber @ 31 NONAME
+ NW_DOM_DocumentNode_getVersion @ 32 NONAME
+ NW_DOM_ElementNode_getAttribute @ 33 NONAME
+ NW_DOM_ElementNode_getAttributeHandleByName @ 34 NONAME
+ NW_DOM_ElementNode_getAttributeHandleByToken @ 35 NONAME
+ NW_DOM_ElementNode_getAttributeListIterator @ 36 NONAME
+ NW_DOM_ElementNode_getTagName @ 37 NONAME
+ NW_DOM_ElementNode_getTagToken @ 38 NONAME
+ NW_DOM_ElementNode_hasAttributes @ 39 NONAME
+ NW_DOM_ElementNode_removeAttribute @ 40 NONAME
+ NW_DOM_ElementNode_setAttribute @ 41 NONAME
+ NW_DOM_ElementNode_setAttributeByAttrVal @ 42 NONAME
+ NW_DOM_ElementNode_setAttributeByAttributeHandle @ 43 NONAME
+ NW_DOM_ElementNode_setAttributeByToken @ 44 NONAME
+ NW_DOM_Node_appendChild @ 45 NONAME
+ NW_DOM_Node_getFirstChild @ 46 NONAME
+ NW_DOM_Node_getLastChild @ 47 NONAME
+ NW_DOM_Node_getNextSibling @ 48 NONAME
+ NW_DOM_Node_getNodeName @ 49 NONAME
+ NW_DOM_Node_getNodeToken @ 50 NONAME
+ NW_DOM_Node_getNodeType @ 51 NONAME
+ NW_DOM_Node_getOwnerDocument @ 52 NONAME
+ NW_DOM_Node_getParentNode @ 53 NONAME
+ NW_DOM_Node_getPreviousSibling @ 54 NONAME
+ NW_DOM_Node_hasChildNodes @ 55 NONAME
+ NW_DOM_Node_insertBefore @ 56 NONAME
+ NW_DOM_Node_removeChild @ 57 NONAME
+ NW_DOM_Node_replaceChild @ 58 NONAME
+ NW_DOM_ProcessingInstructionNode_getTargetToken @ 59 NONAME
+ NW_DOM_TextItemIterator_getNextTextItem @ 60 NONAME
+ NW_DOM_TextItem_getEntity @ 61 NONAME
+ NW_DOM_TextItem_getExtension @ 62 NONAME
+ NW_DOM_TextItem_getExtensionInt @ 63 NONAME
+ NW_DOM_TextItem_getExtensionToken @ 64 NONAME
+ NW_DOM_TextItem_getOpaque @ 65 NONAME
+ NW_DOM_TextItem_getString @ 66 NONAME
+ NW_DOM_TextItem_getType @ 67 NONAME
+ NW_DOM_TextItem_initFromEntity @ 68 NONAME
+ NW_DOM_TextItem_initFromExtension @ 69 NONAME
+ NW_DOM_TextItem_initFromExtensionInt @ 70 NONAME
+ NW_DOM_TextItem_initFromOpaque @ 71 NONAME
+ NW_DOM_TextItem_initFromString @ 72 NONAME
+ NW_DOM_TextItem_toString @ 73 NONAME
+ NW_DOM_TextNode_addDataFromTextItem @ 74 NONAME
+ NW_DOM_TextNode_getData @ 75 NONAME
+ NW_DOM_TextNode_getTextItemIterator @ 76 NONAME
+ NW_DOM_TextNode_setData @ 77 NONAME
+ NW_DOM_TextNode_setDataFromTextItem @ 78 NONAME
+ NW_Encoder_StringTable_GetSize @ 79 NONAME
+ NW_Encoder_StringTable_StringTableIterateInit @ 80 NONAME
+ NW_Encoder_StringTable_StringTableIterateNext @ 81 NONAME
+ NW_Encoder_StringTable_addToStringTable @ 82 NONAME
+ NW_Encoder_StringTable_createFromDOM @ 83 NONAME
+ NW_Encoder_StringTable_delete @ 84 NONAME
+ NW_Encoder_StringTable_get @ 85 NONAME
+ NW_Encoder_StringTable_getStringTableOffset @ 86 NONAME
+ NW_Encoder_StringTable_getTotalBytes @ 87 NONAME
+ NW_Encoder_StringTable_new @ 88 NONAME
+ NW_Encoder_encodeWBXML @ 89 NONAME
+ NW_String_UCS2BuffToString @ 90 NONAME
+ NW_String_byteToUCS2Char @ 91 NONAME
+ NW_String_charBuffGetLength @ 92 NONAME
+ NW_String_clearUserOwnsStorage @ 93 NONAME
+ NW_String_concatenate @ 94 NONAME
+ NW_String_deepCopy @ 95 NONAME
+ NW_String_delete @ 96 NONAME
+ NW_String_deleteStorage @ 97 NONAME
+ NW_String_entityToString @ 98 NONAME
+ NW_String_entityToUCS2Char @ 99 NONAME
+ NW_String_equals @ 100 NONAME
+ NW_String_getByteCount @ 101 NONAME
+ NW_String_getCharCount @ 102 NONAME
+ NW_String_getCharCount32 @ 103 NONAME
+ NW_String_getStorage @ 104 NONAME
+ NW_String_getUserOwnsStorage @ 105 NONAME
+ NW_String_initialize @ 106 NONAME
+ NW_String_new @ 107 NONAME
+ NW_String_readChar @ 108 NONAME
+ NW_String_setUserOwnsStorage @ 109 NONAME
+ NW_String_shallowCopy @ 110 NONAME
+ NW_String_stringToUCS2Char @ 111 NONAME
+ NW_String_tokenToString @ 112 NONAME
+ NW_String_ucs2CharLength @ 113 NONAME
+ NW_String_ucs2CharToString @ 114 NONAME
+ NW_TinyDom_AppendDOMTree @ 115 NONAME
+ NW_TinyDom_MakeDOMTree @ 116 NONAME
+ NW_TinyDom_ParserDelete @ 117 NONAME
+ NW_TinyDom_ParserInitialize @ 118 NONAME
+ NW_TinyDom_Parser_construct @ 119 NONAME
+ NW_TinyDom_getParser @ 120 NONAME
+ NW_TinyDom_getTagToken @ 121 NONAME
+ NW_TinyDom_getTree @ 122 NONAME
+ NW_TinyTree_Node_findTree @ 123 NONAME
+ NW_WBXML_Dictionary_destroy @ 124 NONAME
+ NW_WBXML_Dictionary_getAttributeNameByToken @ 125 NONAME
+ NW_WBXML_Dictionary_getAttributeToken @ 126 NONAME
+ NW_WBXML_Dictionary_getByPublicId @ 127 NONAME
+ NW_WBXML_Dictionary_getTagByFqToken @ 128 NONAME
+ NW_WBXML_Dictionary_getTagToken @ 129 NONAME
+ NW_WBXML_Dictionary_initialize @ 130 NONAME
+ NW_WBXML_Dictionary_resolveLiteralToken @ 131 NONAME
+ NW_WBXML_Document_construct @ 132 NONAME
+ NW_WBXML_Document_destruct @ 133 NONAME
+ NW_WBXML_Document_getTableString @ 134 NONAME
+ NW_WBXML_Document_putTableString @ 135 NONAME
+ NW_WBXML_Parser_getOpaque @ 136 NONAME
+ NW_WBXML_Parser_getStringInline @ 137 NONAME
+ NW_WBXML_Parser_newInPlace @ 138 NONAME
+ NW_WBXML_Parser_parseBuffer @ 139 NONAME
+ NW_WBXML_Parser_registerHandler @ 140 NONAME
+ NW_WBXML_Writer_AttributeAndValue @ 141 NONAME
+ NW_WBXML_Writer_AttributeAndValue2 @ 142 NONAME
+ NW_WBXML_Writer_End @ 143 NONAME
+ NW_WBXML_Writer_Header @ 144 NONAME
+ NW_WBXML_Writer_Initialize @ 145 NONAME
+ NW_WBXML_Writer_Opaque @ 146 NONAME
+ NW_WBXML_Writer_PI @ 147 NONAME
+ NW_WBXML_Writer_TagClearContentFlag @ 148 NONAME
+ NW_WBXML_Writer_TagSetAttributesFlag @ 149 NONAME
+ NW_WBXML_Writer_TagSetContentFlag @ 150 NONAME
+ NW_WBXML_Writer_TagString @ 151 NONAME
+ NW_WBXML_Writer_Text @ 152 NONAME
+ NW_XML_ComputeEncoding @ 153 NONAME
+ NW_XML_Parse @ 154 NONAME
+ NW_XML_Reader_AdvanceOffset @ 155 NONAME
+ NW_XML_Reader_AsciiCharMatch @ 156 NONAME
+ NW_XML_Reader_AsciiStringMatch @ 157 NONAME
+ NW_XML_Reader_DataAddressFromBuffer @ 158 NONAME
+ NW_XML_Reader_GetLineColumn @ 159 NONAME
+ NW_XML_Reader_GetPosition @ 160 NONAME
+ NW_XML_Reader_InitFromBuffer @ 161 NONAME
+ NW_XML_Reader_Interval_Start @ 162 NONAME
+ NW_XML_Reader_Interval_Stop @ 163 NONAME
+ NW_XML_Reader_IsDigit @ 164 NONAME
+ NW_XML_Reader_IsLetter @ 165 NONAME
+ NW_XML_Reader_IsSpace @ 166 NONAME
+ NW_XML_Reader_PeekOffset @ 167 NONAME
+ NW_XML_Reader_SetPosition @ 168 NONAME
+ NW_XML_Reader_SkipSpace @ 169 NONAME
+ CXML_DOM_DocumentNode_BuildTree @ 170 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/group/bmarm/CXMLPARSERU.DEF Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,171 @@
+EXPORTS
+ NW_XML_Reader_SkipSpace @ 1 NONAME R3UNUSED ; (null)
+ NW_DOM_AttrVal_getOpaque @ 2 NONAME R3UNUSED ; (null)
+ NW_DOM_AttrVal_getType @ 3 NONAME R3UNUSED ; (null)
+ NW_DOM_AttrVal_initFromString @ 4 NONAME R3UNUSED ; (null)
+ NW_DOM_AttrVal_initFromToken @ 5 NONAME R3UNUSED ; (null)
+ NW_DOM_AttrVal_toString @ 6 NONAME R3UNUSED ; (null)
+ NW_DOM_AttributeHandle_addVal @ 7 NONAME R3UNUSED ; (null)
+ NW_DOM_AttributeHandle_getEncoding @ 8 NONAME R3UNUSED ; (null)
+ NW_DOM_AttributeHandle_getName @ 9 NONAME R3UNUSED ; (null)
+ NW_DOM_AttributeHandle_getNextVal @ 10 NONAME R3UNUSED ; (null)
+ NW_DOM_AttributeHandle_getToken @ 11 NONAME R3UNUSED ; (null)
+ NW_DOM_AttributeHandle_getValue @ 12 NONAME R3UNUSED ; (null)
+ NW_DOM_AttributeHandle_getValuePrefix @ 13 NONAME R3UNUSED ; (null)
+ NW_DOM_AttributeHandle_initWithStartToken @ 14 NONAME R3UNUSED ; (null)
+ NW_DOM_AttributeListIterator_getNextAttribute @ 15 NONAME R3UNUSED ; (null)
+ NW_DOM_DocumentNode_Delete @ 16 NONAME R3UNUSED ; (null)
+ NW_DOM_DocumentNode_createDocumentWithNumberPublicId @ 17 NONAME ; (null)
+ NW_DOM_DocumentNode_createElementNode @ 18 NONAME R3UNUSED ; (null)
+ NW_DOM_DocumentNode_createElementNodeByToken @ 19 NONAME R3UNUSED ; (null)
+ NW_DOM_DocumentNode_createTextNode @ 20 NONAME R3UNUSED ; (null)
+ NW_DOM_DocumentNode_createTextNodeWithTextItem @ 21 NONAME R3UNUSED ; (null)
+ NW_DOM_DocumentNode_getCharacterEncoding @ 22 NONAME R3UNUSED ; (null)
+ NW_DOM_DocumentNode_getDictionary @ 23 NONAME R3UNUSED ; (null)
+ NW_DOM_DocumentNode_getDocumentElement @ 24 NONAME R3UNUSED ; (null)
+ NW_DOM_DocumentNode_getPublicId @ 25 NONAME R3UNUSED ; (null)
+ NW_DOM_DocumentNode_getPublicIdAsNumber @ 26 NONAME R3UNUSED ; (null)
+ NW_DOM_DocumentNode_getVersion @ 27 NONAME R3UNUSED ; (null)
+ NW_DOM_ElementNode_getAttribute @ 28 NONAME R3UNUSED ; (null)
+ NW_DOM_ElementNode_getAttributeHandleByName @ 29 NONAME R3UNUSED ; (null)
+ NW_DOM_ElementNode_getAttributeHandleByToken @ 30 NONAME R3UNUSED ; (null)
+ NW_DOM_ElementNode_getAttributeListIterator @ 31 NONAME R3UNUSED ; (null)
+ NW_DOM_ElementNode_getTagName @ 32 NONAME R3UNUSED ; (null)
+ NW_DOM_ElementNode_getTagToken @ 33 NONAME R3UNUSED ; (null)
+ NW_DOM_ElementNode_hasAttributes @ 34 NONAME R3UNUSED ; (null)
+ NW_DOM_ElementNode_removeAttribute @ 35 NONAME R3UNUSED ; (null)
+ NW_DOM_ElementNode_setAttribute @ 36 NONAME R3UNUSED ; (null)
+ NW_DOM_ElementNode_setAttributeByAttrVal @ 37 NONAME R3UNUSED ; (null)
+ NW_DOM_ElementNode_setAttributeByAttributeHandle @ 38 NONAME R3UNUSED ; (null)
+ NW_DOM_ElementNode_setAttributeByToken @ 39 NONAME R3UNUSED ; (null)
+ NW_DOM_Node_appendChild @ 40 NONAME R3UNUSED ; (null)
+ NW_DOM_Node_getFirstChild @ 41 NONAME R3UNUSED ; (null)
+ NW_DOM_Node_getLastChild @ 42 NONAME R3UNUSED ; (null)
+ NW_DOM_Node_getNextSibling @ 43 NONAME R3UNUSED ; (null)
+ NW_DOM_Node_getNodeName @ 44 NONAME R3UNUSED ; (null)
+ NW_DOM_Node_getNodeToken @ 45 NONAME R3UNUSED ; (null)
+ NW_DOM_Node_getNodeType @ 46 NONAME R3UNUSED ; (null)
+ NW_DOM_Node_getOwnerDocument @ 47 NONAME R3UNUSED ; (null)
+ NW_DOM_Node_getParentNode @ 48 NONAME R3UNUSED ; (null)
+ NW_DOM_Node_getPreviousSibling @ 49 NONAME R3UNUSED ; (null)
+ NW_DOM_Node_hasChildNodes @ 50 NONAME R3UNUSED ; (null)
+ NW_DOM_Node_insertBefore @ 51 NONAME R3UNUSED ; (null)
+ NW_DOM_Node_removeChild @ 52 NONAME R3UNUSED ; (null)
+ NW_DOM_Node_replaceChild @ 53 NONAME R3UNUSED ; (null)
+ NW_DOM_ProcessingInstructionNode_getTargetToken @ 54 NONAME R3UNUSED ; (null)
+ NW_DOM_TextItemIterator_getNextTextItem @ 55 NONAME R3UNUSED ; (null)
+ NW_DOM_TextItem_getEntity @ 56 NONAME R3UNUSED ; (null)
+ NW_DOM_TextItem_getExtension @ 57 NONAME R3UNUSED ; (null)
+ NW_DOM_TextItem_getExtensionInt @ 58 NONAME R3UNUSED ; (null)
+ NW_DOM_TextItem_getExtensionToken @ 59 NONAME R3UNUSED ; (null)
+ NW_DOM_TextItem_getOpaque @ 60 NONAME R3UNUSED ; (null)
+ NW_DOM_TextItem_getString @ 61 NONAME R3UNUSED ; (null)
+ NW_DOM_TextItem_getType @ 62 NONAME R3UNUSED ; (null)
+ NW_DOM_TextItem_initFromEntity @ 63 NONAME R3UNUSED ; (null)
+ NW_DOM_TextItem_initFromExtension @ 64 NONAME R3UNUSED ; (null)
+ NW_DOM_TextItem_initFromExtensionInt @ 65 NONAME R3UNUSED ; (null)
+ NW_DOM_TextItem_initFromOpaque @ 66 NONAME R3UNUSED ; (null)
+ NW_DOM_TextItem_initFromString @ 67 NONAME R3UNUSED ; (null)
+ NW_DOM_TextItem_toString @ 68 NONAME R3UNUSED ; (null)
+ NW_DOM_TextNode_addDataFromTextItem @ 69 NONAME R3UNUSED ; (null)
+ NW_DOM_TextNode_getData @ 70 NONAME R3UNUSED ; (null)
+ NW_DOM_TextNode_getTextItemIterator @ 71 NONAME R3UNUSED ; (null)
+ NW_DOM_TextNode_setData @ 72 NONAME R3UNUSED ; (null)
+ NW_DOM_TextNode_setDataFromTextItem @ 73 NONAME R3UNUSED ; (null)
+ NW_Encoder_encodeWBXML @ 74 NONAME ; (null)
+ NW_String_UCS2BuffToString @ 75 NONAME R3UNUSED ; (null)
+ NW_String_byteToUCS2Char @ 76 NONAME R3UNUSED ; (null)
+ NW_String_charBuffGetLength @ 77 NONAME R3UNUSED ; (null)
+ NW_String_clearUserOwnsStorage @ 78 NONAME R3UNUSED ; (null)
+ NW_String_concatenate @ 79 NONAME R3UNUSED ; (null)
+ NW_String_deepCopy @ 80 NONAME R3UNUSED ; (null)
+ NW_String_delete @ 81 NONAME R3UNUSED ; (null)
+ NW_String_deleteStorage @ 82 NONAME R3UNUSED ; (null)
+ NW_String_entityToString @ 83 NONAME R3UNUSED ; (null)
+ NW_String_entityToUCS2Char @ 84 NONAME R3UNUSED ; (null)
+ NW_String_equals @ 85 NONAME R3UNUSED ; (null)
+ NW_String_getByteCount @ 86 NONAME R3UNUSED ; (null)
+ NW_String_getCharCount @ 87 NONAME R3UNUSED ; (null)
+ NW_String_getStorage @ 88 NONAME R3UNUSED ; (null)
+ NW_String_getUserOwnsStorage @ 89 NONAME R3UNUSED ; (null)
+ NW_String_initialize @ 90 NONAME R3UNUSED ; (null)
+ NW_String_new @ 91 NONAME R3UNUSED ; (null)
+ NW_String_readChar @ 92 NONAME R3UNUSED ; (null)
+ NW_String_setUserOwnsStorage @ 93 NONAME R3UNUSED ; (null)
+ NW_String_shallowCopy @ 94 NONAME R3UNUSED ; (null)
+ NW_String_stringToUCS2Char @ 95 NONAME R3UNUSED ; (null)
+ NW_String_tokenToString @ 96 NONAME R3UNUSED ; (null)
+ NW_String_ucs2CharLength @ 97 NONAME R3UNUSED ; (null)
+ NW_String_ucs2CharToString @ 98 NONAME R3UNUSED ; (null)
+ NW_TinyDom_MakeDOMTree @ 99 NONAME ; (null)
+ NW_TinyDom_ParserDelete @ 100 NONAME R3UNUSED ; (null)
+ NW_TinyDom_ParserInitialize @ 101 NONAME ; (null)
+ NW_TinyDom_Parser_construct @ 102 NONAME R3UNUSED ; (null)
+ NW_TinyDom_getParser @ 103 NONAME R3UNUSED ; (null)
+ NW_TinyDom_getTagToken @ 104 NONAME R3UNUSED ; (null)
+ NW_TinyDom_getTree @ 105 NONAME R3UNUSED ; (null)
+ NW_TinyTree_Node_findTree @ 106 NONAME R3UNUSED ; (null)
+ NW_WBXML_Dictionary_destroy @ 107 NONAME R3UNUSED ; (null)
+ NW_WBXML_Dictionary_getAttributeNameByToken @ 108 NONAME R3UNUSED ; (null)
+ NW_WBXML_Dictionary_getAttributeToken @ 109 NONAME ; (null)
+ NW_WBXML_Dictionary_getByPublicId @ 110 NONAME R3UNUSED ; (null)
+ NW_WBXML_Dictionary_getTagByFqToken @ 111 NONAME R3UNUSED ; (null)
+ NW_WBXML_Dictionary_getTagToken @ 112 NONAME R3UNUSED ; (null)
+ NW_WBXML_Dictionary_initialize @ 113 NONAME R3UNUSED ; (null)
+ NW_WBXML_Dictionary_resolveLiteralToken @ 114 NONAME ; (null)
+ NW_WBXML_Document_getTableString @ 115 NONAME R3UNUSED ; (null)
+ NW_WBXML_Parser_getOpaque @ 116 NONAME R3UNUSED ; (null)
+ NW_WBXML_Parser_getStringInline @ 117 NONAME R3UNUSED ; (null)
+ NW_WBXML_Parser_newInPlace @ 118 NONAME R3UNUSED ; (null)
+ NW_WBXML_Parser_parseBuffer @ 119 NONAME ; (null)
+ NW_WBXML_Parser_registerHandler @ 120 NONAME R3UNUSED ; (null)
+ NW_WBXML_Writer_AttributeAndValue @ 121 NONAME ; (null)
+ NW_WBXML_Writer_End @ 122 NONAME R3UNUSED ; (null)
+ NW_WBXML_Writer_Header @ 123 NONAME ; (null)
+ NW_WBXML_Writer_Initialize @ 124 NONAME ; (null)
+ NW_WBXML_Writer_Opaque @ 125 NONAME R3UNUSED ; (null)
+ NW_WBXML_Writer_PI @ 126 NONAME R3UNUSED ; (null)
+ NW_WBXML_Writer_TagClearContentFlag @ 127 NONAME R3UNUSED ; (null)
+ NW_WBXML_Writer_TagSetAttributesFlag @ 128 NONAME R3UNUSED ; (null)
+ NW_WBXML_Writer_TagSetContentFlag @ 129 NONAME R3UNUSED ; (null)
+ NW_WBXML_Writer_TagString @ 130 NONAME ; (null)
+ NW_WBXML_Writer_Text @ 131 NONAME ; (null)
+ NW_XML_ComputeEncoding @ 132 NONAME ; (null)
+ NW_XML_Parse @ 133 NONAME R3UNUSED ; (null)
+ NW_XML_Reader_AdvanceOffset @ 134 NONAME R3UNUSED ; (null)
+ NW_XML_Reader_AsciiCharMatch @ 135 NONAME R3UNUSED ; (null)
+ NW_XML_Reader_AsciiStringMatch @ 136 NONAME ; (null)
+ NW_XML_Reader_DataAddressFromBuffer @ 137 NONAME ; (null)
+ NW_XML_Reader_GetLineColumn @ 138 NONAME R3UNUSED ; (null)
+ NW_XML_Reader_GetPosition @ 139 NONAME ; (null)
+ NW_XML_Reader_InitFromBuffer @ 140 NONAME R3UNUSED ; (null)
+ NW_XML_Reader_Interval_Start @ 141 NONAME R3UNUSED ; (null)
+ NW_XML_Reader_Interval_Stop @ 142 NONAME R3UNUSED ; (null)
+ NW_XML_Reader_IsDigit @ 143 NONAME R3UNUSED ; (null)
+ NW_XML_Reader_IsLetter @ 144 NONAME R3UNUSED ; (null)
+ NW_XML_Reader_IsSpace @ 145 NONAME R3UNUSED ; (null)
+ NW_XML_Reader_PeekOffset @ 146 NONAME R3UNUSED ; (null)
+ NW_XML_Reader_SetPosition @ 147 NONAME ; (null)
+ NW_DOM_AttrVal_getExtension @ 148 NONAME R3UNUSED ; (null)
+ NW_DOM_DocumentNode_BuildWBXMLTree @ 149 NONAME ; (null)
+ NW_DOM_DocumentNode_BuildTree @ 150 NONAME ; (null)
+ CXML_Read_From_File @ 151 NONAME R3UNUSED ; (null)
+ NW_String_getCharCount32 @ 152 NONAME R3UNUSED ; (null)
+ NW_TinyDom_AppendDOMTree @ 153 NONAME ; (null)
+ NW_WBXML_Writer_AttributeAndValue2 @ 154 NONAME ; (null)
+ NW_WBXML_Document_construct @ 155 NONAME R3UNUSED ; (null)
+ NW_WBXML_Document_destruct @ 156 NONAME R3UNUSED ; (null)
+ NW_Encoder_StringTable_GetSize @ 157 NONAME R3UNUSED ; (null)
+ NW_Encoder_StringTable_StringTableIterateInit @ 158 NONAME R3UNUSED ; (null)
+ NW_Encoder_StringTable_StringTableIterateNext @ 159 NONAME R3UNUSED ; (null)
+ NW_Encoder_StringTable_createFromDOM @ 160 NONAME R3UNUSED ; (null)
+ NW_Encoder_StringTable_delete @ 161 NONAME R3UNUSED ; (null)
+ NW_Encoder_StringTable_getStringTableOffset @ 162 NONAME ; (null)
+ NW_Encoder_StringTable_getTotalBytes @ 163 NONAME R3UNUSED ; (null)
+ NW_Encoder_StringTable_new @ 164 NONAME R3UNUSED ; (null)
+ CXML_Additional_Feature_Supprted @ 165 NONAME R3UNUSED ; (null)
+ NW_Encoder_StringTable_addToStringTable @ 166 NONAME ; (null)
+ NW_WBXML_Document_putTableString @ 167 NONAME R3UNUSED ; (null)
+ CXML_XML_Get_Entity @ 168 NONAME R3UNUSED ; (null)
+ CXML_DOM_DocumentNode_BuildTree @ 169 NONAME ; (null)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/group/bwins/CXMLPARSERU.DEF Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,172 @@
+EXPORTS
+ NW_DOM_AttrVal_getExtension @ 1 NONAME
+ NW_DOM_AttrVal_getOpaque @ 2 NONAME
+ NW_DOM_AttrVal_getType @ 3 NONAME
+ NW_DOM_AttrVal_initFromString @ 4 NONAME
+ NW_DOM_AttrVal_initFromToken @ 5 NONAME
+ NW_DOM_AttrVal_toString @ 6 NONAME
+ NW_DOM_AttributeHandle_addVal @ 7 NONAME
+ NW_DOM_AttributeHandle_getEncoding @ 8 NONAME
+ NW_DOM_AttributeHandle_getName @ 9 NONAME
+ NW_DOM_AttributeHandle_getNextVal @ 10 NONAME
+ NW_DOM_AttributeHandle_getToken @ 11 NONAME
+ NW_DOM_AttributeHandle_getValue @ 12 NONAME
+ NW_DOM_AttributeHandle_getValuePrefix @ 13 NONAME
+ NW_DOM_AttributeHandle_initWithStartToken @ 14 NONAME
+ NW_DOM_AttributeListIterator_getNextAttribute @ 15 NONAME
+ NW_DOM_DocumentNode_Delete @ 16 NONAME
+ NW_DOM_DocumentNode_createDocumentWithNumberPublicId @ 17 NONAME
+ NW_DOM_DocumentNode_createElementNode @ 18 NONAME
+ NW_DOM_DocumentNode_createElementNodeByToken @ 19 NONAME
+ NW_DOM_DocumentNode_createTextNode @ 20 NONAME
+ NW_DOM_DocumentNode_createTextNodeWithTextItem @ 21 NONAME
+ NW_DOM_DocumentNode_getCharacterEncoding @ 22 NONAME
+ NW_DOM_DocumentNode_getDictionary @ 23 NONAME
+ NW_DOM_DocumentNode_getDocumentElement @ 24 NONAME
+ NW_DOM_DocumentNode_getPublicId @ 25 NONAME
+ NW_DOM_DocumentNode_getPublicIdAsNumber @ 26 NONAME
+ NW_DOM_DocumentNode_getVersion @ 27 NONAME
+ NW_DOM_ElementNode_getAttribute @ 28 NONAME
+ NW_DOM_ElementNode_getAttributeHandleByName @ 29 NONAME
+ NW_DOM_ElementNode_getAttributeHandleByToken @ 30 NONAME
+ NW_DOM_ElementNode_getAttributeListIterator @ 31 NONAME
+ NW_DOM_ElementNode_getTagName @ 32 NONAME
+ NW_DOM_ElementNode_getTagToken @ 33 NONAME
+ NW_DOM_ElementNode_hasAttributes @ 34 NONAME
+ NW_DOM_ElementNode_removeAttribute @ 35 NONAME
+ NW_DOM_ElementNode_setAttribute @ 36 NONAME
+ NW_DOM_ElementNode_setAttributeByAttrVal @ 37 NONAME
+ NW_DOM_ElementNode_setAttributeByAttributeHandle @ 38 NONAME
+ NW_DOM_ElementNode_setAttributeByToken @ 39 NONAME
+ NW_DOM_Node_appendChild @ 40 NONAME
+ NW_DOM_Node_getFirstChild @ 41 NONAME
+ NW_DOM_Node_getLastChild @ 42 NONAME
+ NW_DOM_Node_getNextSibling @ 43 NONAME
+ NW_DOM_Node_getNodeName @ 44 NONAME
+ NW_DOM_Node_getNodeToken @ 45 NONAME
+ NW_DOM_Node_getNodeType @ 46 NONAME
+ NW_DOM_Node_getOwnerDocument @ 47 NONAME
+ NW_DOM_Node_getParentNode @ 48 NONAME
+ NW_DOM_Node_getPreviousSibling @ 49 NONAME
+ NW_DOM_Node_hasChildNodes @ 50 NONAME
+ NW_DOM_Node_insertBefore @ 51 NONAME
+ NW_DOM_Node_removeChild @ 52 NONAME
+ NW_DOM_Node_replaceChild @ 53 NONAME
+ NW_DOM_ProcessingInstructionNode_getTargetToken @ 54 NONAME
+ NW_DOM_TextItemIterator_getNextTextItem @ 55 NONAME
+ NW_DOM_TextItem_getEntity @ 56 NONAME
+ NW_DOM_TextItem_getExtension @ 57 NONAME
+ NW_DOM_TextItem_getExtensionInt @ 58 NONAME
+ NW_DOM_TextItem_getExtensionToken @ 59 NONAME
+ NW_DOM_TextItem_getOpaque @ 60 NONAME
+ NW_DOM_TextItem_getString @ 61 NONAME
+ NW_DOM_TextItem_getType @ 62 NONAME
+ NW_DOM_TextItem_initFromEntity @ 63 NONAME
+ NW_DOM_TextItem_initFromExtension @ 64 NONAME
+ NW_DOM_TextItem_initFromExtensionInt @ 65 NONAME
+ NW_DOM_TextItem_initFromOpaque @ 66 NONAME
+ NW_DOM_TextItem_initFromString @ 67 NONAME
+ NW_DOM_TextItem_toString @ 68 NONAME
+ NW_DOM_TextNode_addDataFromTextItem @ 69 NONAME
+ NW_DOM_TextNode_getData @ 70 NONAME
+ NW_DOM_TextNode_getTextItemIterator @ 71 NONAME
+ NW_DOM_TextNode_setData @ 72 NONAME
+ NW_DOM_TextNode_setDataFromTextItem @ 73 NONAME
+ NW_Encoder_encodeWBXML @ 74 NONAME
+ NW_String_UCS2BuffToString @ 75 NONAME
+ NW_String_byteToUCS2Char @ 76 NONAME
+ NW_String_charBuffGetLength @ 77 NONAME
+ NW_String_clearUserOwnsStorage @ 78 NONAME
+ NW_String_concatenate @ 79 NONAME
+ NW_String_deepCopy @ 80 NONAME
+ NW_String_delete @ 81 NONAME
+ NW_String_deleteStorage @ 82 NONAME
+ NW_String_entityToString @ 83 NONAME
+ NW_String_entityToUCS2Char @ 84 NONAME
+ NW_String_equals @ 85 NONAME
+ NW_String_getByteCount @ 86 NONAME
+ NW_String_getCharCount @ 87 NONAME
+ NW_String_getStorage @ 88 NONAME
+ NW_String_getUserOwnsStorage @ 89 NONAME
+ NW_String_initialize @ 90 NONAME
+ NW_String_new @ 91 NONAME
+ NW_String_readChar @ 92 NONAME
+ NW_String_setUserOwnsStorage @ 93 NONAME
+ NW_String_shallowCopy @ 94 NONAME
+ NW_String_stringToUCS2Char @ 95 NONAME
+ NW_String_tokenToString @ 96 NONAME
+ NW_String_ucs2CharLength @ 97 NONAME
+ NW_String_ucs2CharToString @ 98 NONAME
+ NW_TinyDom_MakeDOMTree @ 99 NONAME
+ NW_TinyDom_ParserDelete @ 100 NONAME
+ NW_TinyDom_ParserInitialize @ 101 NONAME
+ NW_TinyDom_Parser_construct @ 102 NONAME
+ NW_TinyDom_getParser @ 103 NONAME
+ NW_TinyDom_getTagToken @ 104 NONAME
+ NW_TinyDom_getTree @ 105 NONAME
+ NW_TinyTree_Node_findTree @ 106 NONAME
+ NW_WBXML_Dictionary_destroy @ 107 NONAME
+ NW_WBXML_Dictionary_getAttributeNameByToken @ 108 NONAME
+ NW_WBXML_Dictionary_getAttributeToken @ 109 NONAME
+ NW_WBXML_Dictionary_getByPublicId @ 110 NONAME
+ NW_WBXML_Dictionary_getTagByFqToken @ 111 NONAME
+ NW_WBXML_Dictionary_getTagToken @ 112 NONAME
+ NW_WBXML_Dictionary_initialize @ 113 NONAME
+ NW_WBXML_Dictionary_resolveLiteralToken @ 114 NONAME
+ NW_WBXML_Document_getTableString @ 115 NONAME
+ NW_WBXML_Parser_getOpaque @ 116 NONAME
+ NW_WBXML_Parser_getStringInline @ 117 NONAME
+ NW_WBXML_Parser_newInPlace @ 118 NONAME
+ NW_WBXML_Parser_parseBuffer @ 119 NONAME
+ NW_WBXML_Parser_registerHandler @ 120 NONAME
+ NW_WBXML_Writer_AttributeAndValue @ 121 NONAME
+ NW_WBXML_Writer_End @ 122 NONAME
+ NW_WBXML_Writer_Header @ 123 NONAME
+ NW_WBXML_Writer_Initialize @ 124 NONAME
+ NW_WBXML_Writer_Opaque @ 125 NONAME
+ NW_WBXML_Writer_PI @ 126 NONAME
+ NW_WBXML_Writer_TagClearContentFlag @ 127 NONAME
+ NW_WBXML_Writer_TagSetAttributesFlag @ 128 NONAME
+ NW_WBXML_Writer_TagSetContentFlag @ 129 NONAME
+ NW_WBXML_Writer_TagString @ 130 NONAME
+ NW_WBXML_Writer_Text @ 131 NONAME
+ NW_XML_ComputeEncoding @ 132 NONAME
+ NW_XML_Parse @ 133 NONAME
+ NW_XML_Reader_AdvanceOffset @ 134 NONAME
+ NW_XML_Reader_AsciiCharMatch @ 135 NONAME
+ NW_XML_Reader_AsciiStringMatch @ 136 NONAME
+ NW_XML_Reader_DataAddressFromBuffer @ 137 NONAME
+ NW_XML_Reader_GetLineColumn @ 138 NONAME
+ NW_XML_Reader_GetPosition @ 139 NONAME
+ NW_XML_Reader_InitFromBuffer @ 140 NONAME
+ NW_XML_Reader_Interval_Start @ 141 NONAME
+ NW_XML_Reader_Interval_Stop @ 142 NONAME
+ NW_XML_Reader_IsDigit @ 143 NONAME
+ NW_XML_Reader_IsLetter @ 144 NONAME
+ NW_XML_Reader_IsSpace @ 145 NONAME
+ NW_XML_Reader_PeekOffset @ 146 NONAME
+ NW_XML_Reader_SetPosition @ 147 NONAME
+ NW_XML_Reader_SkipSpace @ 148 NONAME
+ NW_DOM_DocumentNode_BuildWBXMLTree @ 149 NONAME
+ NW_DOM_DocumentNode_BuildTree @ 150 NONAME
+ CXML_Read_From_File @ 151 NONAME
+ NW_TinyDom_AppendDOMTree @ 152 NONAME
+ NW_String_getCharCount32 @ 153 NONAME
+ NW_WBXML_Writer_AttributeAndValue2 @ 154 NONAME
+ NW_WBXML_Document_construct @ 155 NONAME
+ NW_WBXML_Document_destruct @ 156 NONAME
+ NW_Encoder_StringTable_GetSize @ 157 NONAME
+ NW_Encoder_StringTable_StringTableIterateInit @ 158 NONAME
+ NW_Encoder_StringTable_StringTableIterateNext @ 159 NONAME
+ NW_Encoder_StringTable_createFromDOM @ 160 NONAME
+ NW_Encoder_StringTable_delete @ 161 NONAME
+ NW_Encoder_StringTable_get @ 162 NONAME
+ NW_Encoder_StringTable_getStringTableOffset @ 163 NONAME
+ NW_Encoder_StringTable_getTotalBytes @ 164 NONAME
+ NW_Encoder_StringTable_new @ 165 NONAME
+ CXML_Additional_Feature_Supprted @ 166 NONAME
+ NW_Encoder_StringTable_addToStringTable @ 167 NONAME
+ NW_WBXML_Document_putTableString @ 168 NONAME
+ CXML_XML_Get_Entity @ 169 NONAME
+ CXML_DOM_DocumentNode_BuildTree @ 170 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/group/cXmlParser.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,118 @@
+/*
+* Copyright (c) 1997-2003 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <platform_paths.hrh>
+TARGET cXmlParser.dll
+TARGETTYPE dll
+
+
+
+#if defined(ARMCC)
+UID 0x1000008D 0x101F8710
+deffile eabi/CXMLPARSER.DEF
+#elif defined( WINSCW )
+deffile BWINSCW/CXMLPARSER.DEF
+#elif defined( WINS )
+deffile Bwins/cXmlParser.def
+#else
+deffile bmarm/CXMLPARSER.DEF
+#endif
+
+CAPABILITY CAP_GENERAL_DLL
+VENDORID VID_DEFAULT
+
+SOURCEPATH ../src
+
+SOURCE dom/src/attribute.c
+SOURCE dom/src/document.c
+SOURCE dom/src/element.c
+SOURCE dom/src/node.c
+SOURCE dom/src/text.c
+SOURCE dom/src/wbxml_types.c
+SOURCE string/src/char.c
+SOURCE string/src/string.c
+SOURCE tinydom/src/tiny_dom.c
+SOURCE tinydom/src/tiny_dom_utils.c
+SOURCE tinydom/src/tiny_dom_write.c
+SOURCE tinytree/src/EBuffer.c
+SOURCE tinytree/src/tree.c
+SOURCE tinytree/src/TreeVector.c
+SOURCE wbxmlp/src/dictionary.c
+SOURCE wbxmlp/src/DictionaryContext.cpp
+SOURCE wbxmlp/src/doc.c
+SOURCE wbxmlp/src/opaque.c
+SOURCE wbxmlp/src/parse_buffer.c
+SOURCE wbxmlp/src/parse_logic.cpp
+SOURCE xmlp/src/Xmlp2Wbxml.c
+SOURCE xmlp/src/XMLParser.cpp
+SOURCE xmlp/src/XMLReader.c
+SOURCE xmlp/src/XmlpIntEntity.cpp
+SOURCE xmlp/src/XmlpEntity.cpp
+SOURCE encoder/src/domencoder.c
+SOURCE encoder/src/StringTable.c
+SOURCE encoder/src/tinydom2wbxml.c
+SOURCE encoder/src/WBXMLWriter.cpp
+SOURCE utils/src/cxml_mem.c
+SOURCE utils/src/cxml_vector.c
+SOURCE utils/src/cxml_str.c
+SOURCE utils/src/E32XMLParserDllEntryPoint.cpp
+SOURCE utils/src/cxml_file_if.cpp
+
+
+
+
+#if defined(WINS)
+ #ifndef WINSCW
+ SOURCE utils/src/cxml_assert.c
+ #endif
+#endif
+
+USERINCLUDE ../src/dom/include
+USERINCLUDE ../src/encoder/include
+USERINCLUDE ../src/xmlp/include
+USERINCLUDE ../src/wbxmlp/include
+USERINCLUDE ../src/string/include
+USERINCLUDE ../src/tinydom/include
+USERINCLUDE ../src/tinytree/include
+USERINCLUDE ../src/utils/include
+
+
+// ===================================
+
+
+OS_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE /epoc32/include/libc
+
+
+// Symbian OS libraries
+//#if defined (WINS)
+//LIBRARY edll.lib
+//#endif
+LIBRARY estlib.lib
+LIBRARY euser.lib
+LIBRARY efsrv.lib
+
+/*#if defined(WINS)
+#define FEATURE_MEMORY_PROFILE
+#endif
+
+#if defined(FEATURE_MEMORY_PROFILE)
+LIBRARY browserengine.lib
+#endif */
+//LIBRARY featmgr.lib
+//DEBUGLIBRARY flogger.lib
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/group/eabi/CXMLPARSERU.DEF Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,171 @@
+EXPORTS
+ CXML_Additional_Feature_Supprted @ 1 NONAME
+ CXML_Read_From_File @ 2 NONAME
+ CXML_XML_Get_Entity @ 3 NONAME
+ NW_DOM_AttrVal_getExtension @ 4 NONAME
+ NW_DOM_AttrVal_getOpaque @ 5 NONAME
+ NW_DOM_AttrVal_getType @ 6 NONAME
+ NW_DOM_AttrVal_initFromString @ 7 NONAME
+ NW_DOM_AttrVal_initFromToken @ 8 NONAME
+ NW_DOM_AttrVal_toString @ 9 NONAME
+ NW_DOM_AttributeHandle_addVal @ 10 NONAME
+ NW_DOM_AttributeHandle_getEncoding @ 11 NONAME
+ NW_DOM_AttributeHandle_getName @ 12 NONAME
+ NW_DOM_AttributeHandle_getNextVal @ 13 NONAME
+ NW_DOM_AttributeHandle_getToken @ 14 NONAME
+ NW_DOM_AttributeHandle_getValue @ 15 NONAME
+ NW_DOM_AttributeHandle_getValuePrefix @ 16 NONAME
+ NW_DOM_AttributeHandle_initWithStartToken @ 17 NONAME
+ NW_DOM_AttributeListIterator_getNextAttribute @ 18 NONAME
+ NW_DOM_DocumentNode_BuildTree @ 19 NONAME
+ NW_DOM_DocumentNode_BuildWBXMLTree @ 20 NONAME
+ NW_DOM_DocumentNode_Delete @ 21 NONAME
+ NW_DOM_DocumentNode_createDocumentWithNumberPublicId @ 22 NONAME
+ NW_DOM_DocumentNode_createElementNode @ 23 NONAME
+ NW_DOM_DocumentNode_createElementNodeByToken @ 24 NONAME
+ NW_DOM_DocumentNode_createTextNode @ 25 NONAME
+ NW_DOM_DocumentNode_createTextNodeWithTextItem @ 26 NONAME
+ NW_DOM_DocumentNode_getCharacterEncoding @ 27 NONAME
+ NW_DOM_DocumentNode_getDictionary @ 28 NONAME
+ NW_DOM_DocumentNode_getDocumentElement @ 29 NONAME
+ NW_DOM_DocumentNode_getPublicId @ 30 NONAME
+ NW_DOM_DocumentNode_getPublicIdAsNumber @ 31 NONAME
+ NW_DOM_DocumentNode_getVersion @ 32 NONAME
+ NW_DOM_ElementNode_getAttribute @ 33 NONAME
+ NW_DOM_ElementNode_getAttributeHandleByName @ 34 NONAME
+ NW_DOM_ElementNode_getAttributeHandleByToken @ 35 NONAME
+ NW_DOM_ElementNode_getAttributeListIterator @ 36 NONAME
+ NW_DOM_ElementNode_getTagName @ 37 NONAME
+ NW_DOM_ElementNode_getTagToken @ 38 NONAME
+ NW_DOM_ElementNode_hasAttributes @ 39 NONAME
+ NW_DOM_ElementNode_removeAttribute @ 40 NONAME
+ NW_DOM_ElementNode_setAttribute @ 41 NONAME
+ NW_DOM_ElementNode_setAttributeByAttrVal @ 42 NONAME
+ NW_DOM_ElementNode_setAttributeByAttributeHandle @ 43 NONAME
+ NW_DOM_ElementNode_setAttributeByToken @ 44 NONAME
+ NW_DOM_Node_appendChild @ 45 NONAME
+ NW_DOM_Node_getFirstChild @ 46 NONAME
+ NW_DOM_Node_getLastChild @ 47 NONAME
+ NW_DOM_Node_getNextSibling @ 48 NONAME
+ NW_DOM_Node_getNodeName @ 49 NONAME
+ NW_DOM_Node_getNodeToken @ 50 NONAME
+ NW_DOM_Node_getNodeType @ 51 NONAME
+ NW_DOM_Node_getOwnerDocument @ 52 NONAME
+ NW_DOM_Node_getParentNode @ 53 NONAME
+ NW_DOM_Node_getPreviousSibling @ 54 NONAME
+ NW_DOM_Node_hasChildNodes @ 55 NONAME
+ NW_DOM_Node_insertBefore @ 56 NONAME
+ NW_DOM_Node_removeChild @ 57 NONAME
+ NW_DOM_Node_replaceChild @ 58 NONAME
+ NW_DOM_ProcessingInstructionNode_getTargetToken @ 59 NONAME
+ NW_DOM_TextItemIterator_getNextTextItem @ 60 NONAME
+ NW_DOM_TextItem_getEntity @ 61 NONAME
+ NW_DOM_TextItem_getExtension @ 62 NONAME
+ NW_DOM_TextItem_getExtensionInt @ 63 NONAME
+ NW_DOM_TextItem_getExtensionToken @ 64 NONAME
+ NW_DOM_TextItem_getOpaque @ 65 NONAME
+ NW_DOM_TextItem_getString @ 66 NONAME
+ NW_DOM_TextItem_getType @ 67 NONAME
+ NW_DOM_TextItem_initFromEntity @ 68 NONAME
+ NW_DOM_TextItem_initFromExtension @ 69 NONAME
+ NW_DOM_TextItem_initFromExtensionInt @ 70 NONAME
+ NW_DOM_TextItem_initFromOpaque @ 71 NONAME
+ NW_DOM_TextItem_initFromString @ 72 NONAME
+ NW_DOM_TextItem_toString @ 73 NONAME
+ NW_DOM_TextNode_addDataFromTextItem @ 74 NONAME
+ NW_DOM_TextNode_getData @ 75 NONAME
+ NW_DOM_TextNode_getTextItemIterator @ 76 NONAME
+ NW_DOM_TextNode_setData @ 77 NONAME
+ NW_DOM_TextNode_setDataFromTextItem @ 78 NONAME
+ NW_Encoder_StringTable_GetSize @ 79 NONAME
+ NW_Encoder_StringTable_StringTableIterateInit @ 80 NONAME
+ NW_Encoder_StringTable_StringTableIterateNext @ 81 NONAME
+ NW_Encoder_StringTable_addToStringTable @ 82 NONAME
+ NW_Encoder_StringTable_createFromDOM @ 83 NONAME
+ NW_Encoder_StringTable_delete @ 84 NONAME
+ NW_Encoder_StringTable_getStringTableOffset @ 85 NONAME
+ NW_Encoder_StringTable_getTotalBytes @ 86 NONAME
+ NW_Encoder_StringTable_new @ 87 NONAME
+ NW_Encoder_encodeWBXML @ 88 NONAME
+ NW_String_UCS2BuffToString @ 89 NONAME
+ NW_String_byteToUCS2Char @ 90 NONAME
+ NW_String_charBuffGetLength @ 91 NONAME
+ NW_String_clearUserOwnsStorage @ 92 NONAME
+ NW_String_concatenate @ 93 NONAME
+ NW_String_deepCopy @ 94 NONAME
+ NW_String_delete @ 95 NONAME
+ NW_String_deleteStorage @ 96 NONAME
+ NW_String_entityToString @ 97 NONAME
+ NW_String_entityToUCS2Char @ 98 NONAME
+ NW_String_equals @ 99 NONAME
+ NW_String_getByteCount @ 100 NONAME
+ NW_String_getCharCount @ 101 NONAME
+ NW_String_getCharCount32 @ 102 NONAME
+ NW_String_getStorage @ 103 NONAME
+ NW_String_getUserOwnsStorage @ 104 NONAME
+ NW_String_initialize @ 105 NONAME
+ NW_String_new @ 106 NONAME
+ NW_String_readChar @ 107 NONAME
+ NW_String_setUserOwnsStorage @ 108 NONAME
+ NW_String_shallowCopy @ 109 NONAME
+ NW_String_stringToUCS2Char @ 110 NONAME
+ NW_String_tokenToString @ 111 NONAME
+ NW_String_ucs2CharLength @ 112 NONAME
+ NW_String_ucs2CharToString @ 113 NONAME
+ NW_TinyDom_AppendDOMTree @ 114 NONAME
+ NW_TinyDom_MakeDOMTree @ 115 NONAME
+ NW_TinyDom_ParserDelete @ 116 NONAME
+ NW_TinyDom_ParserInitialize @ 117 NONAME
+ NW_TinyDom_Parser_construct @ 118 NONAME
+ NW_TinyDom_getParser @ 119 NONAME
+ NW_TinyDom_getTagToken @ 120 NONAME
+ NW_TinyDom_getTree @ 121 NONAME
+ NW_TinyTree_Node_findTree @ 122 NONAME
+ NW_WBXML_Dictionary_destroy @ 123 NONAME
+ NW_WBXML_Dictionary_getAttributeNameByToken @ 124 NONAME
+ NW_WBXML_Dictionary_getAttributeToken @ 125 NONAME
+ NW_WBXML_Dictionary_getByPublicId @ 126 NONAME
+ NW_WBXML_Dictionary_getTagByFqToken @ 127 NONAME
+ NW_WBXML_Dictionary_getTagToken @ 128 NONAME
+ NW_WBXML_Dictionary_initialize @ 129 NONAME
+ NW_WBXML_Dictionary_resolveLiteralToken @ 130 NONAME
+ NW_WBXML_Document_construct @ 131 NONAME
+ NW_WBXML_Document_destruct @ 132 NONAME
+ NW_WBXML_Document_getTableString @ 133 NONAME
+ NW_WBXML_Document_putTableString @ 134 NONAME
+ NW_WBXML_Parser_getOpaque @ 135 NONAME
+ NW_WBXML_Parser_getStringInline @ 136 NONAME
+ NW_WBXML_Parser_newInPlace @ 137 NONAME
+ NW_WBXML_Parser_parseBuffer @ 138 NONAME
+ NW_WBXML_Parser_registerHandler @ 139 NONAME
+ NW_WBXML_Writer_AttributeAndValue @ 140 NONAME
+ NW_WBXML_Writer_AttributeAndValue2 @ 141 NONAME
+ NW_WBXML_Writer_End @ 142 NONAME
+ NW_WBXML_Writer_Header @ 143 NONAME
+ NW_WBXML_Writer_Initialize @ 144 NONAME
+ NW_WBXML_Writer_Opaque @ 145 NONAME
+ NW_WBXML_Writer_PI @ 146 NONAME
+ NW_WBXML_Writer_TagClearContentFlag @ 147 NONAME
+ NW_WBXML_Writer_TagSetAttributesFlag @ 148 NONAME
+ NW_WBXML_Writer_TagSetContentFlag @ 149 NONAME
+ NW_WBXML_Writer_TagString @ 150 NONAME
+ NW_WBXML_Writer_Text @ 151 NONAME
+ NW_XML_ComputeEncoding @ 152 NONAME
+ NW_XML_Parse @ 153 NONAME
+ NW_XML_Reader_AdvanceOffset @ 154 NONAME
+ NW_XML_Reader_AsciiCharMatch @ 155 NONAME
+ NW_XML_Reader_AsciiStringMatch @ 156 NONAME
+ NW_XML_Reader_DataAddressFromBuffer @ 157 NONAME
+ NW_XML_Reader_GetLineColumn @ 158 NONAME
+ NW_XML_Reader_GetPosition @ 159 NONAME
+ NW_XML_Reader_InitFromBuffer @ 160 NONAME
+ NW_XML_Reader_Interval_Start @ 161 NONAME
+ NW_XML_Reader_Interval_Stop @ 162 NONAME
+ NW_XML_Reader_IsDigit @ 163 NONAME
+ NW_XML_Reader_IsLetter @ 164 NONAME
+ NW_XML_Reader_IsSpace @ 165 NONAME
+ NW_XML_Reader_PeekOffset @ 166 NONAME
+ NW_XML_Reader_SetPosition @ 167 NONAME
+ NW_XML_Reader_SkipSpace @ 168 NONAME
+ CXML_DOM_DocumentNode_BuildTree @ 169 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/rom/cXmlParser.iby Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,23 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __CXMLPARSER_IBY__
+#define __CXMLPARSER_IBY__
+
+file=ABI_DIR\BUILD_DIR\cXmlParser.dll SHARED_LIB_DIR\cXmlParser.dll
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/dom/include/nw_dom_wbxmltypes.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,462 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_DOM
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+#ifndef NW_DOM_WBXML_TYPES_H
+#define NW_DOM_WBXML_TYPES_H
+
+#include <xml/cxml/cxml_proj.h>
+#include <xml/cxml/nw_dom_node.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+/** ----------------------------------------------------------------------- **
+ @typedef: NW_DOM_Extension
+
+ @synopsis: Tiny Dom Extension.
+
+ @scope: public
+
+ @type: NW_TinyDom_Extension_t
+
+ @description:
+ Tiny Dom Extension.
+
+ ** ----------------------------------------------------------------------- **/
+typedef NW_TinyDom_Extension_t NW_DOM_Extension_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @typedef: NW_DOM_Opaque
+
+ @synopsis: Opaque DOM type.
+
+ @scope: public
+
+ @type: NW_WBXML_Opaque_t
+
+ @description:
+ Opaque DOM type.
+
+ ** ----------------------------------------------------------------------- **/
+typedef NW_WBXML_Opaque_t NW_DOM_Opaque_t;
+
+
+/* * Extension **/
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Extension_new
+
+ @synopsis: Creates and initializes a new extension with a given
+ token and string.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Uint32 token
+ Initialize with this token.
+
+ [in] NW_String_t* str
+ Extension label.
+
+ @description: Creates and initializes a new extension with a given
+ token and string.
+
+ @returns: NW_DOM_Extension_t*
+ New extension.
+
+ ** ----------------------------------------------------------------------- **/
+NW_DOM_Extension_t*
+NW_DOM_Extension_new(NW_Uint32 token, NW_String_t* str);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Extension_initialize
+
+ @synopsis: Initializes an extension with a token and string.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_Extension_t* ext
+ The extension.
+
+ [in] NW_Uint32 token
+ Initialize with this token.
+
+ [in] NW_String_t* str
+ Extension label.
+
+ @description: Initializes an extension with a token and string.
+
+ @returns: NW_Status_t
+ Result of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_Extension_initialize(NW_DOM_Extension_t* ext,
+ NW_Uint32 token,
+ NW_String_t* str);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Extension_getString
+
+ @synopsis: Get string associated with this extension.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Extension_t* e
+ This extension.
+
+ [out] NW_String_t* str
+ String for extension.
+
+ @description: Get string associated with this extension.
+
+ @returns: NW_Status_t
+ Result of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_Extension_getString(NW_DOM_Extension_t* e,
+ NW_String_t* str);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Extension_getToken
+
+ @synopsis: Returns token of extension.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Extension_t* e
+ This extension.
+
+ @description: Returns token of extension.
+
+ @returns: NW_Uint32
+ Token or null if error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Uint32
+NW_DOM_Extension_getToken(NW_DOM_Extension_t* e);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Extension_delete
+
+ @synopsis: Deletes this extension.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_Extension_t* e
+ This extension.
+
+ @description: Deletes this extension.
+
+ @returns: NW_Status_t
+ Result of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_Extension_delete(NW_DOM_Extension_t* e);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Opaque_new
+
+ @synopsis: Creates a new Opaque type with a given data and length.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Uint32 length
+ Length of data block.
+
+ [in] NW_Byte* data
+ Data block.
+
+ @description: Creates a new Opaque type with a given data and length.
+
+ @returns: NW_DOM_Opaque_t*
+ New opaque object.
+
+ ** ----------------------------------------------------------------------- **/
+NW_DOM_Opaque_t*
+NW_DOM_Opaque_new(NW_Uint32 length, NW_Byte* data);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Opaque_initialize
+
+ @synopsis: Initializes an Opaque type with a given data and length.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_Opaque_t* o
+ The opaque object.
+
+ [in] NW_Uint32 length
+ Length of data block.
+
+ [in] NW_Byte* data
+ Data block.
+
+ @description: Initializes an Opaque type with a given data and length.
+
+ @returns: NW_Status_t
+ default
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_Opaque_initialize(NW_DOM_Opaque_t* o,
+ NW_Uint32 length,
+ NW_Byte* data);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Opaque_getLength
+
+ @synopsis: Returns length of opaque data.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Opaque_t* opaque
+ This opaque object.
+
+ @description: Returns length of opaque data.
+
+ @returns: NW_Uint32
+ Length of data.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Uint32
+NW_DOM_Opaque_getLength(NW_DOM_Opaque_t* opaque);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Opaque_getData
+
+ @synopsis: Returns data from opaque.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Opaque_t* opaque
+ This opaque object.
+
+ @description: Returns data from opaque.
+
+ @returns: NW_Byte*
+ Opaque data.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Byte*
+NW_DOM_Opaque_getData(NW_DOM_Opaque_t* opaque);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Opaque_delete
+
+ @synopsis: Delete this opaque object.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Opaque_t* opaque
+ This opaque object.
+
+ @description: Delete this opaque object. Frees memory for data.
+
+ @returns: NW_Status_t
+ Result of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_Opaque_delete(NW_DOM_Opaque_t* opaque);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Opaque_getUserOwnsData
+
+ @synopsis: Determines if user owns data storage and can deallocate it.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Opaque_t* opaque
+ This opaque object.
+
+ @description: Determines if user owns data storage and can deallocate it.
+
+ @returns: NW_Bool
+ NW_TRUE if user owns data storage and can deallocate it,
+ otherwise NW_FALSE.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Bool
+NW_DOM_Opaque_getUserOwnsData(NW_DOM_Opaque_t* opaque);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Opaque_setUserOwnsData
+
+ @synopsis: Set user ownership flag on opaque data.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_Opaque_t* opaque
+ This opaque object.
+
+ @description: Set user ownership flag on opaque data.
+
+ @returns: NW_Status_t
+ Result of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_Opaque_setUserOwnsData(NW_DOM_Opaque_t* opaque);
+
+/*
+combined WBXML attribute value and text components
+*/
+
+typedef enum NW_WbxmlComponent_e {
+ NW_WBXML_ATTRIBUTE_VALUE_COMPONENT,
+ NW_WBXML_TEXT_COMPONENT
+} NW_WbxmlComponent_t;
+
+NW_Status_t
+NW_DOM_WbxmlComponent_setType(NW_WbxmlComponent_t AttributeValueOrText,
+ NW_TinyDom_AttrVal_t* pV,
+ NW_Uint32 type);
+
+NW_Status_t
+NW_DOM_WbxmlComponent_initFromString(NW_TinyDom_AttrVal_t* pV,
+ NW_String_t * pString);
+
+NW_Status_t
+NW_DOM_WbxmlComponent_initFromEntity(NW_TinyDom_AttrVal_t* pV,
+ NW_Uint32 entity);
+
+NW_Status_t
+NW_DOM_WbxmlComponent_initFromExtension(NW_TinyDom_AttrVal_t* val,
+ NW_Uint16 token,
+ NW_String_t* str);
+NW_Status_t
+NW_DOM_WbxmlComponent_initFromExtensionInt(NW_TinyDom_AttrVal_t* val,
+ NW_Uint16 token,
+ NW_Uint32 x);
+NW_Status_t
+NW_DOM_WbxmlComponent_initFromOpaque(NW_TinyDom_AttrVal_t* pV,
+ NW_Uint32 byteCount,
+ NW_Uint8* pData);
+NW_Status_t
+NW_DOM_WbxmlComponent_initFromToken(NW_TinyDom_AttrVal_t* pV,
+ NW_Uint32 token);
+
+NW_Uint32
+NW_DOM_WbxmlComponent_getEntity(NW_TinyDom_AttrVal_t* pV);
+
+NW_Status_t
+NW_DOM_WbxmlComponent_getString(NW_TinyDom_AttrVal_t* pV,
+ NW_String_t* pString);
+
+NW_Status_t
+NW_DOM_WbxmlComponent_getExtensionToken(NW_TinyDom_AttrVal_t* val,
+ NW_Uint16* pToken);
+
+NW_Uint16
+NW_DOM_WbxmlComponent_getExtension(NW_TinyDom_AttrVal_t* val,
+ NW_String_t* str);
+
+NW_Status_t
+NW_DOM_WbxmlComponent_getExtensionInt(NW_TinyDom_AttrVal_t* val,
+ NW_Uint32* x);
+NW_Uint8*
+NW_DOM_WbxmlComponent_getOpaque(NW_TinyDom_AttrVal_t* pV,
+ NW_Uint32 *pOpaqueByteCount);
+
+NW_Uint16
+NW_DOM_WbxmlComponent_getToken(NW_TinyDom_AttrVal_t* pV);
+
+NW_Status_t
+NW_DOM_WbxmlComponent_toString(NW_TinyDom_AttrVal_t* pV,
+ NW_String_t *string,
+ NW_Uint32 encoding);
+
+/* converts an entire component sequence (via iterator on text or attrval) to string
+
+returns either NW_STAT_SUCCESS or NW_STAT_DOM_NO_STRING_RETURNED if something fails */
+NW_Status_t
+NW_DOM_WbxmlComponent_sequenceToString(NW_WbxmlComponent_t AttributeValueOrText,
+ NW_TinyDom_AttributeHandle_t* pIterator,
+ NW_Uint32 encoding,
+ NW_String_t* pOutString);
+
+/* NW_Status_t NW_DOM_WbxmlComponent_[text|attribute]NextValue(pIterator, pV)
+returns status NW_STAT_WBXML_ITERATE_MORE or NW_STAT_WBXML_ITERATE_DONE and fills in
+*pV if returns NW_STAT_WBXML_ITERATE_MORE */
+#define NW_DOM_WbxmlComponent_textNextValue(pIterator, pV) \
+((NW_TinyDom_TextHandle_iterate((pIterator), (pV)) == 0)? NW_STAT_WBXML_ITERATE_DONE : NW_STAT_WBXML_ITERATE_MORE)
+
+#define NW_DOM_WbxmlComponent_attributeNextValue(pIterator, pV) \
+((NW_TinyDom_AttributeHandle_iterateValues((pIterator), (pV)) == 0)? NW_STAT_WBXML_ITERATE_DONE : NW_STAT_WBXML_ITERATE_MORE)
+
+
+#ifdef __cplusplus
+} // extern "C" {
+#endif /* __cplusplus */
+
+#endif /* NW_DOM_WBXML_TYPES_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/dom/src/attribute.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,1073 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_dom_attribute.h>
+#include <xml/cxml/nw_wbxml_dictionary.h>
+#include <xml/cxml/nw_tinydom.h>
+#include <xml/cxml/nw_string_string.h>
+#include "nw_dom_wbxmltypes.h"
+
+/*
+ * ATTRIBUTE LIST HANDLE
+ * is used to iterate over the list of attributes of an element
+ */
+
+/*
+ * Allocates memory for NW_DOM_AttributeListIterator
+ * Returns NULL in case of failure to do so
+ */
+
+NW_DOM_AttributeListIterator_t *
+NW_DOM_AttributeListIterator_new(void)
+{
+ NW_DOM_AttributeListIterator_t *handle =
+ (NW_DOM_AttributeListIterator_t *)
+ NW_Mem_Malloc(sizeof (NW_DOM_AttributeListIterator_t));
+ if (handle == NULL)
+ return NULL;
+ handle->node = NULL;
+ return handle;
+}
+
+/*
+ * Initializes an AttributeListIterator
+ * Returns NW_STAT_SUCCESS
+ */
+
+NW_Status_t
+NW_DOM_AttributeListIterator_initialize(NW_DOM_AttributeListIterator_t *handle)
+{
+
+ NW_ASSERT(handle != NULL);
+
+ handle->node = NULL;
+ handle->attrListHandle.state = NW_STAT_SUCCESS;
+ handle->attrListHandle.offset = 0;
+ handle->attrListHandle.tiny_parser = NULL;
+ handle->attrListHandle.context = NULL;
+
+ return NW_STAT_SUCCESS;
+}
+
+NW_Status_t
+NW_DOM_AttributeListIterator_delete(NW_DOM_AttributeListIterator_t *handle)
+{
+ NW_ASSERT(handle != NULL);
+ NW_Mem_Free(handle);
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Returns
+ * NW_STAT_WBXML_ITERATE_MORE
+ * NW_STAT_WBXML_ITERATE_DONE
+ *
+ * MODIFIED attributeHandle
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_AttributeListIterator_getNextAttribute(NW_DOM_AttributeListIterator_t* listHandle,
+ NW_DOM_AttributeHandle_t *attributeHandle)
+{
+ NW_TinyTree_Offset_t offset = 0;
+ NW_TinyDom_Parser_t *parser = NULL;
+
+ NW_ASSERT(listHandle != NULL);
+ NW_ASSERT(listHandle->node != NULL);
+ NW_ASSERT(attributeHandle != NULL);
+
+ if (listHandle->attrListHandle.state == NW_STAT_WBXML_ITERATE_MORE){
+ parser = listHandle->attrListHandle.tiny_parser;
+ offset = NW_TinyDom_AttrListHandle_iterate(&listHandle->attrListHandle);
+ if (offset != 0){
+ NW_DOM_AttributeHandle_initWithOffset(attributeHandle, parser, offset);
+ return NW_STAT_WBXML_ITERATE_MORE;
+ }
+ }
+
+ /*
+ * Once we are done iterating over the initial set of attributes,
+ * next attribute node is located. A reference to this node is kept,
+ * so that in subsequent call to this method we can proceed from there
+ */
+
+ NW_ASSERT(listHandle->node != NULL);
+
+ listHandle->node = NW_TinyTree_findNextSibling(listHandle->node);
+ parser = listHandle->attrListHandle.tiny_parser;
+ if (parser == NULL)
+ return NW_STAT_FAILURE;
+
+ while (listHandle->node){
+ if (NW_TinyDom_Node_getType(listHandle->node) == T_DOM_NODE_ATTR){
+ NW_DOM_AttributeHandle_initWithNode(attributeHandle, parser, listHandle->node);
+ return NW_STAT_WBXML_ITERATE_MORE;
+ }
+ listHandle->node = NW_TinyTree_findNextSibling(listHandle->node);
+ }
+ return NW_STAT_WBXML_ITERATE_DONE;
+}
+
+NW_DOM_AttrVal_t *
+NW_DOM_AttrVal_new(void)
+{
+ return (NW_DOM_AttrVal_t *) NW_Mem_Malloc(sizeof (NW_DOM_AttrVal_t));
+}
+
+/*
+ * Initializes an AttrVal of type NW_DOM_ATTR_VAL_STRING
+ * Returns NW_STAT_SUCCESS
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_AttrVal_initFromString (NW_DOM_AttrVal_t *val,
+ NW_String_t * string)
+{
+ NW_Status_t status;
+
+ NW_ASSERT(val != NULL);
+ NW_ASSERT(string != NULL);
+
+ status = NW_DOM_AttrVal_setType(val, NW_DOM_ATTR_VAL_STRING);
+ if (status != NW_STAT_SUCCESS)
+ return status;
+ val->component.string = *string;
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Initializes an AttrVal of type NW_WBXML_ATTR_COMPONENT_ENTITY
+ * Returns NW_STAT_SUCCESS
+ */
+
+NW_Status_t
+NW_DOM_AttrVal_initFromEntity (NW_DOM_AttrVal_t *val,
+ NW_Uint32 entity)
+{
+ NW_ASSERT(val != NULL);
+
+ val->type = NW_WBXML_ATTR_COMPONENT_ENTITY;
+ val->component.entity = entity;
+ return NW_STAT_SUCCESS;
+}
+
+
+/*
+ Initializes an AttrVal of type NW_WBXML_ATTR_COMPONENT_EXT
+ Returns NW_STAT_SUCCESS or NW_STAT_FAILURE if args are not valid.
+
+ Makes a shallow copy of str.
+ */
+NW_Status_t
+NW_DOM_AttrVal_initFromExtension (NW_DOM_AttrVal_t *val,
+ NW_Uint16 token,
+ NW_String_t *str)
+{
+ NW_Uint8 t; /* 8-bit token */
+
+ NW_ASSERT(val != NULL);
+ NW_ASSERT(token != 0);
+
+ val->type = NW_WBXML_ATTR_COMPONENT_INVALID;
+ t = (NW_Uint8)token;
+ if ((t == NW_WBXML_EXT_0)
+ || (t == NW_WBXML_EXT_1)
+ || (t == NW_WBXML_EXT_2)
+ || (t == NW_WBXML_EXT_T_0)
+ || (t == NW_WBXML_EXT_T_1)
+ || (t == NW_WBXML_EXT_T_2)
+ || (t == NW_WBXML_EXT_I_0)
+ || (t == NW_WBXML_EXT_I_1)
+ || (t == NW_WBXML_EXT_I_2)) {
+ if ((t != NW_WBXML_EXT_0)
+ && (t != NW_WBXML_EXT_1)
+ && (t != NW_WBXML_EXT_2)
+ && (str->storage == NULL)) {
+ return NW_STAT_FAILURE;
+ }
+ val->type = NW_WBXML_ATTR_COMPONENT_EXT;
+ val->component.ext.type = NW_TINYDOM_EXTENSION_TYPE_NORMAL;
+ val->component.ext.token = token;
+ if ((t == NW_WBXML_EXT_0)
+ || (t == NW_WBXML_EXT_1)
+ || (t == NW_WBXML_EXT_2)) {
+ NW_String_initialize(&(val->component.ext.value.string), NULL, 0);
+ } else {
+ /* struct assignment, shallow copy */
+ val->component.ext.value.string = *str;
+ }
+ return NW_STAT_SUCCESS;
+}
+ return NW_STAT_FAILURE;
+}
+
+NW_Status_t
+NW_DOM_AttrVal_initFromExtensionInt (NW_DOM_AttrVal_t* val,
+ NW_Uint16 token,
+ NW_Uint32 x)
+{
+ NW_Uint8 t = (NW_Uint8)token;
+
+ NW_ASSERT(val != NULL);
+
+ if ((t == NW_WBXML_EXT_T_0)
+ || (t == NW_WBXML_EXT_T_1)
+ || (t == NW_WBXML_EXT_T_2)) {
+ val->type = NW_WBXML_ATTR_COMPONENT_EXT;
+ val->component.ext.type = NW_TINYDOM_EXTENSION_TYPE_EXT_T_INTEGER;
+ val->component.ext.token = token;
+ val->component.ext.value.x = x;
+ return NW_STAT_SUCCESS;
+ }
+ return NW_STAT_FAILURE;
+}
+
+/*
+ * Initializes an AttrVal of type NW_WBXML_ATTR_COMPONENT_OPAQUE
+ * Returns NW_STAT_SUCCESS
+ */
+
+NW_Status_t
+NW_DOM_AttrVal_initFromOpaque (NW_DOM_AttrVal_t *val,
+ NW_Uint32 length,
+ NW_Byte* data)
+{
+ NW_ASSERT(val != NULL);
+ NW_ASSERT(data != NULL);
+
+ val->type = NW_WBXML_ATTR_COMPONENT_OPAQUE;
+ val->component.opaque.data = data;
+ val->component.opaque.length = length;
+ return NW_STAT_SUCCESS;
+}
+
+
+/*
+ * Initializes an AttrVal of type NW_WBXML_ATTR_COMPONENT_TOKEN
+ * Returns NW_STAT_SUCCESS
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_AttrVal_initFromToken (NW_DOM_AttrVal_t *val, NW_Uint16 token)
+{
+ NW_ASSERT(val != NULL);
+
+ val->type = NW_WBXML_ATTR_COMPONENT_TOKEN;
+ val->component.value_token = (NW_Uint32)token;
+ return NW_STAT_SUCCESS;
+}
+
+
+NW_Status_t
+NW_DOM_AttrVal_delete (NW_DOM_AttrVal_t * attrVal)
+{
+ NW_ASSERT(attrVal != NULL);
+
+ NW_Mem_Free(attrVal);
+
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Returns the type of attribute value
+ */
+
+EXPORT_C NW_Uint16
+NW_DOM_AttrVal_getType(NW_DOM_AttrVal_t *val)
+{
+ NW_ASSERT(val != NULL);
+
+ switch(val->type)
+ {
+ case NW_WBXML_ATTR_COMPONENT_EXT:
+ return NW_DOM_ATTR_VAL_EXTENSION;
+ case NW_WBXML_ATTR_COMPONENT_STRING:
+ return NW_DOM_ATTR_VAL_STRING;
+ case NW_WBXML_ATTR_COMPONENT_ENTITY:
+ return NW_DOM_ATTR_VAL_ENTITY;
+ case NW_WBXML_ATTR_COMPONENT_TOKEN:
+ return NW_DOM_ATTR_VAL_TOKEN;
+ case NW_WBXML_ATTR_COMPONENT_OPAQUE:
+ return NW_DOM_ATTR_VAL_OPAQUE;
+ default:
+ return 0;
+ }
+}
+
+/*
+ * Sets the type of attribute value
+ * Returns NW_STAT_SUCCESS
+ */
+
+/* TBD This is a very dangerous function and should be made internal
+ use only (i.e., static)! */
+NW_Status_t
+NW_DOM_AttrVal_setType(NW_DOM_AttrVal_t *val,
+ NW_Uint16 type)
+{
+ NW_ASSERT(val != NULL);
+
+ switch(type)
+ {
+ case NW_DOM_ATTR_VAL_EXTENSION:
+ val->type = NW_WBXML_ATTR_COMPONENT_EXT;
+ break;
+ case NW_DOM_ATTR_VAL_STRING:
+ val->type = NW_WBXML_ATTR_COMPONENT_STRING;
+ break;
+ case NW_DOM_ATTR_VAL_ENTITY:
+ val->type = NW_WBXML_ATTR_COMPONENT_ENTITY;
+ break;
+ case NW_DOM_ATTR_VAL_TOKEN:
+ val->type = NW_WBXML_ATTR_COMPONENT_TOKEN;
+ break;
+ case NW_DOM_ATTR_VAL_OPAQUE:
+ val->type = NW_WBXML_ATTR_COMPONENT_OPAQUE;
+ break;
+ default:
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Returns
+ * NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED - invalid encoding
+ * NW_STAT_DOM_NO_STRING_RETURNED - if the type of AttrVal was invalid
+ * NW_STAT_SUCCESS
+ *
+ * MODIFIED string (the value of NW_DOM_AttrVal)
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_AttrVal_toString(NW_DOM_AttrVal_t *av,
+ NW_String_t * string,
+ NW_Uint32 encoding)
+{
+ NW_Status_t status;
+
+ NW_ASSERT(av != NULL);
+ NW_ASSERT(string != NULL);
+
+ NW_String_initialize(string, NULL, 0);
+
+ if ((NW_String_charsetValid(encoding)) != NW_STAT_SUCCESS)
+ return NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED;
+
+ switch (NW_DOM_AttrVal_getType(av))
+ {
+ case NW_DOM_ATTR_VAL_TOKEN:
+ status = NW_String_tokenToString(av->component.value_token, string, encoding);
+ if(status != NW_STAT_SUCCESS){
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ return NW_STAT_SUCCESS;
+
+ case NW_DOM_ATTR_VAL_STRING:
+ {
+ NW_Byte *storage = av->component.string.storage;
+ status = NW_String_initialize(string, storage, encoding);
+ if(status != NW_STAT_SUCCESS){
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ return NW_STAT_SUCCESS;
+ }
+
+ case NW_DOM_ATTR_VAL_ENTITY:
+ status = NW_String_entityToString(av->component.entity,
+ string, encoding);
+ if(status != NW_STAT_SUCCESS){
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ return NW_STAT_SUCCESS;
+
+ case NW_DOM_ATTR_VAL_OPAQUE:
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ case NW_DOM_ATTR_VAL_EXTENSION:
+ {
+ NW_Uint8 t; /* 8-bit token */
+
+ t = (NW_Uint8)(av->component.ext.token);
+ if ((t == NW_WBXML_EXT_0)
+ || (t == NW_WBXML_EXT_1)
+ || (t == NW_WBXML_EXT_2)) {
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ if (av->component.ext.value.string.storage == NULL) {
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ /* struct assignment, shallow copy */
+ *string = av->component.ext.value.string;
+ return NW_STAT_SUCCESS;
+ }
+ default:
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+}
+
+/*
+ * If attribute value is of type NW_DOM_ATTR_VAL_ENTITY
+ * return the associated entity
+ */
+
+NW_Uint32
+NW_DOM_AttrVal_getEntity(NW_DOM_AttrVal_t *val)
+{
+ NW_ASSERT(val != NULL);
+
+ if (NW_DOM_AttrVal_getType(val) != NW_DOM_ATTR_VAL_ENTITY)
+ return val->component.entity;
+ return 0;
+}
+
+NW_Status_t
+NW_DOM_AttrVal_getExtensionToken(NW_DOM_AttrVal_t* val,
+ NW_Uint16* token)
+{
+ if (NW_DOM_AttrVal_getType(val) != NW_DOM_ATTR_VAL_EXTENSION) {
+ return NW_STAT_FAILURE;
+ }
+ *token = (NW_Uint16)(val->component.ext.token);
+ return NW_STAT_SUCCESS;
+}
+
+/* If attribute value is of type NW_DOM_TEXT_ITEM_EXTENSION returns token
+ otherwise returns 0 and returns str->length = 0, str->storage = NULL.
+
+ All returned strings are shallow copies and the only proper way to
+ free these is to call NW_String_delete(pStr). */
+EXPORT_C NW_Uint16
+NW_DOM_AttrVal_getExtension(NW_DOM_AttrVal_t *val,
+ NW_String_t *str)
+{
+ NW_Uint16 fqToken;
+ NW_Uint8 t; /* 8-bit token */
+
+ NW_ASSERT (val != NULL);
+ NW_ASSERT (str != NULL);
+
+ NW_String_initialize(str, NULL, 0);
+
+ if (NW_DOM_AttrVal_getType(val) != NW_DOM_ATTR_VAL_EXTENSION) {
+ return 0;
+ }
+
+ /* TBD If it could be gauranteed that the extension was constructed
+ correctly then it would be enough to just unconditionally
+ shallowCopy. */
+
+ fqToken = (NW_Uint16)(val->component.ext.token);
+ t = (NW_Uint8)fqToken;
+
+ if (((t == NW_WBXML_EXT_T_0)
+ || (t == NW_WBXML_EXT_T_1)
+ || (t == NW_WBXML_EXT_T_2))
+ && (val->component.ext.type
+ == NW_TINYDOM_EXTENSION_TYPE_EXT_T_INTEGER)) {
+ /* This function is not for this case: use "getExtensionInt" form. */
+ return 0;
+ }
+
+ if ((t != NW_WBXML_EXT_0) && (t != NW_WBXML_EXT_1) && (t != NW_WBXML_EXT_2)) {
+ /* By fiat we do nothing with the single byte extension tokens. A
+ more correct version might be to callback to the client to
+ request a mapping to a client determined string.
+
+ In the normal case where EXT_T refers to the string table, both
+ the EXT_T and EXT_I forms are represented by an explicit pointer
+ to the string value since for the EXT_T form we don't have a
+ pointer to the string table anyway. */
+ NW_String_shallowCopy(str, &val->component.ext.value.string);
+ }
+ return fqToken;
+}
+
+NW_Status_t
+NW_DOM_AttrVal_getExtensionInt(NW_DOM_AttrVal_t* val,
+ NW_Uint32* x)
+{
+ NW_Uint16 fqToken;
+ NW_Uint8 t; /* 8-bit token */
+
+ NW_ASSERT(val != NULL);
+ NW_ASSERT(x != NULL);
+
+ if ((NW_DOM_AttrVal_getType(val) != NW_DOM_ATTR_VAL_EXTENSION)
+ || ((val->component.ext.type
+ != NW_TINYDOM_EXTENSION_TYPE_EXT_T_INTEGER)))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ fqToken = (NW_Uint16)(val->component.ext.token);
+ t = (NW_Uint8)fqToken;
+ if ((t == NW_WBXML_EXT_T_0)
+ || (t == NW_WBXML_EXT_T_1)
+ || (t == NW_WBXML_EXT_T_2)) {
+ *x = val->component.ext.value.x;
+ return NW_STAT_SUCCESS;
+ }
+ return NW_STAT_FAILURE;
+}
+
+/*
+ * If attribute value is of type NW_DOM_ATTR_VAL_OPAQUE
+ * returns the associated opaque data and length.
+ */
+
+/* Note: change the signature so both values are out params? */
+
+EXPORT_C NW_Byte *
+NW_DOM_AttrVal_getOpaque(NW_DOM_AttrVal_t *val,
+ NW_Uint32 *opaqueLen)
+{
+ NW_ASSERT(val != NULL);
+ NW_ASSERT(opaqueLen != NULL);
+
+ if (NW_DOM_AttrVal_getType(val) != NW_DOM_ATTR_VAL_OPAQUE)
+ return NULL;
+
+ *opaqueLen = val->component.opaque.length;
+ return val->component.opaque.data;
+}
+
+/*
+ * If attribute value is of type NW_WBXML_ATTR_COMPONENT_TOKEN,
+ * returns the associated token
+ */
+
+NW_Uint16
+NW_DOM_AttrVal_getToken(NW_DOM_AttrVal_t *val)
+{
+ NW_ASSERT(val != NULL);
+
+ if (val->type == NW_WBXML_ATTR_COMPONENT_TOKEN)
+ return (NW_Uint16)val->component.value_token;
+
+ return 0;
+}
+
+
+/*****************************************
+* ATTRIBUTE VAL ITERATOR
+* iterates over the values of an attribute
+******************************************/
+
+EXPORT_C NW_Uint32
+NW_DOM_AttributeHandle_getEncoding(NW_DOM_AttributeHandle_t *handle)
+{
+ NW_ASSERT(handle != NULL);
+
+ return handle->tinyHandle.tlit.tiny_parser->dom_tree->doc->charset;
+}
+/* the following functions are not referenced, 8/12/01 */
+/*
+NW_Uint32
+NW_DOM_AttributeHandle_getPublicId(NW_DOM_AttributeHandle_t *handle)
+{
+ NW_ASSERT(handle != NULL);
+
+ return handle->tinyHandle.tlit.tiny_parser->dom_tree->doc->publicid;
+}
+
+
+NW_Status_t
+NW_DOM_AttributeHandle_getDocType(NW_DOM_AttributeHandle_t *handle,
+ NW_String_t *str)
+{
+ NW_String_t *docType;
+
+ NW_ASSERT(handle != NULL);
+ NW_ASSERT(str != NULL);
+
+ docType = handle->tinyHandle.tlit.tiny_parser->dom_tree->doc->doc_type;
+ return NW_String_shallowCopy(str, docType);
+}
+*/
+
+/*
+ * Allocates memory for NW_DOM_AttributeHandle
+ * Returns NULL in case of failure to do so
+ */
+
+NW_DOM_AttributeHandle_t *
+NW_DOM_AttributeHandle_new(void)
+{
+ NW_DOM_AttributeHandle_t *handle =
+ (NW_DOM_AttributeHandle_t *) NW_Mem_Malloc(sizeof (NW_DOM_AttributeHandle_t));
+ if (handle == NULL){
+ return NULL;
+ }
+ handle->node = NULL;
+ return handle;
+}
+
+/* Initializes an attribute handle with an attribute node. Note that
+ only some attributes have nodes of their own. Such attributes are
+ initilized by this method. Also, this method initializes the
+ attribute handle so that it may be used by
+ NW_DOM_AttributeHandle_addVal().
+
+ Returns NW_STAT_SUCCESS */
+
+NW_Status_t
+NW_DOM_AttributeHandle_initWithNode(NW_DOM_AttributeHandle_t *handle,
+ NW_TinyDom_Parser_t *parser,
+ NW_TinyTree_Node_t *node)
+{
+ NW_TinyTree_Offset_t offset;
+
+ NW_ASSERT(handle != NULL);
+ NW_ASSERT(node != NULL);
+ NW_ASSERT(parser != NULL);
+
+ offset = NW_TinyTree_Node_getSourceOffset(node);
+ handle->node = node;
+ NW_TinyDom_AttributeHandle_init(&handle->tinyHandle, parser, offset);
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Initializes and Attribute Handle with a offset.
+ * Returns NW_STAT_SUCCESS
+ */
+
+NW_Status_t
+NW_DOM_AttributeHandle_initWithOffset(NW_DOM_AttributeHandle_t *handle,
+ NW_TinyDom_Parser_t *parser,
+ NW_TinyTree_Offset_t offset)
+{
+ NW_ASSERT(handle != NULL);
+ NW_ASSERT(parser != NULL);
+
+ handle->node = NULL;
+ NW_TinyDom_AttributeHandle_init(&handle->tinyHandle, parser, offset);
+ return NW_STAT_SUCCESS;
+}
+
+EXPORT_C NW_Status_t
+NW_DOM_AttributeHandle_initWithStartToken(NW_DOM_AttributeHandle_t* handle,
+ NW_TinyDom_Parser_t* parser,
+ NW_Uint16 fqToken)
+{
+ NW_ASSERT(handle != NULL);
+ NW_ASSERT(parser != NULL);
+
+ handle->node = NULL;
+ return NW_TinyDom_AttributeHandle_initWithStartToken(&handle->tinyHandle,
+ &handle->node,
+ parser,
+ fqToken);
+}
+
+EXPORT_C NW_Status_t
+NW_DOM_AttributeHandle_addVal(NW_DOM_AttributeHandle_t* handle,
+ NW_DOM_AttrVal_t* value)
+{
+ NW_ASSERT(handle != NULL);
+ NW_ASSERT(value != NULL);
+
+ return NW_TinyDom_AttributeHandle_addVal(&(handle->tinyHandle),
+ handle->node,
+ value);
+}
+
+NW_Status_t
+NW_DOM_AttributeHandle_delete(NW_DOM_AttributeHandle_t *handle)
+{
+ NW_ASSERT(handle != NULL);
+
+ NW_Mem_Free(handle);
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Returns the attribute name (without prefix if any)
+ * Returns
+ * NW_STAT_OUT_OF_MEMORY
+ * NW_STAT_DOM_NO_STRING_RETURNED
+ * NW_STAT_SUCCESS
+ *
+ * Modifies attributeName
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_AttributeHandle_getName(NW_DOM_AttributeHandle_t *handle,
+ NW_String_t* attributeName)
+{
+ NW_Status_t status;
+ NW_Byte *p; /* pointer to find '=' sign location */
+ NW_Uint32 encoding;
+ NW_String_t temp;
+
+ NW_ASSERT(handle != NULL);
+ NW_ASSERT(attributeName != NULL);
+
+ encoding = NW_DOM_AttributeHandle_getEncoding(handle);
+
+ status = NW_DOM_AttributeHandle_getNameWithPrefix(handle, attributeName);
+ if (status != NW_STAT_SUCCESS)
+ return status;
+
+ /*
+ * Before returning the attribute name, strip off any
+ * part that is actually the attribute value's prefix.
+ * For example, if name is "href=http://", the name
+ * that should be returned is only "href".
+ */
+ if ((p = NW_String_findChar(attributeName, '=', encoding)) != NULL)
+ {
+ /* There an attribute value_prefix - so strip prefix
+ * Create a new string without the '=...' or there
+ * will be wasted memory.
+ */
+ status = NW_String_deepCopy(&temp, attributeName);
+ if (status != NW_STAT_SUCCESS) {
+ return status;
+ }
+ /* set rest of buffer to NULL */
+ p = NW_String_findChar(&temp, '=', encoding);
+ NW_Mem_memset(p, 0, (NW_Uint32)(temp.storage + NW_String_getByteCount(&temp) - p));
+
+ /* Free up any user-owned storage in original string */
+ NW_String_deleteStorage(attributeName);
+ status = NW_String_initialize(attributeName, temp.storage, encoding);
+ NW_String_setUserOwnsStorage(attributeName);
+ }
+
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Returns the token for the attribute
+ */
+
+EXPORT_C NW_Uint16
+NW_DOM_AttributeHandle_getToken(NW_DOM_AttributeHandle_t *handle)
+{
+ NW_ASSERT(handle != NULL);
+
+ return (NW_Uint16)NW_TinyDom_AttributeHandle_getToken(&handle->tinyHandle);
+}
+
+/*
+ * Returns the attribute prefix (for e.g. href="http://"
+ * will return "http://"
+ * Returns
+ * NW_STAT_OUT_OF_MEMORY
+ * NW_STAT_DOM_NO_STRING_RETURNED
+ * NW_STAT_DOM_NO_VALUE_PREFIX
+ * NW_STAT_SUCCESS
+ *
+ * Modifies prefixName
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_AttributeHandle_getValuePrefix(NW_DOM_AttributeHandle_t *handle,
+ NW_String_t* prefixName)
+{
+ NW_Status_t status;
+ NW_Byte *p = NULL;
+ NW_Uint32 encoding;
+
+ NW_ASSERT(handle != NULL);
+ NW_ASSERT(prefixName != NULL);
+
+ encoding = NW_DOM_AttributeHandle_getEncoding(handle);
+ status = NW_DOM_AttributeHandle_getNameWithPrefix(handle, prefixName);
+
+ if (status != NW_STAT_SUCCESS)
+ return status;
+
+ if ((p = NW_String_findChar(prefixName, '=', encoding)) != NULL)
+ {
+ NW_Uint32 len = 0;
+ NW_Byte *prefix = NULL;
+ /* Now make a new string with just the value's prefix */
+ p++;
+
+ if(NW_String_charBuffGetLength(p, encoding, &len) < 0){
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+
+ prefix = (NW_Byte *) NW_Mem_Malloc(len);
+ if (prefix == NULL)
+ return NW_STAT_OUT_OF_MEMORY;
+
+ NW_Mem_memcpy(prefix, p, len);
+ /* Free up any user-owned storage in old name */
+ NW_String_deleteStorage(prefixName);
+ status = NW_String_initialize(prefixName, prefix, encoding);
+ if (status != NW_STAT_SUCCESS){
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ return NW_String_setUserOwnsStorage(prefixName);
+ }else{
+ NW_String_deleteStorage(prefixName);
+ return NW_STAT_DOM_NO_VALUE_PREFIX;
+ }
+}
+
+/*
+ * Returns the attribute name with prefix
+ * Returns
+ * NW_STAT_OUT_OF_MEMORY
+ * NW_STAT_DOM_NO_STRING_RETURNED
+ * NW_STAT_SUCCESS
+ *
+ * Modifies attributeName
+ */
+
+NW_Status_t
+NW_DOM_AttributeHandle_getNameWithPrefix(NW_DOM_AttributeHandle_t* handle,
+ NW_String_t* attrName)
+{
+ NW_Status_t status;
+ NW_Uint32 token;
+ NW_Uint32 encoding;
+
+ NW_ASSERT(handle != NULL);
+ NW_ASSERT(attrName != NULL);
+
+ token = NW_TinyDom_AttributeHandle_getToken(&handle->tinyHandle);
+ encoding = NW_DOM_AttributeHandle_getEncoding(handle);
+ status = NW_TinyDom_AttributeHandle_getName(&handle->tinyHandle, attrName);
+
+ if (status == NW_STAT_SUCCESS)
+ return NW_STAT_SUCCESS;
+
+ if (status == NW_STAT_WBXML_NO_NAME){
+ status = NW_String_tokenToString(token, attrName, encoding);
+ if(status == NW_STAT_OUT_OF_MEMORY){
+ return status;
+ }
+ if(status != NW_STAT_SUCCESS){
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ return NW_STAT_SUCCESS;
+ }
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+}
+
+/*
+ * Returns
+ * NW_STAT_WBXML_ITERATE_MORE
+ * NW_STAT_WBXML_ITERATE_DONE
+ *
+ * Modifies attrVal (the next NW_DOM_AttrVal in the attribute value list
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_AttributeHandle_getNextVal(NW_DOM_AttributeHandle_t *handle,
+ NW_DOM_AttrVal_t *attrVal)
+{
+ NW_TinyTree_Offset_t offset;
+
+ NW_ASSERT(handle != NULL);
+ NW_ASSERT(attrVal != NULL);
+
+ offset = NW_TinyDom_AttributeHandle_iterateValues(&handle->tinyHandle,
+ attrVal);
+
+ if (offset == 0)
+ return NW_STAT_WBXML_ITERATE_DONE;
+
+ return NW_STAT_WBXML_ITERATE_MORE;
+}
+
+/*
+ * Returns
+ * NW_STAT_DOM_NO_STRING_RETURNED
+ * NW_STAT_SUCCESS
+ *
+ * output valueString is the complete string representation of attribute value
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_AttributeHandle_getValue(NW_DOM_AttributeHandle_t *handle,
+ NW_String_t* valueString)
+{
+ NW_String_t str;
+ NW_Uint32 encoding;
+ NW_Status_t status;
+ NW_Bool prefixFound = NW_FALSE;
+
+ NW_ASSERT(handle != NULL);
+ NW_ASSERT(valueString != NULL);
+
+ encoding = NW_DOM_AttributeHandle_getEncoding(handle);
+
+ valueString->storage = NULL;
+ valueString->length = 0;
+
+ /*
+ * If this attribute's name includes the an attribute value
+ * prefix (e.g. name is something like "href=http://"), then
+ * the attribute's value prefix must be extracted.
+ */
+ status = NW_DOM_AttributeHandle_getValuePrefix(handle, &str);
+ if (status == NW_STAT_SUCCESS) {
+ status = NW_String_deepCopy(valueString, &str);
+
+ if (status != NW_STAT_SUCCESS){
+ NW_String_deleteStorage(&str);
+ if (status == NW_STAT_OUT_OF_MEMORY)
+ {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+ else
+ {
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ }
+ prefixFound = NW_TRUE;
+ }
+ else if(status != NW_STAT_DOM_NO_VALUE_PREFIX){
+ return status;
+ }
+
+ status = NW_DOM_WbxmlComponent_sequenceToString(NW_WBXML_ATTRIBUTE_VALUE_COMPONENT,
+ &(handle->tinyHandle),
+ encoding,valueString);
+
+ if( (status == NW_STAT_DOM_NO_STRING_RETURNED) &&
+ (valueString->length == 0) &&
+ (prefixFound == NW_TRUE) )
+ {
+
+ status = NW_String_deepCopy(valueString, &str);
+ }
+
+ NW_String_deleteStorage(&str);
+ return status;
+
+}
+
+/*
+ * PROCESSING_INSTRUCTION NODE
+ */
+
+/*
+ * Gets the name of the target for this processing instruction
+ * Returns one of:
+ * NW_STAT_DOM_NODE_TYPE_ERR - not a DOM_ProcessingInstructionNode_t node
+ * NW_STAT_DOM_NO_STRING_RETURNED
+ * NW_STAT_SUCCESS
+ */
+
+NW_Status_t
+NW_DOM_ProcessingInstructionNode_getTarget(NW_DOM_ProcessingInstructionNode_t* node,
+ NW_String_t *target)
+{
+ NW_DOM_AttributeHandle_t attrHandle;
+ NW_Status_t status;
+
+ NW_ASSERT(node != NULL);
+ NW_ASSERT(target != NULL);
+
+ status = NW_DOM_ProcessingInstructionNode_getHandle(node, &attrHandle);
+ if (status != NW_STAT_SUCCESS)
+ return status;
+
+ return NW_DOM_AttributeHandle_getName(&attrHandle, target);
+}
+
+/*
+ * Returns the token associated with the PI node (WBXML specific
+ */
+
+EXPORT_C NW_Uint16
+NW_DOM_ProcessingInstructionNode_getTargetToken (NW_DOM_ProcessingInstructionNode_t* node)
+{
+ NW_DOM_AttributeHandle_t attrHandle;
+ NW_Status_t status;
+
+ NW_ASSERT(node != NULL);
+
+ status = NW_DOM_ProcessingInstructionNode_getHandle(node, &attrHandle);
+
+ if (status != NW_STAT_SUCCESS)
+ return (NW_Uint16)0;
+
+ return NW_DOM_AttributeHandle_getToken(&attrHandle);
+}
+
+/*
+ * Returns one of:
+ * NW_STAT_DOM_NODE_TYPE_ERR - not a NW_DOM_ProcessingInstructionNode_t node
+ * NW_STAT_DOM_NO_STRING_RETURNED
+ * NW_STAT_SUCCESS
+ */
+
+NW_Status_t
+NW_DOM_ProcessingInstructionNode_getData(NW_DOM_ProcessingInstructionNode_t* node,
+ NW_String_t *data)
+{
+ NW_DOM_AttributeHandle_t attrHandle;
+ NW_Status_t status;
+
+ NW_ASSERT(node != NULL);
+ NW_ASSERT(data != NULL);
+
+ status = NW_DOM_ProcessingInstructionNode_getHandle(node, &attrHandle);
+
+ if (status != NW_STAT_SUCCESS)
+ return status;
+
+ return NW_DOM_AttributeHandle_getValue(&attrHandle, data);
+}
+
+
+/*
+ * Gets the attribute handle associated with the node
+ * Returns one of:
+ * NW_STAT_DOM_NODE_TYPE_ERR - not a processing instruction node
+ * NW_STAT_SUCCESS
+ * Modifies handle
+ */
+
+NW_Status_t
+NW_DOM_ProcessingInstructionNode_getHandle(NW_DOM_ProcessingInstructionNode_t* node,
+ NW_DOM_AttributeHandle_t *handle)
+{
+ NW_TinyTree_t* tiny_tree;
+ NW_DOM_Node_t *child;
+
+ NW_ASSERT(node != NULL);
+ NW_ASSERT(handle != NULL);
+
+ if (NW_DOM_Node_getNodeType(node) != NW_DOM_PROCESSING_INSTRUCTION_NODE)
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+
+ tiny_tree = NW_TinyTree_Node_findTree(node);
+ child = NW_TinyTree_findFirstChild(node);
+
+ while(child){
+ if (NW_TinyDom_Node_getType(child) == T_DOM_NODE_ATTR){
+ break;
+ }
+ child = NW_TinyTree_findNextSibling(child);
+ }
+ if (child) {
+ return NW_DOM_AttributeHandle_initWithNode(handle,
+ NW_TinyDom_getParser(tiny_tree),
+ child);
+ }
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/dom/src/document.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,951 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_dom_node.h>
+#include <xml/cxml/nw_dom_document.h>
+#include <xml/cxml/nw_dom_element.h>
+#include <xml/cxml/nw_tinytree.h>
+#include <xml/cxml/nw_encoder_wbxmlwriter.h>
+#include <xml/cxml/nw_xmlp_xmlp2wbxml.h>
+#include <xml/cxml/nw_tinydom_utils.h>
+
+/*#include "nw_parser.h"*/
+
+/************************
+* DOCUMENT - NODE Methods
+*************************/
+
+EXPORT_C void
+NW_DOM_DocumentNode_Delete(NW_DOM_DocumentNode_t* docNode){
+ NW_WBXML_Parser_t *wbxmlParser;
+ NW_TinyDom_Tree_t *tinyDomTree;
+ NW_WBXML_Document_t *document;
+ NW_TinyTree_t *tinyTree;
+
+if (docNode == NULL) {
+ return;
+ }
+
+ tinyTree = NW_TinyTree_Node_findTree(docNode);
+
+ if(tinyTree != NULL){
+ document = NW_TinyDom_getDocHeader(tinyTree);
+ tinyDomTree = NW_TinyDom_getTree(tinyTree);
+ wbxmlParser = tinyDomTree->parser;
+ if(wbxmlParser != NULL){
+ NW_WBXML_Parser_delete(wbxmlParser);
+ }
+ if(tinyDomTree != NULL){
+ NW_TinyDom_Tree_destruct(tinyDomTree);
+ }
+ if(document != NULL){
+ NW_WBXML_Document_destruct(document);
+ }
+ }
+}
+ /* ???? Does the writer need any cleanup ? */
+
+
+static void
+NW_TinyDom_Handle_Initialize(NW_TinyDom_Handle_t *h,
+ NW_Uint32 default_public_id,
+ NW_Bool extTNotStringTable)
+{
+ NW_ASSERT(h != NULL);
+
+ (void) NW_Mem_memset(h, 0, sizeof(*h));
+
+ NW_WBXML_Parser_newInPlace (&(h->wbxmlParser));
+ h->wbxmlParser.ext_t_not_table_index =(NW_Uint8)((extTNotStringTable == NW_FALSE)?
+ CXML_FALSE : CXML_TRUE);
+ NW_WBXML_Document_construct(&(h->document), default_public_id);
+ NW_TinyDom_Tree_construct (&(h->tinyDOMTree),
+ &(h->wbxmlParser),
+ &(h->document),
+ &(h->writer));
+ NW_TinyDom_Parser_construct (&(h->tinyParser), &(h->tinyDOMTree));
+}
+
+
+/* ************************************************************************/
+
+/*
+ * Create and populate a dom tree by parsing a buffer, returning the
+ * document node.
+ */
+
+EXPORT_C
+NW_DOM_DocumentNode_t *
+NW_DOM_DocumentNode_BuildWBXMLTree(NW_TinyDom_Handle_t *h,
+ NW_Byte *buffer,
+ NW_Int32 length,
+ NW_Bool freeBuff,
+ NW_Bool extTNotStringTable)
+{
+ NW_Status_t status;
+
+ NW_ASSERT(h != NULL);
+
+ NW_TinyDom_Handle_Initialize(h, 0, extTNotStringTable);
+
+ status = NW_TinyDom_Parser_buildTree (&(h->tinyParser),
+ (char *)buffer,
+ (NW_Uint32)length,
+ freeBuff);
+ if (status == NW_STAT_SUCCESS) {
+ return h->tinyDOMTree.root_node;
+ }
+ return NULL;
+}
+
+/*
+ * This function is same at that of NW_DOM_DocumentNode_BuildWBXMLTree(..)
+ * but returns the error code.
+ */
+
+static
+NW_DOM_DocumentNode_t *
+CXML_DOM_DocumentNode_BuildWBXMLTree(NW_TinyDom_Handle_t *h,
+ NW_Byte *buffer,
+ NW_Int32 length,
+ NW_Bool freeBuff,
+ NW_Bool extTNotStringTable,
+ NW_Status_t* errorStatus)
+{
+ NW_Status_t status;
+
+ NW_ASSERT(h != NULL);
+
+ NW_TinyDom_Handle_Initialize(h, 0, extTNotStringTable);
+
+ status = NW_TinyDom_Parser_buildTree (&(h->tinyParser),
+ (char *)buffer,
+ (NW_Uint32)length,
+ freeBuff);
+ if (status == NW_STAT_SUCCESS)
+ {
+ *errorStatus = status;
+ return h->tinyDOMTree.root_node;
+ }
+ *errorStatus = status;
+ return NULL;
+}
+
+
+/* Function to copy the string table extension values from the
+ * WBXML encoder to WBXML parser
+ */
+
+static NW_Status_t
+NW_DOM_Write_WBXML_StrTbl(NW_TinyDom_Handle_t *p, void* WBXMLEncStrTbl)
+{
+ NW_Status_t status = NW_STAT_SUCCESS;
+ NW_Status_t s = NW_STAT_WBXML_ITERATE_DONE;
+ NW_Uint32 stringTableByteCount = 0;
+ NW_Encoder_StringTableIterator_t strTableIterator;
+ NW_Uint8* pLiteralBuf;
+ NW_String_t pLiteralStr;
+ NW_Uint32 docTableIndex;
+ NW_Encoder_StringTable_t* strTable = NULL;
+ NW_WBXML_Document_t* doc = &(p->document);
+
+ strTable = (NW_Encoder_StringTable_t*) WBXMLEncStrTbl;
+
+ stringTableByteCount = NW_Encoder_StringTable_getTotalBytes(strTable);
+
+
+ if(stringTableByteCount > 0)
+ {
+ /*The following function always return success so why bother to check? */
+
+ NW_Encoder_StringTable_StringTableIterateInit(WBXMLEncStrTbl,&strTableIterator);
+
+
+ s = NW_Encoder_StringTable_StringTableIterateNext
+ (&strTableIterator,&stringTableByteCount,&pLiteralBuf);
+
+ while(s == NW_STAT_WBXML_ITERATE_MORE)
+ {
+
+ pLiteralStr.length = stringTableByteCount;
+ pLiteralStr.storage = pLiteralBuf;
+
+ status = NW_WBXML_Document_putTableString(doc,&pLiteralStr,&docTableIndex) ;
+
+ if(status != NW_STAT_SUCCESS)
+ {
+ break;
+ }
+
+ s = NW_Encoder_StringTable_StringTableIterateNext
+ (&strTableIterator,&stringTableByteCount,&pLiteralBuf) ;
+
+ }/*end while */
+
+ }/*end if(stringTableByteCount > 0)*/
+
+ //Delete the tree
+
+ NW_Encoder_StringTable_delete(WBXMLEncStrTbl);
+ WBXMLEncStrTbl = NULL;
+ return status;
+}/*end NW_DOM_Write_WBXML_StrTbl()*/
+
+static
+NW_DOM_DocumentNode_t*
+NW_DOM_DocumentNode_BuildXMLTree(NW_TinyDom_Handle_t *h,
+ NW_Byte *buffer,
+ NW_Int32 length,
+ NW_Uint32 publicID,
+ NW_Bool extTNotStringTable)
+{
+
+ NW_Buffer_t inBuff;
+ NW_Buffer_t *outBuff = NULL;
+ NW_Uint32 encoding;
+ NW_Endianness_t endianness;
+ NW_DOM_DocumentNode_t* docNode;
+ NW_Status_t status;
+ NW_Uint32 line;
+ void* WBXMLEncStrTbl;
+
+ inBuff.length = length;
+ inBuff.data = buffer;
+
+ status = NW_XML_ComputeEncoding(length,
+ buffer,
+ &encoding,
+ &endianness);
+ if(status != NW_STAT_SUCCESS){
+ return NULL;
+ }
+
+/*
+ * If applications want to use HTML Parser they can call the exported
+ * NW_HTMLP_HtmlToWbxml() and then call NW_DOM_DocumentNode_BuildWBXMLTree()
+ */
+ status = NW_XML_XmlToWbxml(&inBuff, encoding, &outBuff, &line, publicID,&WBXMLEncStrTbl);
+
+
+
+ if(status != NW_STAT_SUCCESS){
+ if(outBuff != NULL){
+ NW_Mem_Free(outBuff);
+ }
+
+ return NULL;
+ }
+ docNode = NW_DOM_DocumentNode_BuildWBXMLTree(h,
+ outBuff->data,
+ outBuff->length,
+ NW_TRUE,
+ extTNotStringTable);
+
+ /* Write extension string table related information to the WBXML encoder. */
+
+ if( docNode && WBXMLEncStrTbl)
+ {
+ status = NW_DOM_Write_WBXML_StrTbl(h,WBXMLEncStrTbl);
+ if(status != NW_STAT_SUCCESS)
+ {
+ if(outBuff != NULL)
+ {
+ NW_Mem_Free(outBuff);
+ }
+ }
+ }/* end if(WBXMLEncStrTbl)*/
+
+ NW_Mem_Free(outBuff);
+ return docNode;
+}
+
+static
+NW_DOM_DocumentNode_t*
+CXML_DOM_DocumentNode_BuildXMLTree(NW_TinyDom_Handle_t *h,
+ NW_Byte *buffer,
+ NW_Int32 length,
+ NW_Uint32 publicID,
+ NW_Bool extTNotStringTable,
+ NW_Status_t* errorStatus)
+{
+
+ NW_Buffer_t inBuff;
+ NW_Buffer_t *outBuff = NULL;
+ NW_Uint32 encoding;
+ NW_Endianness_t endianness;
+ NW_DOM_DocumentNode_t* docNode;
+ NW_Status_t status;
+ NW_Uint32 line;
+ void* WBXMLEncStrTbl;
+
+ inBuff.length = length;
+ inBuff.data = buffer;
+
+ status = NW_XML_ComputeEncoding(length,
+ buffer,
+ &encoding,
+ &endianness);
+ if(status != NW_STAT_SUCCESS)
+ {
+ *errorStatus = status;
+ return NULL;
+ }
+
+/*
+ * If applications want to use HTML Parser they can call the exported
+ * NW_HTMLP_HtmlToWbxml() and then call NW_DOM_DocumentNode_BuildWBXMLTree()
+ */
+ status = NW_XML_XmlToWbxml(&inBuff, encoding, &outBuff, &line, publicID,&WBXMLEncStrTbl);
+
+
+
+ if(status != NW_STAT_SUCCESS){
+ if(outBuff != NULL){
+ NW_Mem_Free(outBuff);
+ }
+ *errorStatus = status;
+ return NULL;
+ }
+
+ docNode = CXML_DOM_DocumentNode_BuildWBXMLTree(h,
+ outBuff->data,
+ outBuff->length,
+ NW_TRUE,
+ extTNotStringTable,
+ errorStatus);
+
+ /* Write extension string table related information to the WBXML encoder. */
+
+ if( docNode && WBXMLEncStrTbl)
+ {
+ status = NW_DOM_Write_WBXML_StrTbl(h,WBXMLEncStrTbl);
+ if(status != NW_STAT_SUCCESS)
+ {
+ if(outBuff != NULL)
+ {
+ NW_Mem_Free(outBuff);
+ }
+ *errorStatus = status;
+ }
+ }/* end if(WBXMLEncStrTbl)*/
+
+ NW_Mem_Free(outBuff);
+ return docNode;
+}/*CXML_DOM_DocumentNode_BuildXMLTree() */
+
+EXPORT_C NW_DOM_DocumentNode_t*
+NW_DOM_DocumentNode_BuildTree(NW_TinyDom_Handle_t *h,
+ NW_Byte *buffer,
+ NW_Int32 length,
+ NW_Bool encoded,
+ NW_Uint32 publicID,
+ NW_Bool extTNotStringTable)
+{
+ if(encoded == NW_TRUE){
+ return NW_DOM_DocumentNode_BuildWBXMLTree(h,
+ buffer,
+ length,
+ NW_FALSE,
+ extTNotStringTable);
+ }
+
+ return NW_DOM_DocumentNode_BuildXMLTree(h,buffer, length, publicID, extTNotStringTable);
+}
+
+
+
+
+/*
+ * Returns publicId of the document (WBXML Specific)
+ * otherwise 0
+ */
+
+EXPORT_C NW_Uint32
+NW_DOM_DocumentNode_getPublicIdAsNumber(NW_DOM_DocumentNode_t *doc)
+{
+ NW_WBXML_Document_t *header;
+ NW_TinyTree_t *tiny_tree;
+
+ NW_ASSERT(doc != NULL);
+
+ if (NW_DOM_Node_getNodeType(doc) != NW_DOM_DOCUMENT_NODE){
+ return 0;
+ }
+
+ tiny_tree = NW_TinyTree_Node_findTree(doc);
+ header = NW_TinyDom_getDocHeader(tiny_tree);
+ NW_ASSERT(header != NULL);
+
+ return header->publicid;
+}
+
+/*
+ * Gets the publicid as string
+ * Returns
+ * NW_STAT_DOM_NODE_TYPE_ERR
+ * NW_STAT_SUCCESS
+ * MODIFIED - docType
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_DocumentNode_getPublicId(NW_DOM_DocumentNode_t *doc,
+ NW_String_t *docType)
+{
+ NW_WBXML_Document_t *header;
+ NW_TinyTree_t *tiny_tree;
+
+ NW_ASSERT(doc != NULL);
+ NW_ASSERT(docType != NULL);
+
+ if (NW_DOM_Node_getNodeType(doc) != NW_DOM_DOCUMENT_NODE)
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+
+ tiny_tree = NW_TinyTree_Node_findTree(doc);
+ header = NW_TinyDom_getDocHeader(tiny_tree);
+
+ NW_ASSERT(header != NULL);
+ NW_String_shallowCopy(docType, header->doc_type);
+
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Returns the version of the document,
+ * 0 in case of invalid operation (e.g. NULL doc)
+ */
+
+EXPORT_C NW_Uint8
+NW_DOM_DocumentNode_getVersion(NW_DOM_DocumentNode_t *doc)
+{
+ NW_WBXML_Document_t *header;
+ NW_TinyTree_t *tiny_tree;
+
+ NW_ASSERT(doc != NULL);
+
+ if (NW_DOM_Node_getNodeType(doc) != NW_DOM_DOCUMENT_NODE){
+ return 0;
+ }
+
+ tiny_tree = NW_TinyTree_Node_findTree(doc);
+ header = NW_TinyDom_getDocHeader(tiny_tree);
+ NW_ASSERT(header != NULL);
+
+ return header->version;
+
+}
+
+/*
+ * Returns the supported encoding of the document
+ * or 0 for invalid document
+ */
+
+EXPORT_C NW_Uint32
+NW_DOM_DocumentNode_getCharacterEncoding(NW_DOM_DocumentNode_t *doc)
+{
+ NW_WBXML_Document_t *header;
+ NW_TinyTree_t *tiny_tree;
+
+ NW_ASSERT(doc != NULL);
+
+ if (NW_DOM_Node_getNodeType(doc) != NW_DOM_DOCUMENT_NODE)
+ return 0;
+
+ tiny_tree = NW_TinyTree_Node_findTree(doc);
+ header = NW_TinyDom_getDocHeader(tiny_tree);
+ NW_ASSERT(header != NULL);
+
+ return header->charset;
+}
+
+/*
+ * Returns child node that is the root of this document
+ */
+
+EXPORT_C NW_DOM_ElementNode_t *
+NW_DOM_DocumentNode_getDocumentElement(NW_DOM_DocumentNode_t *doc)
+{
+ NW_DOM_Node_t *docChild;
+ NW_Uint16 type;
+
+ NW_ASSERT(doc != NULL);
+
+ if (NW_DOM_Node_getNodeType(doc) != NW_DOM_DOCUMENT_NODE){
+ return NULL;
+ }
+
+ /*
+ * Get the first child of the document node
+ * (can be a PI node)
+ */
+
+ docChild = NW_DOM_Node_getFirstChild(doc);
+
+ type = NW_DOM_Node_getNodeType(docChild);
+ if (type == 0){
+ return NULL;
+ }
+
+ while (type != NW_DOM_ELEMENT_NODE){
+ docChild = NW_DOM_Node_getNextSibling(docChild);
+ type = NW_DOM_Node_getNodeType(docChild);
+ }
+
+ return docChild;
+}
+
+/*
+ * Gets the dictionary
+ */
+
+EXPORT_C NW_WBXML_Dictionary_t *
+NW_DOM_DocumentNode_getDictionary(NW_DOM_DocumentNode_t *doc)
+{
+ NW_Uint32 publicid = 0;
+ NW_Uint32 encoding;
+ NW_WBXML_Dictionary_t *dictionary = NULL;
+ NW_Status_t status;
+
+ NW_ASSERT(doc != NULL);
+
+ encoding = NW_DOM_DocumentNode_getCharacterEncoding(doc);
+ publicid = NW_DOM_DocumentNode_getPublicIdAsNumber(doc);
+
+ if (publicid != 0){
+ dictionary = NW_WBXML_Dictionary_getByPublicId(publicid);
+ }
+ else{
+ NW_String_t docType;
+
+ status = NW_DOM_DocumentNode_getPublicId(doc, &docType);
+ if (status != NW_STAT_SUCCESS){
+ return NULL;
+ }
+ dictionary = NW_WBXML_Dictionary_getByDocType(&docType, encoding);
+ }
+ return dictionary;
+}
+
+
+
+NW_Status_t
+NW_DOM_DocumentNode_getElementIteratorByTagName(NW_DOM_DocumentNode_t *doc,
+ NW_String_t* name,
+ NW_DOM_NodeIterator_t *handle)
+{
+ NW_WBXML_Dictionary_t *dict = NULL;
+ NW_String_UCS2Buff_t *buff = NULL;
+ NW_Uint32 encoding;
+ NW_Int16 token;
+
+ NW_ASSERT(doc != NULL);
+ NW_ASSERT(name != NULL);
+ NW_ASSERT(handle != NULL);
+
+ encoding = NW_DOM_DocumentNode_getCharacterEncoding(doc);
+ dict = NW_DOM_DocumentNode_getDictionary(doc);
+ buff = NW_String_stringToUCS2Buff(name, encoding);
+ if((buff == NULL) || (dict == NULL)){
+ NW_Mem_Free(buff);
+ return NW_STAT_FAILURE;
+ }
+ token = NW_WBXML_Dictionary_getTagToken(dict, buff, NW_TRUE);
+ NW_Mem_Free(buff);
+ if (token < 0) {
+ return NW_STAT_FAILURE;
+ }
+ else {
+ return NW_DOM_DocumentNode_getElementIteratorByTagToken(doc,
+ (NW_Uint16)token,
+ handle);
+}
+}
+
+NW_Status_t
+NW_DOM_DocumentNode_getElementIteratorByTagToken(NW_DOM_DocumentNode_t *doc,
+ NW_Uint16 token,
+ NW_DOM_NodeIterator_t *handle)
+{
+
+ NW_DOM_ElementNode_t *elem;
+
+ NW_ASSERT(doc != NULL);
+ NW_ASSERT(handle != NULL);
+
+ if (NW_DOM_Node_getNodeType(doc) != NW_DOM_DOCUMENT_NODE)
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+
+ elem = NW_DOM_DocumentNode_getDocumentElement(doc);
+ NW_ASSERT(elem != NULL);
+
+ return NW_DOM_NodeIterator_initialize(handle, elem, token);
+}
+
+
+
+
+
+/*
+ * Returns a pointer to the created Element Node
+ */
+EXPORT_C NW_DOM_ElementNode_t *
+NW_DOM_DocumentNode_createElementNode(
+ NW_DOM_DocumentNode_t *doc, NW_String_t *name)
+{
+ NW_Uint32 encoding = NW_DOM_DocumentNode_getCharacterEncoding(doc);
+ NW_String_UCS2Buff_t *ucs2Buff = NULL;
+ NW_Uint8 *uint8Buf = NULL;
+ NW_Int32 fqToken = 0;
+ NW_WBXML_Dictionary_t *dictionary = NW_DOM_DocumentNode_getDictionary(doc);
+ NW_TinyTree_t* tinyTree;
+ NW_TinyDom_Tree_t *tree;
+
+ if ((doc == NULL) || (name == NULL) || (dictionary == NULL))
+ {
+ return NULL;
+ }
+
+ ucs2Buff = NW_String_stringToUCS2Buff(name, encoding);
+ if (ucs2Buff == NULL){
+ return NULL;
+ }
+ uint8Buf = (NW_Uint8 *) CXML_Str_CvtToAscii((NW_Ucs2*) ucs2Buff);
+ NW_Mem_Free(ucs2Buff);
+ if(uint8Buf == NULL){
+ return NULL;
+ }
+ tinyTree = NW_TinyTree_Node_findTree(doc);
+ tree = NW_TinyDom_getTree(tinyTree);
+
+ fqToken = (NW_Int32) NW_WBXML_Dictionary_getTagToken(dictionary, ucs2Buff, NW_TRUE);
+ NW_Mem_Free(uint8Buf);
+ if (fqToken == -1){
+ return NW_TinyDom_createElementByName(tree, name);
+ }
+
+ return NW_TinyDom_createElementByToken(tree, (NW_Uint16)fqToken);
+}
+
+/*
+ * Returns a pointer to the created Element Node
+ */
+EXPORT_C NW_DOM_ElementNode_t *
+NW_DOM_DocumentNode_createElementNodeByToken(
+ NW_DOM_DocumentNode_t *doc, NW_Uint16 token)
+{
+ NW_TinyTree_t* tinyTree;
+ NW_TinyDom_Tree_t *tree;
+ NW_WBXML_Dictionary_t *dictionary;
+
+ dictionary = NW_DOM_DocumentNode_getDictionary(doc);
+ if ((doc == NULL) || (dictionary == NULL) || (token == 0))
+ {
+ return NULL;
+ }
+
+ tinyTree = NW_TinyTree_Node_findTree(doc);
+ tree = NW_TinyDom_getTree(tinyTree);
+
+ return NW_TinyDom_createElementByToken(tree, (NW_Uint16)token);
+}
+
+
+/*
+ * Returns a pointer to the created Text Node
+ */
+EXPORT_C NW_DOM_TextNode_t *
+NW_DOM_DocumentNode_createTextNodeWithTextItem(
+ NW_DOM_DocumentNode_t *doc, NW_DOM_TextItem_t *data)
+{
+ NW_TinyTree_t* tinyTree;
+ NW_TinyDom_Tree_t *tree;
+
+ if ((doc == NULL) || (data == NULL))
+ return NULL;
+
+ tinyTree = NW_TinyTree_Node_findTree(doc);
+ tree = NW_TinyDom_getTree(tinyTree);
+
+ return NW_TinyDom_createTextNode(tree, data);
+}
+
+/*
+ * Returns a pointer to the created Text Node
+ */
+EXPORT_C NW_DOM_TextNode_t *
+NW_DOM_DocumentNode_createTextNode(
+ NW_DOM_DocumentNode_t *doc, NW_String_t *data)
+{
+ NW_TinyTree_t* tinyTree;
+ NW_TinyDom_Tree_t *tree;
+ NW_DOM_TextItem_t item;
+
+ if (NW_DOM_TextItem_initFromString(&item, data) != NW_STAT_SUCCESS)
+ return NULL;
+
+ if ((doc == NULL) || (data == NULL))
+ return NULL;
+
+ tinyTree = NW_TinyTree_Node_findTree(doc);
+ tree = NW_TinyDom_getTree(tinyTree);
+
+ return NW_TinyDom_createTextNode(tree, &item);
+}
+
+/*
+ * Returns a pointer to the created Comment Node
+ */
+NW_DOM_CommentNode_t *
+NW_DOM_DocumentNode_createCommentNode(
+ NW_DOM_DocumentNode_t *doc, NW_String_t *data)
+{
+ NW_DOM_TextNode_t *t =
+ NW_DOM_DocumentNode_createTextNode(doc, data);
+ if (t == NULL)
+ return NULL;
+ NW_TinyTree_Node_setUserFlags(t, T_DOM_NODE_COMMENT);
+ t->flags |= T_DOM_NODE_XML;
+ return (NW_DOM_CommentNode_t *)t;
+}
+
+
+/*
+ * Returns a pointer to the created CDataSection Node
+ */
+NW_DOM_CDATASectionNode_t *
+NW_DOM_DocumentNode_createCDATASectionNode(
+ NW_DOM_DocumentNode_t *doc, NW_String_t *data)
+{
+ NW_DOM_TextNode_t *t =
+ NW_DOM_DocumentNode_createTextNode(doc, data);
+ if (t == NULL)
+ return NULL;
+ NW_TinyTree_Node_setUserFlags(t, T_DOM_NODE_CDATASECTION);
+ t->flags |= T_DOM_NODE_XML;
+ return (NW_DOM_CommentNode_t *)t;
+}
+
+
+/*
+ * Returns a pointer to the created ProcessingInstructionNode Node
+ */
+NW_DOM_ProcessingInstructionNode_t *
+NW_DOM_DocumentNode_createProcessingInstructionNodeByAttrVal(NW_DOM_DocumentNode_t* pDoc,
+ NW_String_t* pTargetString,
+ NW_DOM_AttrVal_t* pData)
+{
+ NW_TinyTree_Node_t* pPiNode;
+ NW_TinyTree_Node_t* pAttrNode;
+ NW_TinyTree_t* pTinyTree;
+ NW_TinyDom_Tree_t* pTree;
+ NW_WBXML_Dictionary_t* pDictionary;
+ NW_Uint32 encoding;
+ NW_Int32 fqToken;
+
+ if ((pDoc == NULL) || (pTargetString == NULL) || (pData == NULL)) {
+ return NULL;
+ }
+ pTinyTree = NW_TinyTree_Node_findTree(pDoc);
+ pTree = NW_TinyDom_getTree(pTinyTree);
+
+ pDictionary = NW_DOM_DocumentNode_getDictionary(pDoc);
+ if (pDictionary == NULL) {
+ return NULL;
+ }
+ encoding = NW_DOM_DocumentNode_getCharacterEncoding(pDoc);
+ fqToken = NW_WBXML_Dictionary_getAttributeToken(pDictionary,
+ pTargetString,
+ encoding,
+ NW_TRUE /* name */);
+ if (fqToken == -1)
+ {
+ pPiNode = NW_TinyTree_createNode(&(pTree->tree), 0);
+ if (pPiNode == NULL) {
+ return NULL;
+ }
+ NW_TinyTree_Node_setUserFlags(pPiNode, T_DOM_NODE_PI);
+
+ pAttrNode = NW_TinyDom_createAttributeByName(pTree,
+ pTargetString,
+ pData);
+ if (pAttrNode == NULL) {
+ (void)NW_TinyTree_deleteNode(pPiNode);
+ return NULL;
+ }
+ (void)NW_TinyTree_attachChild(pPiNode, pAttrNode);
+ return pPiNode;
+ }
+ return NW_DOM_DocumentNode_createProcessingInstructionNodeByToken(pDoc,
+ (NW_Uint16)fqToken,
+ pData);
+}
+
+/*
+ * Returns a pointer to the created ProcessingInstructionNode Node
+ */
+
+NW_DOM_ProcessingInstructionNode_t *
+NW_DOM_DocumentNode_createProcessingInstructionNodeByToken(
+ NW_DOM_DocumentNode_t *pDoc, NW_Uint16 token, NW_DOM_AttrVal_t *pData)
+{
+ NW_TinyTree_Node_t* pPiNode;
+ NW_TinyTree_Node_t* pAttrNode;
+ NW_TinyTree_t* pTinyTree;
+ NW_TinyDom_Tree_t* pTree;
+
+ if ((pDoc == NULL) || (token == 0) || (pData == NULL))
+ return NULL;
+
+ pTinyTree = NW_TinyTree_Node_findTree(pDoc);
+ pTree = NW_TinyDom_getTree(pTinyTree);
+ pPiNode = NW_TinyTree_createNode(&(pTree->tree), 0);
+ if (pPiNode == NULL) {
+ return NULL;
+ }
+ NW_TinyTree_Node_setUserFlags(pPiNode, T_DOM_NODE_PI);
+
+ pAttrNode = NW_TinyDom_createAttributeByToken(pTree,
+ (NW_Uint8)token,
+ pData);
+ if (pAttrNode == NULL) {
+ (void)NW_TinyTree_deleteNode(pPiNode);
+ return NULL;
+ }
+ (void)NW_TinyTree_attachChild(pPiNode, pAttrNode);
+ return pPiNode;
+}
+
+/*
+ * Returns a pointer to the created ProcessingInstructionNode Node
+ */
+NW_DOM_ProcessingInstructionNode_t *
+NW_DOM_DocumentNode_createProcessingInstructionNode(
+ NW_DOM_DocumentNode_t *doc, NW_String_t *target, NW_String_t *data)
+{
+ NW_DOM_AttrVal_t val;
+
+ if ((doc == NULL) || (target == 0) || (data == NULL))
+ return NULL;
+
+ NW_DOM_AttrVal_initFromString(&val, data);
+ return NW_DOM_DocumentNode_createProcessingInstructionNodeByAttrVal(doc, target, &val);
+}
+
+/*
+ * Returns a pointer to the created Document Node
+ * - NOT SUPPRTED - ask Steve
+NW_DOM_DocumentNode_t *
+NW_DOM_DocumentNode_createDocument(
+ NW_Uint8 version, NW_String_t *publicid, NW_Uint32 encoding)
+{
+ NW_WBXML_Parser_t *WBXMLParser;
+ NW_TinyDom_Parser_t *tinyParser;
+ NW_TinyDom_Tree_t *domTree;
+ NW_WBXML_Writer_t *writer;
+ NW_Status_t status;
+
+ WBXMLParser = NW_Mem_Malloc(sizeof(NW_WBXML_Parser_t));
+ tinyParser = NW_Mem_Malloc(sizeof(NW_TinyDom_Parser_t));
+ domTree = NW_Mem_Malloc(sizeof(NW_TinyDom_Tree_t));
+ writer = NW_Mem_Malloc(sizeof(NW_WBXML_Writer_t));
+
+ NW_WBXML_Parser_reset(WBXMLParser);
+ domTree->doc->version = version;
+ domTree->doc->doc_type = publicid;
+ domTree->doc->charset = encoding;
+ NW_TinyDom_Tree_construct(domTree, WBXMLParser, domTree->doc, writer);
+ NW_TinyDom_Parser_construct(tinyParser, domTree);
+ status = NW_TinyDom_Tree_create(domTree, tinyParser, domTree->doc,
+ WBXMLParser, writer, 2);
+ if (status != NW_STAT_SUCCESS)
+ return NULL;
+ return NW_TinyDom_writeDocHeader(domTree, version, publicid, encoding);
+}*/
+
+/*
+ * Create an empty dom tree, returning the document node.
+ */
+
+EXPORT_C NW_DOM_DocumentNode_t *
+NW_DOM_DocumentNode_createDocumentWithNumberPublicId(NW_TinyDom_Handle_t *h,
+ NW_Uint8 version,
+ NW_Uint32 publicid,
+ NW_Uint32 encoding,
+ NW_Bool extTNotStringTable,
+ NW_Bool enableStringTable)
+{
+ NW_Status_t status = NW_STAT_SUCCESS;
+ NW_TinyDom_Handle_Initialize(h, publicid, extTNotStringTable);
+
+ h->document.charset = encoding;
+ h->document.publicid = publicid;
+ h->document.version = version;
+
+
+ status = NW_TinyDom_Tree_create(&h->tinyDOMTree, &h->tinyParser,
+ &h->document, &h->wbxmlParser,
+ &h->writer, 4, enableStringTable);
+
+
+
+ if(status == NW_STAT_SUCCESS)
+ {
+ return h->tinyDOMTree.root_node;
+ }
+ else
+ {
+
+ return NULL;
+ }
+}
+
+
+/*
+ * One of the API for Building the DOM tree.
+ */
+
+EXPORT_C NW_DOM_DocumentNode_t*
+CXML_DOM_DocumentNode_BuildTree(NW_TinyDom_Handle_t* h,
+ NW_Byte* buffer,
+ NW_Int32 length,
+ NW_Bool encoded,
+ NW_Uint32 publicID,
+ NW_Bool extTNotStringTable,
+ NW_Status_t* errorStatus)
+{
+ *errorStatus = NW_STAT_SUCCESS;
+ if(encoded == NW_TRUE)
+ {
+ return CXML_DOM_DocumentNode_BuildWBXMLTree(h,
+ buffer,
+ length,
+ NW_FALSE,
+ extTNotStringTable,
+ errorStatus);
+ }
+
+ return CXML_DOM_DocumentNode_BuildXMLTree(h,
+ buffer,
+ length,
+ publicID,
+ extTNotStringTable,
+ errorStatus);
+
+
+}/*end CXML_DOM_DocumentNode_BuildTree()*/
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/dom/src/element.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,799 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_dom_element.h>
+#include <xml/cxml/nw_dom_attribute.h>
+#include <xml/cxml/nw_dom_document.h>
+#include <xml/cxml/nw_wbxml_dictionary.h>
+
+/*
+ * Returns
+ * NW_STAT_DOM_NODE_TYPE_ERR - if it is not an Element Node
+ * NW_STAT_OUT_OF_MEMORY
+ * NW_STAT_DOM_NO_STRING_RETURNED
+ * NW_STAT_SUCCESS
+ *
+ * MODIFIED name (of the element)
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_ElementNode_getTagName(NW_DOM_ElementNode_t *elem,
+ NW_String_t *name)
+{
+ NW_DOM_DocumentNode_t *docNode;
+ NW_Uint32 encoding;
+ NW_Status_t status;
+ NW_Uint32 token;
+ NW_TinyTree_t *tiny_tree;
+
+ NW_ASSERT(elem != NULL);
+ NW_ASSERT(name != NULL);
+
+ if (NW_DOM_Node_getNodeType(elem) != NW_DOM_ELEMENT_NODE){
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+ }
+
+ /*
+ * Following method will return name if the node is XML type
+ * or it is a literal tag
+ */
+
+ tiny_tree = NW_TinyTree_Node_findTree(elem);
+
+ status = NW_TinyDom_getTagName(NW_TinyDom_getParser(tiny_tree), elem, name);
+
+ if (status == NW_STAT_SUCCESS){
+ return NW_STAT_SUCCESS;
+ }
+ /* No string returned means that getTagName succeeded but
+ * didn't find a literal name . . .
+ */
+
+ if (status != NW_STAT_WBXML_NO_NAME){
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+
+ /* . . . so we try to get a name from dictionary */
+
+ docNode = NW_DOM_Node_getOwnerDocument(elem);
+ encoding = NW_DOM_DocumentNode_getCharacterEncoding(docNode);
+ token = NW_TinyDom_getTagToken(NW_TinyDom_getParser(tiny_tree), elem);
+ return NW_String_tokenToString(token, name, encoding);
+}
+
+/*
+ * Returns the fully qualified token for the node
+ */
+
+EXPORT_C NW_Uint16
+NW_DOM_ElementNode_getTagToken(NW_DOM_ElementNode_t *elem)
+{
+ NW_Uint16 type;
+ NW_TinyTree_t *tiny_tree;
+
+ NW_ASSERT(elem != NULL);
+
+ type = NW_TinyDom_Node_getType(elem);
+
+ if (type != NW_DOM_ELEMENT_NODE){
+ return 0;
+ }
+ tiny_tree = NW_TinyTree_Node_findTree(elem);
+
+ if (elem->token == 0)
+ {
+ elem->token =
+ (NW_Uint16)NW_TinyDom_getTagToken(NW_TinyDom_getParser(tiny_tree), elem);
+
+ /* if (NW_DOM_Node_hasChildNodes(elem)){
+ token |= NW_WBXML_FLAGS_CONTENT;
+ }
+ if (NW_DOM_ElementNode_hasAttributes(elem)){
+ token |= NW_WBXML_FLAGS_ATTRIBUTES;
+ }
+ elem->token = token;*/
+ }
+ return (NW_Uint16)(elem->token & 0xff3f);
+}
+
+
+/*
+ * Returns
+ * NW_STAT_DOM_NODE_TYPE_ERR
+ * NW_STAT_NOT_FOUND - if attribute is not found
+ * NW_STAT_DOM_NO_STRING_RETURNED
+ * NW_STAT_SUCCESS
+ *
+ * This method returns attribute value as string
+ * IN - attributeName - name of attribute
+ * MODIFIED - attributeValue
+
+Note: The passed in argument "attributeName" must be given as aligned,
+native byte order, null terminated, UCS-2. The reason is that clients
+wish to process documents in various encodings but they don't want to
+have to convert element and attribute names which are program constants
+into whatever charset the document appears in.
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_ElementNode_getAttribute(
+ NW_DOM_ElementNode_t *elem,
+ NW_String_t *attributeName,
+ NW_String_t *attributeValue)
+{
+ NW_DOM_AttributeHandle_t attributeHandle;
+ NW_Status_t status;
+
+ NW_ASSERT(elem != NULL);
+ NW_ASSERT(attributeName != NULL);
+ NW_ASSERT(attributeValue != NULL);
+
+ if ((NW_DOM_Node_getNodeType(elem) != NW_DOM_ELEMENT_NODE)
+ && (NW_DOM_Node_getNodeType(elem) != NW_DOM_PROCESSING_INSTRUCTION_NODE)) {
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+ }
+
+ status = NW_DOM_ElementNode_getAttributeHandleByName(elem,
+ attributeName,
+ &attributeHandle);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ return NW_DOM_AttributeHandle_getValue(&attributeHandle, attributeValue);
+}
+
+
+/*
+ * Returns NW_TRUE if element has attributes, otherwise NW_FALSE
+ */
+
+EXPORT_C NW_Bool
+NW_DOM_ElementNode_hasAttributes(NW_DOM_ElementNode_t *elem)
+{
+ NW_DOM_Node_t *child;
+
+ NW_ASSERT(elem != NULL);
+
+ if ((NW_DOM_Node_getNodeType(elem) != NW_DOM_ELEMENT_NODE)
+ && (NW_DOM_Node_getNodeType(elem) != NW_DOM_PROCESSING_INSTRUCTION_NODE))
+ {
+ return NW_FALSE;
+ }
+
+ child = NW_TinyTree_findFirstChild(elem);
+
+ while(child){
+ if (NW_TinyDom_Node_getType(child) == T_DOM_NODE_ATTR){
+ return NW_TRUE;
+ }
+ child = NW_TinyTree_findNextSibling(child);
+ }
+ return NW_FALSE;
+}
+
+/*
+ * Returns
+ * NW_STAT_DOM_NODE_TYPE_ERR
+ * NW_STAT_SUCCESS
+ * MODIFIED iterator
+ * WAP-adapted DOM extension
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_ElementNode_getAttributeListIterator(NW_DOM_Node_t *node,
+ NW_DOM_AttributeListIterator_t
+ *iterator)
+{
+ NW_DOM_Node_t *child;
+ NW_TinyTree_t *tiny_tree;
+
+ NW_ASSERT(node != NULL);
+ NW_ASSERT(iterator != NULL);
+
+ if ((NW_DOM_Node_getNodeType(node) != NW_DOM_ELEMENT_NODE)
+ && (NW_DOM_Node_getNodeType(node) != NW_DOM_PROCESSING_INSTRUCTION_NODE))
+ {
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+ }
+
+ tiny_tree = NW_TinyTree_Node_findTree(node);
+
+ (void) NW_DOM_AttributeListIterator_initialize(iterator);
+
+ child = NW_TinyTree_findFirstChild(node);
+ iterator->node = child;
+ if(child){
+ if (NW_TinyDom_Node_getType(child) == T_DOM_NODE_ATTR){
+ NW_TinyDom_AttrListHandle_init(&iterator->attrListHandle,
+ NW_TinyDom_getParser(tiny_tree),
+ child);
+ return NW_STAT_SUCCESS;
+ }
+ child = NW_TinyTree_findNextSibling(child);
+ while (child){
+ if (NW_TinyDom_Node_getType(child) == T_DOM_NODE_ATTR){
+ NW_TinyDom_AttrListHandle_init(&iterator->attrListHandle,
+ NW_TinyDom_getParser(tiny_tree),
+ child);
+ return NW_STAT_SUCCESS;
+ }
+ child = NW_TinyTree_findNextSibling(child);
+ }
+ }
+ return NW_STAT_NOT_FOUND;
+}
+
+/*
+ * Returns
+ * NW_STAT_DOM_NODE_TYPE_ERR
+ * NW_STAT_NOT_FOUND - if attribute is not found
+ * NW_STAT_SUCCESS
+ *
+ * IN - attributeName
+ * MODIFIED - handle
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_ElementNode_getAttributeHandleByName(NW_DOM_ElementNode_t *elem,
+ NW_String_t *attributeName,
+ NW_DOM_AttributeHandle_t
+ *attributeHandle)
+{
+ NW_Status_t nwStatus;
+ NW_Status_t status;
+ NW_DOM_AttributeListIterator_t attrListIterator;
+ NW_Bool attributeFound = NW_FALSE;
+ NW_String_t currentName;
+ NW_Uint32 docEncoding;
+ NW_Int32 charCount;
+ NW_Uint32 byteCount = 0;
+ NW_Int32 cmpResult;
+
+ NW_ASSERT(elem != NULL);
+ NW_ASSERT(attributeHandle != NULL);
+ NW_ASSERT(attributeName != NULL);
+
+ if ((NW_DOM_Node_getNodeType(elem) != NW_DOM_ELEMENT_NODE)
+ && (NW_DOM_Node_getNodeType(elem) != NW_DOM_PROCESSING_INSTRUCTION_NODE))
+ {
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+ }
+
+ if (!NW_DOM_ElementNode_hasAttributes(elem)){
+ return NW_STAT_NOT_FOUND;
+ }
+
+ /* Initialize the handle */
+ status =
+ NW_DOM_ElementNode_getAttributeListIterator(elem, &attrListIterator);
+
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ while (!attributeFound){
+ if (NW_DOM_AttributeListIterator_getNextAttribute(&attrListIterator,
+ attributeHandle)
+ == NW_STAT_WBXML_ITERATE_DONE){
+ return NW_STAT_NOT_FOUND;
+ }
+
+ status = NW_DOM_AttributeHandle_getName(attributeHandle, ¤tName);
+ if (status != NW_STAT_SUCCESS){
+ continue;
+ }
+
+ docEncoding = NW_DOM_AttributeHandle_getEncoding (attributeHandle);
+ charCount = NW_String_charBuffGetLength(currentName.storage, docEncoding,
+ &byteCount);
+ if (charCount < 0) {
+ return NW_STAT_FAILURE;
+ }
+
+ nwStatus = NW_String_CmpToNativeAlignedUCS2(docEncoding, (NW_Uint32) charCount,
+ currentName.storage,
+ (NW_Uint16*)(attributeName->storage),
+ &cmpResult);
+ NW_String_deleteStorage(¤tName);
+ if (NW_STAT_IS_FAILURE(nwStatus)){
+ continue;
+ }
+ if (cmpResult == 0){
+ attributeFound = NW_TRUE;
+ }
+ }
+
+ /* Proceed: Attribute Found */
+
+ /* If attributeHandle->node != NULL, that means that the attribute has an
+ independent node to itself, and is not a part of list node */
+
+ if (attributeHandle->node != NULL){
+ NW_Bool nextAttrWithSameNameFound = NW_FALSE;
+ NW_DOM_AttributeHandle_t h;
+ h.node = NULL;
+
+ while (!nextAttrWithSameNameFound){
+ if (NW_DOM_AttributeListIterator_getNextAttribute(&attrListIterator, &h)
+ == NW_STAT_WBXML_ITERATE_DONE){
+ break;
+ }
+ status = NW_DOM_AttributeHandle_getName(&h, ¤tName);
+ if (status != NW_STAT_SUCCESS){
+ break;
+ }
+ docEncoding = NW_DOM_AttributeHandle_getEncoding(attributeHandle);
+ charCount = NW_String_charBuffGetLength(currentName.storage, docEncoding,
+ &byteCount);
+ if (charCount < 0) {
+ return NW_STAT_FAILURE;
+ }
+ nwStatus = NW_String_CmpToNativeAlignedUCS2(docEncoding, (NW_Uint32)charCount,
+ currentName.storage,
+ (NW_Uint16*)(attributeName->storage),
+ &cmpResult);
+ NW_String_deleteStorage(¤tName);
+ if (NW_STAT_IS_FAILURE(nwStatus)){
+ continue;
+ }
+ if (cmpResult == 0){
+ nextAttrWithSameNameFound = NW_TRUE;
+ }
+ }
+
+ if (nextAttrWithSameNameFound){
+ NW_TinyDom_Parser_t *parser =
+ attrListIterator.attrListHandle.tiny_parser;
+ NW_DOM_AttributeHandle_initWithNode(attributeHandle, parser, h.node);
+ }
+ }
+
+ return NW_STAT_SUCCESS;
+}
+
+/**
+ * The following 2 methods use token to return attributes
+ */
+
+/*
+ * Returns
+ * NW_STAT_DOM_NODE_TYPE_ERR
+ * NW_STAT_NOT_FOUND - if attribute is not found
+ * NW_STAT_SUCCESS
+ *
+ * IN - token
+ * MODIFIED - handle
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_ElementNode_getAttributeHandleByToken(NW_DOM_ElementNode_t *elem,
+ NW_Uint16 token,
+ NW_DOM_AttributeHandle_t *handle)
+{
+ NW_DOM_AttributeListIterator_t attributeListIterator;
+ NW_Bool attributeFound = NW_FALSE;
+ NW_Uint16 currentToken = 0;
+ NW_Status_t status;
+ NW_TinyDom_Parser_t *parser;
+
+ NW_ASSERT(token != 0);
+ NW_ASSERT(elem != NULL);
+ NW_ASSERT(handle != NULL);
+
+ if ((NW_DOM_Node_getNodeType(elem) != NW_DOM_ELEMENT_NODE)
+ && (NW_DOM_Node_getNodeType(elem) != NW_DOM_PROCESSING_INSTRUCTION_NODE)){
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+ }
+
+ if (!NW_DOM_ElementNode_hasAttributes(elem)){
+ return NW_STAT_NOT_FOUND;
+ }
+
+ status =
+ NW_DOM_ElementNode_getAttributeListIterator(elem, &attributeListIterator);
+
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ while (!attributeFound){
+ if (NW_DOM_AttributeListIterator_getNextAttribute(&attributeListIterator,
+ handle)
+ == NW_STAT_WBXML_ITERATE_DONE){
+ return NW_STAT_NOT_FOUND;
+ }
+ currentToken = NW_DOM_AttributeHandle_getToken(handle);
+ if (currentToken == token){
+ attributeFound = NW_TRUE;
+ }
+ }
+ /* if we arrive here, attributeFound must be NW_TRUE */
+ if (handle->node != NULL)
+ {
+ NW_Bool nextAttrWithSameNameFound = NW_FALSE;
+ NW_DOM_AttributeHandle_t h;
+ h.node = NULL;
+
+ while (!nextAttrWithSameNameFound){
+ if (NW_DOM_AttributeListIterator_getNextAttribute(&attributeListIterator,
+ &h)
+ == NW_STAT_WBXML_ITERATE_DONE){
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ currentToken = NW_DOM_AttributeHandle_getToken(&h);
+ if (currentToken == token)
+ nextAttrWithSameNameFound = NW_TRUE;
+ }
+
+ parser = attributeListIterator.attrListHandle.tiny_parser;
+ NW_DOM_AttributeHandle_initWithNode(handle, parser, h.node);
+ }
+
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Returns
+ * NW_STAT_NOT_FOUND - if attribute is not found
+ * NW_STAT_DOM_NODE_TYPE_ERR
+ * NW_STAT_DOM_NO_STRING_RETURNED
+ * NW_STAT_SUCCESS
+ *
+ * This method returns attribute value as string
+ * IN - token of attribute
+ * MODIFIED - attributeValue
+ */
+
+NW_Status_t
+NW_DOM_ElementNode_getAttributeValueStringByToken(NW_DOM_ElementNode_t *elem,
+ NW_Uint16 token,
+ NW_String_t *attributeValue)
+{
+ NW_DOM_AttributeHandle_t attributeHandle;
+ NW_Status_t status;
+
+ NW_ASSERT(elem != NULL);
+ NW_ASSERT(attributeValue != NULL);
+
+ if ((NW_DOM_Node_getNodeType(elem) != NW_DOM_ELEMENT_NODE)
+ && (NW_DOM_Node_getNodeType(elem) != NW_DOM_PROCESSING_INSTRUCTION_NODE))
+ {
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+ }
+
+ status =
+ NW_DOM_ElementNode_getAttributeHandleByToken(elem,
+ token,
+ &attributeHandle);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ return NW_DOM_AttributeHandle_getValue(&attributeHandle, attributeValue);
+}
+
+/*
+ * IN - name - of element
+ */
+
+NW_Status_t
+NW_DOM_ElementNode_getElementIteratorByTagName(NW_DOM_ElementNode_t *elem,
+ NW_String_t* name,
+ NW_DOM_NodeIterator_t *handle)
+{
+ NW_DOM_DocumentNode_t *doc;
+ NW_WBXML_Dictionary_t *dict = NULL;
+ NW_String_UCS2Buff_t *buff = NULL;
+
+ NW_Uint32 encoding;
+ NW_Int16 token = 0;
+
+ NW_ASSERT(elem != NULL);
+ NW_ASSERT(name != NULL);
+ NW_ASSERT(handle != NULL);
+
+ doc = NW_DOM_Node_getOwnerDocument(elem);
+ if (doc == NULL) {
+ return NW_STAT_FAILURE;
+ }
+ encoding = NW_DOM_DocumentNode_getCharacterEncoding(doc);
+
+ dict = NW_DOM_DocumentNode_getDictionary(doc);
+ buff = NW_String_stringToUCS2Buff(name, encoding);
+ if((dict == NULL) || (buff == NULL)){
+ NW_Mem_Free(buff);
+ return NW_STAT_FAILURE;
+ }
+ token = NW_WBXML_Dictionary_getTagToken(dict, buff, NW_TRUE);
+ NW_Mem_Free(buff);
+ if (token < 0) {
+ return NW_STAT_FAILURE;
+ }
+ return NW_DOM_ElementNode_getElementIteratorByTagToken(elem,
+ (NW_Uint16)token,
+ handle);
+}
+
+/*
+ * IN - token - of element
+ */
+
+NW_Status_t
+NW_DOM_ElementNode_getElementIteratorByTagToken(NW_DOM_ElementNode_t *elem,
+ NW_Uint16 token,
+ NW_DOM_NodeIterator_t *handle)
+{
+
+ NW_ASSERT(elem != NULL);
+ NW_ASSERT(handle != NULL);
+
+ if (NW_DOM_Node_getNodeType(elem) != NW_DOM_ELEMENT_NODE)
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+
+ return NW_DOM_NodeIterator_initialize(handle, elem, token);
+}
+
+
+
+/*
+ * If the attribute with the given name exists then a its value will
+ * be changed to input value, otherwise a new attribute will be created
+ * LIMITATION: If the given attribute was already present when the document
+ * was parsed the first time, it can not be removed. In this case a new
+ * attribute is added, and you will have 2 attributes with same name
+ * Returns
+ * NW_STAT_BAD_INPUT_PARAM - If input args are NULL
+ * NW_STAT_DOM_NODE_TYPE_ERR - If it is not an element node
+ * NW_STAT_SUCCESS
+ *
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_ElementNode_setAttribute(NW_DOM_ElementNode_t *elem,
+ NW_String_t *attrName,
+ NW_String_t *val)
+{
+ NW_Status_t status;
+ NW_TinyTree_t* tiny_tree;
+ NW_TinyDom_Tree_t *tree;
+ NW_TinyTree_Node_t *attr = NULL;
+ NW_DOM_DocumentNode_t *doc = NW_DOM_Node_getOwnerDocument(elem);
+ NW_WBXML_Dictionary_t *dictionary = NW_DOM_DocumentNode_getDictionary(doc);
+ NW_Uint32 encoding = NW_DOM_DocumentNode_getCharacterEncoding(doc);
+ NW_Int32 fqToken;
+ NW_DOM_AttrVal_t attrValue;
+
+ if ((elem == NULL) || (attrName == NULL) ||
+ (val == NULL) || (dictionary == NULL)){
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ if (NW_DOM_Node_getNodeType(elem) != NW_DOM_ELEMENT_NODE)
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+
+ status = NW_DOM_ElementNode_removeAttribute(elem, attrName);
+ if ((status != NW_STAT_SUCCESS) && (status != NW_STAT_NOT_FOUND)) {
+ return status;
+ }
+
+ tiny_tree = NW_TinyTree_Node_findTree(elem);
+ tree = NW_TinyDom_getTree(tiny_tree);
+
+ fqToken = NW_WBXML_Dictionary_getAttributeToken(dictionary, attrName, encoding, NW_TRUE);
+
+ status = NW_DOM_AttrVal_initFromString(&attrValue, val);
+ if (fqToken == -1)
+ attr = NW_TinyDom_createAttributeByName(tree, attrName, &attrValue);
+ else
+ attr = NW_TinyDom_createAttributeByToken(tree, (NW_Uint8)fqToken, &attrValue);
+
+ return NW_DOM_Node_appendChild(elem, attr);
+}
+
+/**
+ * Removes given attribute
+ * Limited Use: You can only remove attributes that you
+ * explicitly created and added to the element. None of the
+ * attributes in the originally parsed document can not be removed
+ * Returns
+ * NW_STAT_BAD_INPUT_PARAM - If input args are NULL
+ * NW_STAT_DOM_NODE_TYPE_ERR - If it is not an element node
+ * NW_STAT_NOT_FOUND - if attribute is not found
+ * NW_STAT_SUCCESS
+ **/
+EXPORT_C NW_Status_t
+NW_DOM_ElementNode_removeAttribute(
+ NW_DOM_ElementNode_t *elem, NW_String_t* attributeName)
+{
+ NW_DOM_AttributeHandle_t attrHandle;
+ NW_Status_t status;
+
+ if ((elem == NULL) || (attributeName == NULL))
+ return NW_STAT_BAD_INPUT_PARAM;
+
+ if (NW_DOM_Node_getNodeType(elem) != NW_DOM_ELEMENT_NODE)
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+
+ status = NW_DOM_ElementNode_getAttributeHandleByName(elem, attributeName, &attrHandle);
+ if (status != NW_STAT_SUCCESS)
+ return status;
+
+ /*
+ * If the attribute was a newly added one it is deleted,
+ * but SUCCESS is returned in both cases
+ */
+ if (attrHandle.node != NULL)
+ NW_TinyTree_deleteNode(attrHandle.node);
+
+ return NW_STAT_SUCCESS;
+}
+
+
+
+/*
+ * If the attribute with the given name exists then its value will
+ * be changed to input value, otherwise a new attribute will be created
+ * LIMITATION: If the given attribute was already present when the document
+ * was parsed the first time, it can not be removed. In this case a new
+ * attribute is added, and you will have 2 attributes with same name
+ * Returns
+ * NW_STAT_BAD_INPUT_PARAM - If input args are NULL
+ * NW_STAT_NOT_FOUND - if attribute is not found
+ * NW_STAT_DOM_NODE_TYPE_ERR - If it is not an element node
+ * NW_STAT_SUCCESS
+ *
+ */
+EXPORT_C NW_Status_t
+NW_DOM_ElementNode_setAttributeByToken(
+ NW_DOM_ElementNode_t *elem, NW_Uint16 token, NW_DOM_AttrVal_t *attrValue)
+{
+ NW_Status_t status;
+ NW_TinyTree_t* tinyTree;
+ NW_TinyDom_Tree_t *tree;
+ NW_TinyTree_Node_t *attr = NULL;
+ NW_DOM_DocumentNode_t *doc = NW_DOM_Node_getOwnerDocument(elem);
+ NW_WBXML_Dictionary_t *dictionary = NW_DOM_DocumentNode_getDictionary(doc);
+
+ if ((elem == NULL) || (attrValue == NULL) || (dictionary == NULL)){
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ if (NW_DOM_Node_getNodeType(elem) != NW_DOM_ELEMENT_NODE) {
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+ }
+
+ tinyTree = NW_TinyTree_Node_findTree(elem);
+ tree = NW_TinyDom_getTree(tinyTree);
+
+ status = NW_DOM_ElementNode_removeAttributeByToken(elem, token);
+ if ((status == NW_STAT_SUCCESS) || (status == NW_STAT_NOT_FOUND)) {
+ attr = NW_TinyDom_createAttributeByToken(tree, (NW_Uint8)token, attrValue);
+ return NW_DOM_Node_appendChild(elem, attr);
+ }
+ return status;
+}
+
+/**
+ * If the attribute with the given name exists then a its value will
+ * be changed to input value, otherwise a new attribute will be created
+ * LIMITATION: If the given attribute was already present when the document
+ * was parsed the first time, it can not be removed. In this case a new
+ * attribute is added, and you will have 2 attributes with same name
+ * Returns
+ * NW_STAT_BAD_INPUT_PARAM - If input args are NULL
+ * NW_STAT_DOM_NODE_TYPE_ERR - If it is not an element node
+ * NW_STAT_SUCCESS
+ *
+ */
+EXPORT_C NW_Status_t
+NW_DOM_ElementNode_setAttributeByAttrVal(
+ NW_DOM_ElementNode_t *elem,
+ NW_String_t *attrName,
+ NW_DOM_AttrVal_t *attrValue)
+{
+ NW_Status_t status;
+ NW_TinyTree_t* tinyTree;
+ NW_TinyDom_Tree_t *tree;
+ NW_TinyTree_Node_t *attr = NULL;
+ NW_DOM_DocumentNode_t *doc = NW_DOM_Node_getOwnerDocument(elem);
+ NW_WBXML_Dictionary_t *dictionary = NW_DOM_DocumentNode_getDictionary(doc);
+ NW_Uint32 encoding = NW_DOM_DocumentNode_getCharacterEncoding(doc);
+ NW_Int32 fqToken;
+
+ if ((elem == NULL) || (attrName == NULL) ||
+ (attrValue == NULL) || (dictionary == NULL)){
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ if (NW_DOM_Node_getNodeType(elem) != NW_DOM_ELEMENT_NODE)
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+
+ status = NW_DOM_ElementNode_removeAttribute(elem, attrName);
+ if ((status != NW_STAT_SUCCESS) && (status != NW_STAT_NOT_FOUND)) {
+ return status;
+ }
+ tinyTree = NW_TinyTree_Node_findTree(elem);
+ tree = NW_TinyDom_getTree(tinyTree);
+
+ fqToken = NW_WBXML_Dictionary_getAttributeToken(dictionary, attrName, encoding, NW_TRUE);
+ if (fqToken == -1){
+ attr = NW_TinyDom_createAttributeByName(tree, attrName, attrValue);
+ } else {
+ attr = NW_TinyDom_createAttributeByToken(tree, (NW_Uint8)fqToken, attrValue);
+ }
+ return NW_DOM_Node_appendChild(elem, attr);
+}
+
+EXPORT_C NW_Status_t
+NW_DOM_ElementNode_setAttributeByAttributeHandle(NW_DOM_ElementNode_t* elem,
+ NW_DOM_AttributeHandle_t* handle)
+{
+ if ((elem == NULL)
+ || (handle == NULL)) {
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+ if (NW_DOM_Node_getNodeType(elem) != NW_DOM_ELEMENT_NODE) {
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+ }
+ if (handle->node == NULL) {
+ return NW_STAT_FAILURE;
+ }
+ return NW_DOM_Node_appendChild(elem, handle->node);
+}
+
+/**
+ * Removes given attribute
+ * Limited Use: You can only remove attributes that you
+ * explicitly created and added to the element. None of the
+ * attributes in the originally parsed document can not be removed
+ * Returns
+ * NW_STAT_BAD_INPUT_PARAM - If input args are NULL
+ * NW_STAT_NOT_FOUND - if attribute is not found
+ * NW_STAT_DOM_NODE_TYPE_ERR - If it is not an element node
+ * NW_STAT_SUCCESS
+ */
+NW_Status_t
+NW_DOM_ElementNode_removeAttributeByToken(
+ NW_DOM_ElementNode_t *elem, NW_Uint16 attributeToken)
+{
+ NW_DOM_AttributeHandle_t attrHandle;
+ NW_Status_t status;
+
+ if ((elem == NULL) || (attributeToken == 0))
+ return NW_STAT_BAD_INPUT_PARAM;
+
+ if (NW_DOM_Node_getNodeType(elem) != NW_DOM_ELEMENT_NODE)
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+
+ status = NW_DOM_ElementNode_getAttributeHandleByToken(elem, attributeToken, &attrHandle);
+ if ((status != NW_STAT_SUCCESS))
+ return status;
+
+ /*
+ * If the attribute was a newly added one it is deleted,
+ * but SUCCESS is returned in both cases
+ */
+ if (attrHandle.node != NULL)
+ NW_TinyTree_deleteNode(attrHandle.node);
+
+ return NW_STAT_SUCCESS;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/dom/src/node.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,538 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_dom_node.h>
+#include <xml/cxml/nw_dom_document.h>
+#include <xml/cxml/nw_dom_element.h>
+
+/**
+ * GENERAL NODE METHODS - applicable to all node types
+ * These methods will be repeated for other Node types also
+ **/
+
+/*
+ * RETURN
+ * NW_STAT_SUCCESS
+ * NW_STAT_OUT_OF_MEMORY - If memory could not be allocated for storage
+ * NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED - If encoding is not valid
+ * NW_STAT_DOM_NODE_TYPE_ERR - If node type is not a standard node type
+ * NW_STAT_DOM_NO_STRING_RETURNED - If the storage was not assigned to NW_DOM_String
+ *
+ * MODIFIED nodeName
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_Node_getNodeName(NW_DOM_Node_t *node, NW_String_t *nodeName)
+{
+ NW_Uint16 type;
+ NW_String_UCS2Buff_t *name = NULL;
+ NW_DOM_DocumentNode_t *docNode;
+ NW_Uint32 encoding;
+
+ NW_ASSERT(node != NULL);
+ NW_ASSERT(nodeName != NULL);
+
+ type = NW_DOM_Node_getNodeType(node);
+ if (type == 0){
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+ }
+
+ switch (type) {
+ case NW_DOM_ELEMENT_NODE:
+ return NW_DOM_ElementNode_getTagName(node, nodeName);
+
+ case NW_DOM_PROCESSING_INSTRUCTION_NODE:/* Not supported */
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+
+ case NW_DOM_TEXT_NODE:
+ name = (NW_String_UCS2Buff_t *) L"#text";
+ break;
+
+ case NW_DOM_DOCUMENT_NODE:
+ name = (NW_String_UCS2Buff_t *) L"#document";
+ break;
+
+ case NW_DOM_COMMENT_NODE:
+ name = (NW_String_UCS2Buff_t *) L"#comment";
+ break;
+
+ case NW_DOM_CDATA_SECTION_NODE:
+ name = (NW_String_UCS2Buff_t *) L"#cdata-section";
+ break;
+ default:
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+
+ docNode = NW_DOM_Node_getOwnerDocument(node);
+ if (docNode == NULL) {
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ encoding = NW_DOM_DocumentNode_getCharacterEncoding(docNode);
+ return NW_String_UCS2BuffToString(name, nodeName, encoding);
+ }
+
+/*
+ * returns NW_DOM_NodeType
+ * Returns 0 if Node type is not one of the recognized nodes
+ */
+
+EXPORT_C NW_Uint16
+NW_DOM_Node_getNodeType(NW_DOM_Node_t *node)
+{
+ NW_Uint16 type;
+
+ NW_ASSERT(node != NULL);
+
+ type = (NW_Uint16)(NW_TinyDom_Node_getType(node) & 0x0f);
+
+ switch(type) {
+
+ case T_DOM_NODE_DOC:
+ return NW_DOM_DOCUMENT_NODE;
+
+ case T_DOM_NODE_TAG:
+ return NW_DOM_ELEMENT_NODE;
+
+ case T_DOM_NODE_TEXT:
+ return NW_DOM_TEXT_NODE;
+
+ case T_DOM_NODE_PI:
+ return NW_DOM_PROCESSING_INSTRUCTION_NODE;
+
+ case T_DOM_NODE_COMMENT:
+ return NW_DOM_COMMENT_NODE;
+
+ case T_DOM_NODE_CDATASECTION:
+ return NW_DOM_CDATA_SECTION_NODE;
+
+ default:
+ return 0;
+}
+}
+
+/*
+ * Returns fully qualified node token (including dictionary id)
+ * Returns 0 for invalid node
+ */
+EXPORT_C NW_Uint16
+NW_DOM_Node_getNodeToken(NW_DOM_Node_t *node)
+{
+
+ NW_ASSERT(node != NULL);
+
+ if (NW_DOM_Node_getNodeType(node) == NW_DOM_ELEMENT_NODE){
+ return NW_DOM_ElementNode_getTagToken(node);
+ }
+ return 0;
+}
+
+/*
+ * Returns NW_TRUE if the document is of WBXML type
+ * otherwise returns NW_FALSE
+ */
+
+NW_Bool
+NW_DOM_Node_isWBXML(NW_DOM_Node_t *node)
+{
+ NW_Uint16 type;
+
+ NW_ASSERT(node != NULL);
+
+ type = (NW_Uint16)(NW_TinyDom_Node_getType(node) & 0x8000);
+
+ if (type == T_DOM_NODE_XML){
+ return NW_FALSE;
+ }
+ return NW_TRUE;
+}
+
+/*
+ * Finds parent node of the given node
+ * returns NULL for DOCUMENT_NODE
+ */
+
+EXPORT_C NW_DOM_Node_t *
+NW_DOM_Node_getParentNode(NW_DOM_Node_t *node)
+{
+ NW_ASSERT (node != NULL);
+
+ if (NW_DOM_Node_getNodeType(node) == NW_DOM_DOCUMENT_NODE)
+ return NULL;
+
+ return NW_TinyTree_findParent(node);
+}
+
+/*
+ * Following 3 methods return valid values only
+ * for ELEMENT_NODE and DOCUMENT_NODE, since these are the
+ * only nodes that have children. For other nodes, the value is
+ * either NULL or 0
+ */
+
+EXPORT_C NW_DOM_Node_t *
+NW_DOM_Node_getFirstChild(NW_DOM_Node_t *node)
+{
+ NW_DOM_Node_t *child;
+
+ NW_ASSERT(node != NULL);
+
+ child = NW_TinyTree_findFirstChild(node);
+
+ if(child)
+ {
+ if(NW_TinyDom_Node_getType(child) == T_DOM_NODE_ATTR)
+ return NW_DOM_Node_getNextSibling(child);
+ else
+ return child;
+ }
+ return NULL;
+}
+
+EXPORT_C NW_DOM_Node_t *
+NW_DOM_Node_getLastChild(NW_DOM_Node_t *node)
+{
+ NW_DOM_Node_t *currentNode = NULL;
+ NW_DOM_Node_t *previousNode = NULL;
+
+ NW_ASSERT(node != NULL);
+
+ currentNode = NW_DOM_Node_getFirstChild(node);
+ while (currentNode != NULL)
+ {
+ previousNode = currentNode;
+ currentNode = NW_DOM_Node_getNextSibling(currentNode);
+ }
+ return previousNode;
+}
+
+EXPORT_C NW_Bool
+NW_DOM_Node_hasChildNodes(NW_DOM_Node_t *node)
+{
+
+ NW_ASSERT(node != NULL);
+
+ if (NW_DOM_Node_getFirstChild(node))
+ return NW_TRUE;
+ return NW_FALSE;
+}
+
+EXPORT_C NW_DOM_Node_t *
+NW_DOM_Node_getNextSibling(NW_DOM_Node_t *node)
+{
+ NW_DOM_Node_t *sibling;
+
+ NW_ASSERT(node != NULL);
+
+ sibling = NW_TinyTree_findNextSibling(node);
+
+ if (sibling == NULL){
+ return NULL;
+ }
+
+ while ((sibling != NULL) && (NW_TinyDom_Node_getType(sibling) == T_DOM_NODE_ATTR)){
+ sibling = NW_TinyTree_findNextSibling(sibling);
+ }
+ return sibling;
+}
+
+EXPORT_C NW_DOM_Node_t *
+NW_DOM_Node_getPreviousSibling(NW_DOM_Node_t *node)
+{
+ NW_DOM_Node_t *sibling;
+ NW_ASSERT(node != NULL);
+
+ sibling = NW_TinyTree_findPreviousSibling(node);
+
+ if (sibling == NULL)
+ return NULL;
+
+ while ((sibling != NULL) && (NW_TinyDom_Node_getType(sibling) == T_DOM_NODE_ATTR)){
+ sibling = NW_TinyTree_findPreviousSibling(sibling);
+ }
+
+ return sibling;
+}
+
+EXPORT_C NW_DOM_DocumentNode_t *
+NW_DOM_Node_getOwnerDocument(NW_DOM_Node_t *node)
+{
+ NW_TinyTree_t *tiny_tree;
+
+ NW_ASSERT(node != NULL);
+
+ if (NW_DOM_Node_getNodeType(node) == NW_DOM_DOCUMENT_NODE){
+ return node;
+ }
+
+ tiny_tree = NW_TinyTree_Node_findTree(node);
+
+ return NW_TinyTree_getRoot(tiny_tree);
+}
+
+/*********************
+ * NODE LIST ITERATOR
+ **********************/
+
+/*
+ * Returns NULL if unable to allocate memory
+ */
+
+NW_DOM_NodeIterator_t *
+NW_DOM_NodeIterator_new(void)
+{
+ return (NW_DOM_NodeIterator_t *) NW_Mem_Malloc(sizeof (NW_DOM_NodeIterator_t));
+}
+
+/*
+ * Initializes the Node handle which uses the given node
+ * as the starting point to iterate down the tree
+ * Returns NW_STAT_SUCCESS
+ * NW_STAT_BAD_INPUT_PARAM
+ */
+
+NW_Status_t
+NW_DOM_NodeIterator_initialize(NW_DOM_NodeIterator_t *handle,
+ NW_DOM_Node_t *node,
+ NW_Uint16 token)
+{
+ NW_ASSERT (handle != NULL);
+ NW_ASSERT (node != NULL);
+
+ NW_TinyTree_NodeIterator_init(node, &handle->nodeIter);
+ handle->token = token;
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Deletes the handle
+ * Returns NW_STAT_SUCCESS
+ */
+
+NW_Status_t
+NW_DOM_NodeIterator_delete(NW_DOM_NodeIterator_t *handle)
+{
+
+ NW_ASSERT(handle != NULL);
+
+ NW_Mem_Free (handle);
+
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Returns the next node
+ */
+
+NW_DOM_Node_t *
+NW_DOM_NodeIterator_nextNode(NW_DOM_NodeIterator_t *handle)
+{
+ NW_DOM_Node_t* node = NULL;
+ NW_Uint16 token = 0;
+
+ NW_ASSERT(handle != NULL);
+
+ do {
+
+ node = NW_TinyTree_NodeIterator_iterate(&handle->nodeIter);
+
+ if (node == NULL){
+ return NULL;
+ }
+
+ token = NW_DOM_Node_getNodeToken(node);
+
+ } while (token != handle->token);
+
+ return node;
+}
+
+
+
+/**
+ * Inserts newChild before the refChild
+ * Returns one of:
+ * NW_STAT_BAD_INPUT_PARAM
+ * NW_STAT_SUCCESS
+ * NW_STAT_NOT_FOUND - If reChild is not a child of given node
+ * NW_STAT_DOM_WRONG_DOC_ERR - If newChild was created from a
+ * different document than the one that created the node
+ * NW_STAT_DOM_HEIRARCHY_REQ_ERR - If node is of the type that
+ * does not allow children of the type of newChild node
+ */
+EXPORT_C NW_Status_t
+NW_DOM_Node_insertBefore(
+ NW_DOM_Node_t *node,
+ NW_DOM_Node_t *newChild,
+ NW_DOM_Node_t *refChild)
+{
+ NW_TinyTree_Node_t *child = NULL;
+ NW_DOM_DocumentNode_t *doc = NULL;
+ NW_DOM_DocumentNode_t *newDoc = NULL;
+
+ if ((node == NULL) || (newChild == NULL) || (refChild == NULL))
+ return NW_STAT_BAD_INPUT_PARAM;
+
+ doc = NW_DOM_Node_getOwnerDocument(node);
+ newDoc = NW_DOM_Node_getOwnerDocument(newChild);
+
+ if ((doc == NULL) || (newDoc == NULL))
+ return NW_STAT_BAD_INPUT_PARAM;
+
+ if (doc != newDoc)
+ return NW_STAT_DOM_WRONG_DOC_ERR;
+
+ /* Only Element and Document nodes can have children */
+ if ((NW_DOM_Node_getNodeType(node) != NW_DOM_ELEMENT_NODE) &&
+ (NW_DOM_Node_getNodeType(node) != NW_DOM_DOCUMENT_NODE)) {
+ return NW_STAT_DOM_HEIRARCHY_REQUEST_ERR;
+ }
+
+ child = NW_DOM_Node_getFirstChild (node);
+ while (child)
+ {
+ if (child == refChild)
+ {
+ NW_TinyTree_attachBefore(child, newChild);
+ return NW_STAT_SUCCESS;
+ }
+ child = NW_DOM_Node_getNextSibling(child);
+ }
+ /* The refChild is not a child of node */
+ return NW_STAT_NOT_FOUND;
+}
+
+/**
+ * Replaces oldChild with the newChild and removes old child
+ * Returns one of:
+ * NW_STAT_BAD_INPUT_PARAM
+ * NW_STAT_SUCCESS
+ * NW_STAT_NOT_FOUND - If oldChild is not a child of given node
+ * NW_STAT_DOM_WRONG_DOC_ERR - If newChild was created from a
+ * different document than the one that created the node
+ * NW_STAT_DOM_HEIRARCHY_REQ_ERR - If node is of the type that
+ * does not allow children of the type of newChild node
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_Node_replaceChild(NW_DOM_Node_t *node, NW_DOM_Node_t *newChild, NW_DOM_Node_t *oldChild)
+{
+ NW_TinyTree_Node_t *child = NULL;
+ NW_DOM_DocumentNode_t *doc = NULL;
+ NW_DOM_DocumentNode_t *newDoc = NULL;
+
+ if ((node == NULL) || (oldChild == NULL) || (newChild == NULL))
+ return NW_STAT_BAD_INPUT_PARAM;
+
+ doc = NW_DOM_Node_getOwnerDocument(node);
+ newDoc = NW_DOM_Node_getOwnerDocument(newChild);
+
+ if ((doc == NULL) || (newDoc == NULL))
+ return NW_STAT_BAD_INPUT_PARAM;
+
+ if (doc != newDoc)
+ return NW_STAT_DOM_WRONG_DOC_ERR;
+
+ /* Only Element and Document nodes can have children */
+ if ((NW_DOM_Node_getNodeType(node) != NW_DOM_ELEMENT_NODE) &&
+ (NW_DOM_Node_getNodeType(node) != NW_DOM_DOCUMENT_NODE)) {
+ return NW_STAT_DOM_HEIRARCHY_REQUEST_ERR;
+ }
+
+ child = NW_DOM_Node_getFirstChild (node);
+ while (child)
+ {
+ if (child == oldChild)
+ {
+ NW_TinyTree_attachBefore(oldChild, newChild);
+ return NW_DOM_Node_removeChild(node, oldChild);
+ }
+ child = NW_DOM_Node_getNextSibling(child);
+ }
+ /* The refChild is not a child of node */
+ return NW_STAT_NOT_FOUND;
+}
+
+/*
+ * Removes the oldChild
+ * Returns one of:
+ * NW_STAT_BAD_INPUT_PARAM
+ * NW_STAT_SUCCESS
+ * NW_STAT_NOT_FOUND - If oldChild is not a child of given node
+ */
+EXPORT_C NW_Status_t
+NW_DOM_Node_removeChild(NW_DOM_Node_t *node, NW_DOM_Node_t *oldChild)
+{
+ NW_TinyTree_Node_t *child = NULL;
+
+ if ((node == NULL) || (oldChild == NULL))
+ return NW_STAT_BAD_INPUT_PARAM;
+
+ child = NW_DOM_Node_getFirstChild (node);
+ while (child)
+ {
+ if (child == oldChild)
+ {
+ NW_TinyTree_deleteNode(oldChild);
+ return NW_STAT_SUCCESS;
+ }
+ child = NW_DOM_Node_getNextSibling(child);
+ }
+
+ /* The refChild is not a child of node */
+ return NW_STAT_NOT_FOUND;
+}
+
+/*
+ * Appends a new child
+ * Returns one of:
+ * NW_STAT_BAD_INPUT_PARAM
+ * NW_STAT_SUCCESS
+ * NW_STAT_DOM_WRONG_DOC_ERR - If newChild was created from a
+ * different document than the one that created the node
+ * NW_STAT_DOM_HEIRARCHY_REQ_ERR - If node is of the type that
+ * does not allow children of the type of newChild node
+ */
+EXPORT_C NW_Status_t
+NW_DOM_Node_appendChild(NW_DOM_Node_t *node, NW_DOM_Node_t *newChild)
+{
+ NW_DOM_DocumentNode_t *doc = NULL;
+ NW_DOM_DocumentNode_t *newDoc = NULL;
+
+ if (( node == NULL) || (newChild == NULL))
+ return NW_STAT_BAD_INPUT_PARAM;
+
+ doc = NW_DOM_Node_getOwnerDocument(node);
+ newDoc = NW_DOM_Node_getOwnerDocument(newChild);
+
+ if ((doc == NULL) || (newDoc == NULL))
+ return NW_STAT_BAD_INPUT_PARAM;
+
+ if (doc != newDoc)
+ return NW_STAT_DOM_WRONG_DOC_ERR;
+
+ /* Only Element and Document nodes can have children */
+ if ((NW_DOM_Node_getNodeType(node) != NW_DOM_ELEMENT_NODE) &&
+ (NW_DOM_Node_getNodeType(node) != NW_DOM_DOCUMENT_NODE)) {
+ return NW_STAT_DOM_HEIRARCHY_REQUEST_ERR;
+ }
+
+ return(NW_TinyTree_attachChild(node, newChild));
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/dom/src/text.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,646 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_tinytree.h>
+#include <xml/cxml/nw_dom_text.h>
+#include <xml/cxml/nw_dom_document.h>
+
+/*
+ * Returns
+ * NW_STAT_DOM_NODE_TYPE_ERR - not a text node
+ * NW_STAT_SUCCESS
+ *
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_TextNode_getTextItemIterator(NW_DOM_TextNode_t *node,
+ NW_DOM_TextItemIterator_t *iterator)
+{
+ NW_TinyTree_t *tiny_tree;
+
+ NW_ASSERT(node != NULL);
+ NW_ASSERT(iterator != NULL);
+
+ if ((NW_DOM_Node_getNodeType(node) != NW_DOM_TEXT_NODE)
+ && (NW_DOM_Node_getNodeType(node) != NW_DOM_COMMENT_NODE)
+ && (NW_DOM_Node_getNodeType(node) != NW_DOM_CDATA_SECTION_NODE)) {
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+ }
+
+ tiny_tree = NW_TinyTree_Node_findTree(node);
+ NW_TinyDom_TextHandle_init(iterator,
+ NW_TinyDom_getParser(tiny_tree),
+ NW_TinyTree_Node_getSourceOffset(node));
+
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Returns
+ * NW_STAT_DOM_NODE_TYPE_ERR - not a text node
+ * NW_STAT_OUT_OF_MEMORY - unable to allocate memory for string storage
+ * NW_STAT_DOM_NO_STRING_RETURNED - If string storage is not assigned
+ * NW_STAT_SUCCESS
+ *
+ * MODIFIED valueString - the value of the node
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_TextNode_getData(NW_DOM_TextNode_t *node,
+ NW_String_t *valueString)
+{
+ NW_Status_t status;
+ NW_DOM_TextItemIterator_t iterator;
+ NW_String_t str;
+ NW_DOM_TextItem_t item;
+ NW_DOM_DocumentNode_t *docNode;
+ NW_Uint32 encoding;
+
+ NW_ASSERT(node != NULL);
+ NW_ASSERT(valueString != NULL);
+
+ docNode = NW_DOM_Node_getOwnerDocument(node);
+ encoding = NW_DOM_DocumentNode_getCharacterEncoding(docNode);
+
+ if (NW_DOM_Node_getNodeType(node) != NW_DOM_TEXT_NODE){
+ return NW_STAT_DOM_NODE_TYPE_ERR;
+ }
+
+ /* Initializes the handle with values*/
+
+ status = NW_DOM_TextNode_getTextItemIterator(node, &iterator);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ valueString->length = 0;
+ valueString->storage = NULL;
+ NW_String_setUserOwnsStorage(valueString);
+
+ while (NW_DOM_TextItemIterator_getNextTextItem(&iterator, &item)
+ == NW_STAT_WBXML_ITERATE_MORE){
+
+ status = NW_DOM_TextItem_toString(&item, &str, encoding);
+
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ if ((valueString->length == 0) || (valueString->storage == NULL)){
+ status = NW_String_deepCopy(valueString, &str);
+ }
+ else{
+ status = NW_String_concatenate(valueString, &str, encoding);
+ }
+
+ if (status != NW_STAT_SUCCESS){
+ NW_String_deleteStorage(&str);
+ if (status == NW_STAT_OUT_OF_MEMORY)
+ {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+ else
+ {
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ }
+ }
+
+ NW_String_deleteStorage(&str);
+ return NW_STAT_SUCCESS;
+}
+
+
+/*
+ * This method creates a new TextNode and replaces the previous one
+ * Returns NW_STAT_BAD_INPUT_PARAM
+ * NW_STAT_SUCCESS
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_TextNode_setDataFromTextItem(NW_DOM_TextNode_t** node,
+ NW_DOM_TextItem_t *val)
+{
+ NW_DOM_Node_t *parent = NW_DOM_Node_getParentNode(*node);
+ NW_DOM_DocumentNode_t *doc = NW_DOM_Node_getOwnerDocument(*node);
+ NW_DOM_TextNode_t *newNode = NULL;
+ NW_Status_t status;
+
+ if ((node == NULL) || (val == NULL) || (parent == NULL) || (doc == NULL))
+ return NW_STAT_BAD_INPUT_PARAM;
+
+ newNode = NW_DOM_DocumentNode_createTextNodeWithTextItem(doc, val);
+ if (newNode == NULL)
+ return NW_STAT_BAD_INPUT_PARAM;
+
+ status = NW_DOM_Node_replaceChild(parent, newNode, *node);
+ if (status != NW_STAT_SUCCESS)
+ return status;
+ *node = newNode;
+ return NW_STAT_SUCCESS;
+}
+
+
+EXPORT_C NW_Status_t
+NW_DOM_TextNode_addDataFromTextItem(NW_DOM_TextNode_t* node,
+ NW_DOM_TextItem_t *val)
+{
+ NW_TinyTree_t* tinyTree;
+ NW_TinyDom_Tree_t* domTree;
+ NW_DOM_DocumentNode_t *docNode;
+ NW_Uint32 encoding;
+
+ if ((node == NULL) || (val == NULL))
+ return NW_STAT_BAD_INPUT_PARAM;
+
+ tinyTree = NW_TinyTree_Node_findTree(node);
+ docNode = NW_DOM_Node_getOwnerDocument(node);
+ if ((tinyTree == NULL) || (docNode == NULL)) {
+ return NW_STAT_FAILURE;
+ }
+ domTree = NW_TinyDom_getTree(tinyTree);
+ if (domTree == NULL) {
+ return NW_STAT_FAILURE;
+ }
+ encoding = NW_DOM_DocumentNode_getCharacterEncoding(docNode);
+
+ return NW_TinyDom_addDataFromTextItem(tinyTree, domTree, node,
+ val, encoding);
+}
+
+/*
+ * This method creates a new TextNode and replaces the previous one
+ * Returns
+ * Returns NW_STAT_BAD_INPUT_PARAM
+ * NW_STAT_SUCCESS
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_TextNode_setData(NW_DOM_TextNode_t** node, NW_String_t *val)
+{
+ NW_DOM_Node_t *parent = NW_DOM_Node_getParentNode(*node);
+ NW_DOM_DocumentNode_t *doc = NW_DOM_Node_getOwnerDocument(*node);
+ NW_DOM_TextNode_t *newNode = NULL;
+ NW_Status_t status;
+
+ if ((node == NULL) || (val == NULL) || (parent == NULL) || (doc == NULL))
+ return NW_STAT_BAD_INPUT_PARAM;
+
+ newNode = NW_DOM_DocumentNode_createTextNode(doc, val);
+
+ if (newNode == NULL){
+ /* TBD is this correct? maybe it is out-of-memory? */
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+ /* TBD replaceChild is buggy because it may return the child as the status! */
+ status = NW_DOM_Node_replaceChild(parent, newNode, *node);
+
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ /* TBD isn't there a memory leak when the old child is not deleted? */
+
+ *node = newNode;
+ return NW_STAT_SUCCESS;
+}
+
+
+/**
+ * TextItem methods
+ **/
+
+
+NW_DOM_TextItem_t *
+NW_DOM_TextItem_new(void)
+{
+ return (NW_DOM_TextItem_t *) NW_Mem_Malloc(sizeof (NW_DOM_TextItem_t));
+}
+
+/*
+ * Initializes a Text Item of type NW_DOM_TEXT_ITEM_STRING
+ * Returns NW_STAT_SUCCESS
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_TextItem_initFromString (NW_DOM_TextItem_t *item,
+ NW_String_t * string)
+{
+ NW_ASSERT(item != NULL);
+ NW_ASSERT(string != NULL);
+
+ item->type = NW_WBXML_ATTR_COMPONENT_STRING;
+ item->component.string = *string;
+ return NW_STAT_SUCCESS;
+}
+
+/**
+ * Initializes a Text Item of type NW_DOM_TEXT_ITEM_ENTITY
+ * Returns NW_STAT_SUCCESS
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_TextItem_initFromEntity (NW_DOM_TextItem_t *item, NW_Uint32 entity)
+{
+
+ NW_ASSERT(item != NULL);
+
+ item->type = NW_WBXML_ATTR_COMPONENT_ENTITY;
+ item->component.entity = entity;
+ return NW_STAT_SUCCESS;
+}
+
+
+/*
+ Initializes a Text Item of type NW_DOM_TEXT_ITEM_EXTENSION
+ Returns NW_STAT_SUCCESS or NW_STAT_FAILURE if args are not valid.
+
+ Makes a shallow copy of str.
+ */
+EXPORT_C NW_Status_t
+NW_DOM_TextItem_initFromExtension (NW_DOM_TextItem_t *item,
+ NW_Uint16 token,
+ NW_String_t *str)
+{
+ /* Text items and AttrVals are nearly the same thing. */
+ return NW_DOM_AttrVal_initFromExtension(item, token, str);
+}
+
+/*
+ Initializes a Text Item of type NW_DOM_TEXT_ITEM_EXTENSION for the
+ particular case of EXT_T_[0,1,2] where the associated integer value
+ is not a reference into the string table.
+
+ Returns NW_STAT_SUCCESS or NW_STAT_FAILURE if args are not valid.
+*/
+EXPORT_C NW_Status_t
+NW_DOM_TextItem_initFromExtensionInt (NW_DOM_TextItem_t *item,
+ NW_Uint16 token,
+ NW_Uint32 x)
+{
+ /* Text items and AttrVals are nearly the same thing. */
+ return NW_DOM_AttrVal_initFromExtensionInt(item, token, x);
+}
+
+
+/*
+ * Initializes a Text Item of type NW_DOM_TEXT_ITEM_OPAQUE
+ * Returns NW_STAT_SUCCESS
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_TextItem_initFromOpaque (NW_DOM_TextItem_t *item,
+ NW_Uint32 length,
+ NW_Byte* data)
+{
+ NW_ASSERT(item != NULL);
+ NW_ASSERT(data != NULL);
+
+ item->type = NW_WBXML_ATTR_COMPONENT_OPAQUE;
+ item->component.opaque.length = length;
+ item->component.opaque.data = data;
+
+ return NW_STAT_SUCCESS;
+}
+
+
+NW_Status_t
+NW_DOM_TextItem_delete(NW_DOM_TextItem_t *textItem)
+{
+ NW_ASSERT(textItem != NULL);
+
+ NW_Mem_Free(textItem);
+
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Returns the type of Text Item
+ */
+
+EXPORT_C NW_DOM_TextItemType_t
+NW_DOM_TextItem_getType(NW_DOM_TextItem_t *item)
+{
+
+ NW_ASSERT(item != NULL);
+
+ switch(item->type)
+ {
+ case NW_WBXML_ATTR_COMPONENT_EXT:
+ return NW_DOM_TEXT_ITEM_EXTENSION;
+ case NW_WBXML_ATTR_COMPONENT_STRING:
+ return NW_DOM_TEXT_ITEM_STRING;
+ case NW_WBXML_ATTR_COMPONENT_ENTITY:
+ return NW_DOM_TEXT_ITEM_ENTITY;
+ case NW_WBXML_ATTR_COMPONENT_OPAQUE:
+ return NW_DOM_TEXT_ITEM_OPAQUE;
+ default:
+ return 0;
+ }
+}
+
+/*
+ * Sets the type of Text Item
+ */
+
+/* TBD This is a very dangerous function and should be made internal
+ use only (i.e., static)! */
+NW_Status_t
+NW_DOM_TextItem_setType(NW_DOM_TextItem_t *item,
+ NW_DOM_TextItemType_t type)
+{
+ NW_ASSERT(item != NULL);
+
+ switch(type)
+ {
+ case NW_DOM_TEXT_ITEM_EXTENSION:
+ item->type = NW_WBXML_ATTR_COMPONENT_EXT;
+ break;
+ case NW_DOM_TEXT_ITEM_STRING:
+ item->type = NW_WBXML_ATTR_COMPONENT_STRING;
+ break;
+ case NW_DOM_TEXT_ITEM_OPAQUE:
+ item->type = NW_WBXML_ATTR_COMPONENT_OPAQUE;
+ break;
+ case NW_DOM_TEXT_ITEM_ENTITY:
+ item->type = NW_WBXML_ATTR_COMPONENT_ENTITY;
+ break;
+ default:
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Returns
+ * NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED - if encoding is not supported
+ * NW_STAT_DOM_NO_STRING_RETURNED
+ * NW_STAT_SUCCESS
+ *
+ * MODIFIED - string - the String representation of item
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_TextItem_toString(NW_DOM_TextItem_t *item,
+ NW_String_t *string,
+ NW_Uint32 encoding)
+{
+ NW_Status_t status;
+
+ NW_ASSERT(item != NULL);
+ NW_ASSERT(string != NULL);
+
+ NW_String_initialize(string, NULL, 0);
+
+ if ((NW_String_charsetValid(encoding)) != NW_STAT_SUCCESS){
+ return NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED;
+ }
+
+ switch (NW_DOM_TextItem_getType(item))
+ {
+ case NW_DOM_TEXT_ITEM_STRING:
+ {
+ NW_Byte *storage = item->component.string.storage;
+ status = NW_String_initialize(string, storage, encoding);
+ if(status == NW_STAT_SUCCESS){
+ return NW_STAT_SUCCESS;
+ }
+ else{
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ }
+ case NW_DOM_TEXT_ITEM_ENTITY:
+ status = NW_String_entityToString(item->component.entity,
+ string, encoding);
+ if(status == NW_STAT_SUCCESS){
+ return NW_STAT_SUCCESS;
+ }
+ else{
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+
+ case NW_DOM_TEXT_ITEM_OPAQUE:
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ case NW_DOM_TEXT_ITEM_EXTENSION:
+ {
+ NW_Uint8 t; /* 8-bit token */
+
+ t = (NW_Uint8)(item->component.ext.token);
+ if ((t == NW_WBXML_EXT_0)
+ || (t == NW_WBXML_EXT_1)
+ || (t == NW_WBXML_EXT_2)) {
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ if ((item->component.ext.type
+ == NW_TINYDOM_EXTENSION_TYPE_EXT_T_INTEGER)
+ && ((t == NW_WBXML_EXT_T_0)
+ || (t == NW_WBXML_EXT_T_1)
+ || (t == NW_WBXML_EXT_T_2))) {
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ if (item->component.ext.value.string.storage == NULL) {
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ /* struct assignment, shallow copy */
+ *string = item->component.ext.value.string;
+ return NW_STAT_SUCCESS;
+ }
+ default:
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+}
+
+
+EXPORT_C NW_Uint32
+NW_DOM_TextItem_getEntity(NW_DOM_TextItem_t *item)
+{
+ NW_ASSERT(item != NULL);
+
+ if (NW_DOM_TextItem_getType(item) != NW_DOM_TEXT_ITEM_ENTITY){
+ return 0;
+ }
+
+ return item->component.entity;
+}
+
+/*
+ * If TextItem is of type NW_DOM_TEXT_ITEM_STRING returns NW_STAT_SUCCESS
+ * and modifies string.
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_TextItem_getString(NW_DOM_TextItem_t *item,
+ NW_String_t *string)
+{
+ NW_ASSERT(item != NULL);
+ NW_ASSERT(string != NULL);
+
+ if (NW_DOM_TextItem_getType(item) != NW_DOM_TEXT_ITEM_STRING){
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ return NW_String_copy(string, &item->component.string);
+}
+
+EXPORT_C NW_Status_t
+NW_DOM_TextItem_getExtensionToken(NW_DOM_TextItem_t* pItem,
+ NW_Uint16* pX)
+{
+ /* Text items and AttrVals are nearly the same thing. */
+ return NW_DOM_AttrVal_getExtensionToken(pItem, pX);
+}
+
+/* If TextItem is of type NW_DOM_TEXT_ITEM_EXTENSION and extension
+ isn't EXT_T_[0,1,2] in non string table reference form, returns token
+ otherwise returns 0 and returns str->length = 0, str->storage = NULL.
+
+ All returned strings are shallow copies and the only proper way to
+ free these is to call NW_String_delete(pStr). */
+EXPORT_C NW_Uint16
+NW_DOM_TextItem_getExtension(NW_DOM_TextItem_t *item,
+ NW_String_t *str)
+{
+ NW_Uint16 fqToken;
+ NW_Uint8 t; /* 8-bit token */
+
+ NW_ASSERT(item != NULL);
+ NW_ASSERT(str != NULL);
+
+ NW_String_initialize(str, NULL, 0);
+
+ if (NW_DOM_TextItem_getType(item) != NW_DOM_TEXT_ITEM_EXTENSION) {
+ return 0;
+ }
+
+ /* TBD If it could be gauranteed that the extension was constructed
+ correctly then it would be enough to just unconditionally
+ shallowCopy. */
+
+ fqToken = (NW_Uint16)(item->component.ext.token);
+ t = (NW_Uint8)fqToken;
+
+ if (((t == NW_WBXML_EXT_T_0)
+ || (t == NW_WBXML_EXT_T_1)
+ || (t == NW_WBXML_EXT_T_2))
+ && (item->component.ext.type
+ == NW_TINYDOM_EXTENSION_TYPE_EXT_T_INTEGER)) {
+ /* This function is not for this case: use "getExtensionInt" form. */
+ return 0;
+ }
+
+ if ((t != NW_WBXML_EXT_0) && (t != NW_WBXML_EXT_1) && (t != NW_WBXML_EXT_2)) {
+ /* By fiat we do nothing with the single byte extension tokens. A
+ more correct version might be to callback to the client to
+ request a mapping to a client determined string.
+
+ In the normal case where EXT_T refers to the string table, both
+ the EXT_T and EXT_I forms are represented by an explicit pointer
+ to the string value since for the EXT_T form we don't have a
+ pointer to the string table anyway. */
+ NW_String_shallowCopy(str, &item->component.ext.value.string);
+ }
+ return fqToken;
+}
+
+EXPORT_C NW_Status_t
+NW_DOM_TextItem_getExtensionInt(NW_DOM_TextItem_t* item,
+ NW_Uint32* x)
+{
+ NW_Uint16 fqToken;
+ NW_Uint8 t; /* 8-bit token */
+
+ NW_ASSERT(item != NULL);
+ NW_ASSERT(x != NULL);
+
+ if ((NW_DOM_TextItem_getType(item) != NW_DOM_TEXT_ITEM_EXTENSION)
+ || ((item->component.ext.type
+ != NW_TINYDOM_EXTENSION_TYPE_EXT_T_INTEGER)))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ fqToken = (NW_Uint16)(item->component.ext.token);
+ t = (NW_Uint8)fqToken;
+ if ((t == NW_WBXML_EXT_T_0)
+ || (t == NW_WBXML_EXT_T_1)
+ || (t == NW_WBXML_EXT_T_2)) {
+ *x = item->component.ext.value.x;
+ return NW_STAT_SUCCESS;
+ }
+ return NW_STAT_FAILURE;
+}
+
+EXPORT_C NW_Byte *
+NW_DOM_TextItem_getOpaque(NW_DOM_TextItem_t *item,
+ NW_Uint32 *opaqueLen)
+{
+ NW_ASSERT(item != NULL);
+
+ if (NW_DOM_TextItem_getType(item) != NW_DOM_TEXT_ITEM_OPAQUE){
+ return NULL;
+ }
+
+ *opaqueLen = item->component.opaque.length;
+ return item->component.opaque.data;
+}
+
+
+/*
+ * TEXT NODE HANDLE
+ */
+
+NW_DOM_TextItemIterator_t *
+NW_DOM_TextItemIterator_new(void)
+{
+ return (NW_DOM_TextItemIterator_t *)
+ NW_Mem_Malloc(sizeof (NW_DOM_TextItemIterator_t));
+}
+
+
+NW_Status_t
+NW_DOM_TextItemIterator_delete(NW_DOM_TextItemIterator_t *handle)
+{
+ NW_ASSERT(handle != NULL);
+
+ NW_Mem_Free (handle);
+
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Returns NW_STAT_WBXML_ITERATE_MORE
+ * NW_STAT_WBXML_ITERATE_DONE
+ *
+ * MODIFIED textItem
+ */
+
+EXPORT_C NW_Status_t
+NW_DOM_TextItemIterator_getNextTextItem(NW_DOM_TextItemIterator_t *handle,
+ NW_DOM_TextItem_t *textItem)
+{
+ NW_TinyTree_Offset_t offset;
+
+ NW_ASSERT(handle != NULL);
+ NW_ASSERT(textItem != NULL);
+
+ offset = NW_TinyDom_TextHandle_iterate(handle, textItem);
+ if (offset == 0){
+ return NW_STAT_WBXML_ITERATE_DONE;
+ }
+ return NW_STAT_WBXML_ITERATE_MORE;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/dom/src/wbxml_types.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,616 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_dom_node.h>
+#include "nw_dom_wbxmltypes.h"
+
+/** Extension **/
+
+/*
+ * Creates and inits new extension with a given token and string
+ */
+
+/* TODO: this is unlike other new methods which do not init
+ Ask Deepika about this???? */
+
+
+NW_DOM_Extension_t *
+NW_DOM_Extension_new(NW_Uint32 token,
+ NW_String_t *str)
+{
+ NW_DOM_Extension_t *ext =
+ (NW_DOM_Extension_t *)NW_Mem_Malloc(sizeof(NW_DOM_Extension_t));
+
+ if (ext == NULL){
+ return NULL;
+ }
+
+ NW_DOM_Extension_initialize(ext, token, str);
+ return ext;
+}
+
+/*
+ * Initializes an extension with a token and string
+ * Returns NW_STAT_SUCCESS or NW_STAT_FAILURE
+ */
+
+NW_Status_t
+NW_DOM_Extension_initialize(NW_DOM_Extension_t *ext,
+ NW_Uint32 token,
+ NW_String_t *str)
+{
+ NW_Status_t s = NW_STAT_FAILURE;
+
+ if (ext) {
+ ext->token = token;
+ ext->value.string = *str;
+ s = NW_STAT_SUCCESS;
+}
+ return s;
+}
+
+/*
+ * Returns token of extension
+ */
+
+NW_Uint32
+NW_DOM_Extension_getToken(NW_DOM_Extension_t *e)
+{
+
+ NW_ASSERT(e != NULL);
+
+ return e->token;
+}
+
+/** Opaque **/
+
+/**
+ * Creates a new Opaque type with a given data and length
+ */
+
+/* TODO: Why does this also init ???? */
+
+NW_DOM_Opaque_t *
+NW_DOM_Opaque_new(NW_Uint32 length, NW_Byte* data)
+{
+ NW_DOM_Opaque_t *opaque =
+ (NW_DOM_Opaque_t *) NW_Mem_Malloc(sizeof (NW_DOM_Opaque_t));
+
+ if (opaque == NULL){
+ return NULL;
+ }
+
+ NW_DOM_Opaque_initialize(opaque, length, data);
+
+ return opaque;
+}
+
+/*
+ * Initializes Opaque data type
+ * Returns NW_DOMSTAT_BAD_INPUT_PARAM
+ * NW_DOMSTAT_SUCCESS
+ */
+NW_Status_t
+NW_DOM_Opaque_initialize(NW_DOM_Opaque_t *opaque, NW_Uint32 length, NW_Byte* data)
+{
+ NW_Status_t s = NW_STAT_FAILURE;
+
+ if (opaque) {
+ opaque->data = data;
+ opaque->length = length;
+ s = NW_STAT_SUCCESS;
+ }
+ return s;
+}
+
+NW_Status_t
+NW_DOM_Opaque_delete(NW_DOM_Opaque_t *opaque)
+{
+ NW_ASSERT(opaque != NULL);
+
+ if (NW_DOM_Opaque_getUserOwnsData(opaque)){
+ if (opaque->data != NULL){
+ NW_Mem_Free (opaque->data);
+ }
+ }
+
+ NW_Mem_Free(opaque);
+ return NW_STAT_SUCCESS;
+}
+
+
+/*
+combined WBXML attribute value and text components
+ */
+
+
+NW_Status_t
+NW_DOM_WbxmlComponent_setType(NW_WbxmlComponent_t AttributeValueOrText,
+ NW_TinyDom_AttrVal_t* pV,
+ NW_Uint32 type)
+{
+ NW_Status_t s = NW_STAT_BAD_INPUT_PARAM;
+
+ if (pV
+ && (type < NW_WBXML_ATTR_COMPONENT_INVALID)
+ && !((AttributeValueOrText == NW_WBXML_TEXT_COMPONENT)
+ && (type == NW_WBXML_ATTR_COMPONENT_TOKEN))) {
+ pV->type = type;
+ s = NW_STAT_SUCCESS;
+ }
+ return s;
+}
+
+NW_Status_t
+NW_DOM_WbxmlComponent_initFromString(NW_TinyDom_AttrVal_t* pV,
+ NW_String_t * pString)
+{
+ NW_Status_t s = NW_STAT_BAD_INPUT_PARAM;
+
+ if (pV
+ && pString) {
+ pV->type = NW_WBXML_ATTR_COMPONENT_STRING;
+ pV->component.string = *pString;
+ s = NW_STAT_SUCCESS;
+ }
+ return s;
+}
+
+NW_Status_t
+NW_DOM_WbxmlComponent_initFromEntity(NW_TinyDom_AttrVal_t* pV,
+ NW_Uint32 entity)
+{
+ NW_Status_t s = NW_STAT_BAD_INPUT_PARAM;
+
+ if (pV) {
+ pV->type = NW_WBXML_ATTR_COMPONENT_ENTITY;
+ pV->component.entity = entity;
+ s = NW_STAT_SUCCESS;
+ }
+ return s;
+}
+
+/*
+ Initializes a WBXML component of type NW_WBXML_ATTR_COMPONENT_EXT
+ Returns NW_STAT_SUCCESS or NW_STAT_FAILURE if args are not valid.
+
+ Makes a shallow copy of str.
+ */
+NW_Status_t
+NW_DOM_WbxmlComponent_initFromExtension(NW_TinyDom_AttrVal_t* val,
+ NW_Uint16 token,
+ NW_String_t* str)
+{
+ NW_Uint8 t; /* 8-bit token */
+
+ NW_ASSERT(val != NULL);
+ NW_ASSERT(token != 0);
+
+ val->type = NW_WBXML_ATTR_COMPONENT_INVALID;
+ t = (NW_Uint8)token;
+ if ((t == NW_WBXML_EXT_0)
+ || (t == NW_WBXML_EXT_1)
+ || (t == NW_WBXML_EXT_2)
+ || (t == NW_WBXML_EXT_T_0)
+ || (t == NW_WBXML_EXT_T_1)
+ || (t == NW_WBXML_EXT_T_2)
+ || (t == NW_WBXML_EXT_I_0)
+ || (t == NW_WBXML_EXT_I_1)
+ || (t == NW_WBXML_EXT_I_2)) {
+ if ((t != NW_WBXML_EXT_0)
+ && (t != NW_WBXML_EXT_1)
+ && (t != NW_WBXML_EXT_2)
+ && (str->storage == NULL)) {
+ return NW_STAT_FAILURE;
+ }
+ val->type = NW_WBXML_ATTR_COMPONENT_EXT;
+ val->component.ext.type = NW_TINYDOM_EXTENSION_TYPE_NORMAL;
+ val->component.ext.token = token;
+ if ((t == NW_WBXML_EXT_0)
+ || (t == NW_WBXML_EXT_1)
+ || (t == NW_WBXML_EXT_2)) {
+ NW_String_initialize(&(val->component.ext.value.string), NULL, 0);
+ } else {
+ /* struct assignment, shallow copy */
+ val->component.ext.value.string = *str;
+ }
+ return NW_STAT_SUCCESS;
+ }
+ return NW_STAT_FAILURE;
+}
+
+NW_Status_t
+NW_DOM_WbxmlComponent_initFromExtensionInt(NW_TinyDom_AttrVal_t* val,
+ NW_Uint16 token,
+ NW_Uint32 x)
+{
+ NW_Uint8 t = (NW_Uint8)token;
+
+ NW_ASSERT(val != NULL);
+
+ if ((t == NW_WBXML_EXT_T_0)
+ || (t == NW_WBXML_EXT_T_1)
+ || (t == NW_WBXML_EXT_T_2)) {
+ val->type = NW_WBXML_ATTR_COMPONENT_EXT;
+ val->component.ext.type = NW_TINYDOM_EXTENSION_TYPE_EXT_T_INTEGER;
+ val->component.ext.token = token;
+ val->component.ext.value.x = x;
+ return NW_STAT_SUCCESS;
+ }
+ return NW_STAT_FAILURE;
+}
+
+NW_Status_t
+NW_DOM_WbxmlComponent_initFromOpaque(NW_TinyDom_AttrVal_t* pV,
+ NW_Uint32 byteCount,
+ NW_Uint8* pData)
+{
+ NW_Status_t s = NW_STAT_BAD_INPUT_PARAM;
+
+ if (pV) {
+ pV->type = NW_WBXML_ATTR_COMPONENT_OPAQUE;
+ pV->component.opaque.length = byteCount;
+ pV->component.opaque.data = pData;
+ s = NW_STAT_SUCCESS;
+ }
+ return s;
+}
+
+NW_Status_t
+NW_DOM_WbxmlComponent_initFromToken(NW_TinyDom_AttrVal_t* pV,
+ NW_Uint32 token)
+{
+ NW_Status_t s = NW_STAT_BAD_INPUT_PARAM;
+
+ if (pV) {
+ pV->type = NW_WBXML_ATTR_COMPONENT_TOKEN;
+ pV->component.value_token = token;
+ s = NW_STAT_SUCCESS;
+ }
+ return s;
+}
+
+NW_Uint32
+NW_DOM_WbxmlComponent_getEntity(NW_TinyDom_AttrVal_t* pV)
+{
+ NW_Uint32 x = 0;
+ if (pV) {
+ x = pV->component.entity;
+ }
+ return x;
+}
+
+NW_Status_t
+NW_DOM_WbxmlComponent_getString(NW_TinyDom_AttrVal_t* pV,
+ NW_String_t* pString)
+{
+ NW_Status_t s = NW_STAT_BAD_INPUT_PARAM;
+
+ if (pV
+ && (pV->type == NW_WBXML_ATTR_COMPONENT_STRING)) {
+ s = NW_String_copy(pString, &(pV->component.string));
+ }
+ return s;
+}
+
+
+NW_Status_t
+NW_DOM_WbxmlComponent_getExtensionToken(NW_TinyDom_AttrVal_t* pV,
+ NW_Uint16* pToken)
+{
+ NW_Status_t s = NW_STAT_BAD_INPUT_PARAM;
+
+ if (pV
+ && pToken
+ && (pV->type == NW_WBXML_ATTR_COMPONENT_EXT)) {
+ *pToken = (NW_Uint16)(pV->component.ext.token);
+ s = NW_STAT_SUCCESS;
+ }
+ return s;
+}
+
+/* If component is of type NW_WBXML_ATTR_COMPONENT_EXT, and extension
+ isn't EXT_T_[0,1,2] in non string table reference form, then returns token.
+ Otherwise, returns 0 and returns str->length = 0, str->storage = NULL.
+
+ All returned strings are shallow copies and the only proper way to
+ free these is to call NW_String_delete(pStr). */
+NW_Uint16
+NW_DOM_WbxmlComponent_getExtension(NW_TinyDom_AttrVal_t* val,
+ NW_String_t* str)
+{
+ NW_Uint16 fqToken;
+ NW_Uint8 t; /* 8-bit token */
+
+ NW_ASSERT (val != NULL);
+ NW_ASSERT (str != NULL);
+
+ NW_String_initialize(str, NULL, 0);
+
+ if (val->type != NW_WBXML_ATTR_COMPONENT_EXT) {
+ return 0;
+ }
+
+ /* TBD If it could be gauranteed that the extension was constructed
+ correctly then it would be enough to just unconditionally
+ shallowCopy. */
+
+ fqToken = (NW_Uint16)(val->component.ext.token);
+ t = (NW_Uint8)fqToken;
+
+ if (((t == NW_WBXML_EXT_T_0)
+ || (t == NW_WBXML_EXT_T_1)
+ || (t == NW_WBXML_EXT_T_2))
+ && (val->component.ext.type
+ == NW_TINYDOM_EXTENSION_TYPE_EXT_T_INTEGER)) {
+ /* This function is not for this case: use "getExtensionInt" form. */
+ return 0;
+ }
+
+ if ((t != NW_WBXML_EXT_0) && (t != NW_WBXML_EXT_1) && (t != NW_WBXML_EXT_2)) {
+ /* By fiat we do nothing with the single byte extension tokens. A
+ more correct version might be to callback to the client to
+ request a mapping to a client determined string.
+
+ In the normal case where EXT_T refers to the string table, both
+ the EXT_T and EXT_I forms are represented by an explicit pointer
+ to the string value since for the EXT_T form we don't have a
+ pointer to the string table anyway. */
+ NW_String_shallowCopy(str, &val->component.ext.value.string);
+ }
+ return fqToken;
+ }
+
+NW_Status_t
+NW_DOM_WbxmlComponent_getExtensionInt(NW_TinyDom_AttrVal_t* val,
+ NW_Uint32* x)
+{
+ NW_Uint16 fqToken;
+ NW_Uint8 t; /* 8-bit token */
+
+ NW_ASSERT(val != NULL);
+ NW_ASSERT(x != NULL);
+
+ if ((val->type != NW_WBXML_ATTR_COMPONENT_EXT)
+ || ((val->component.ext.type
+ != NW_TINYDOM_EXTENSION_TYPE_EXT_T_INTEGER)))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ fqToken = (NW_Uint16)(val->component.ext.token);
+ t = (NW_Uint8)fqToken;
+ if ((t == NW_WBXML_EXT_T_0)
+ || (t == NW_WBXML_EXT_T_1)
+ || (t == NW_WBXML_EXT_T_2)) {
+ *x = val->component.ext.value.x;
+ return NW_STAT_SUCCESS;
+ }
+ return NW_STAT_FAILURE;
+}
+
+NW_Uint8*
+NW_DOM_WbxmlComponent_getOpaque(NW_TinyDom_AttrVal_t* pV,
+ NW_Uint32 *pOpaqueByteCount)
+{
+ if (pV
+ && pOpaqueByteCount
+ && (pV->type == NW_WBXML_ATTR_COMPONENT_OPAQUE)) {
+ *pOpaqueByteCount = pV->component.opaque.length;
+ return pV->component.opaque.data;
+ }
+ if (pOpaqueByteCount) {
+ *pOpaqueByteCount = 0;
+ }
+ return NULL;
+}
+
+NW_Uint16
+NW_DOM_WbxmlComponent_getToken(NW_TinyDom_AttrVal_t* pV)
+{
+ if (pV
+ && (pV->type == NW_WBXML_ATTR_COMPONENT_TOKEN)) {
+ return (NW_Uint16)pV->component.value_token;
+ }
+ return 0;
+}
+
+/* Returns
+
+ NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED - if encoding is not supported
+
+ NW_STAT_DOM_NO_STRING_RETURNED
+
+ NW_STAT_SUCCESS
+
+ MODIFIED - string - the String representation of item */
+NW_Status_t
+NW_DOM_WbxmlComponent_toString(NW_TinyDom_AttrVal_t* pV,
+ NW_String_t *string,
+ NW_Uint32 encoding)
+{
+ NW_Status_t status;
+
+ if (!pV
+ || !string) {
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+
+ NW_String_initialize(string, NULL, 0);
+
+ if ((NW_String_charsetValid(encoding)) != NW_STAT_SUCCESS) {
+ return NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED;
+ }
+
+ switch (pV->type)
+ {
+ case NW_WBXML_ATTR_COMPONENT_TOKEN:
+ status = NW_String_tokenToString(pV->component.value_token, string, encoding);
+ if(status != NW_STAT_SUCCESS){
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ return NW_STAT_SUCCESS;
+ case NW_WBXML_ATTR_COMPONENT_STRING:
+ {
+ NW_Byte *storage = pV->component.string.storage;
+ status = NW_String_initialize(string, storage, encoding);
+ if(status != NW_STAT_SUCCESS) {
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ return NW_STAT_SUCCESS;
+ }
+ case NW_WBXML_ATTR_COMPONENT_ENTITY:
+ status = NW_String_entityToString(pV->component.entity,
+ string, encoding);
+ if(status != NW_STAT_SUCCESS){
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ return NW_STAT_SUCCESS;
+ case NW_WBXML_ATTR_COMPONENT_OPAQUE:
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ case NW_WBXML_ATTR_COMPONENT_EXT:
+ {
+ NW_Uint8 t; /* 8-bit token */
+
+ t = (NW_Uint8)(pV->component.ext.token);
+ if ((t == NW_WBXML_EXT_0)
+ || (t == NW_WBXML_EXT_1)
+ || (t == NW_WBXML_EXT_2)) {
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ if ((pV->component.ext.type
+ == NW_TINYDOM_EXTENSION_TYPE_EXT_T_INTEGER)
+ && ((t == NW_WBXML_EXT_T_0)
+ || (t == NW_WBXML_EXT_T_1)
+ || (t == NW_WBXML_EXT_T_2))) {
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ if (pV->component.ext.value.string.storage == NULL) {
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ /* struct assignment, shallow copy */
+ *string = pV->component.ext.value.string;
+ return NW_STAT_SUCCESS;
+ }
+ default:
+ return NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+}
+
+/* converts an entire component sequence (via iterator on text or attrval) to string
+
+returns either NW_STAT_SUCCESS or NW_STAT_DOM_NO_STRING_RETURNED if something fails */
+NW_Status_t
+NW_DOM_WbxmlComponent_sequenceToString(NW_WbxmlComponent_t AttributeValueOrText,
+ NW_TinyDom_AttributeHandle_t* pIterator,
+ NW_Uint32 encoding,
+ NW_String_t* pOutString)
+{
+ NW_TinyDom_AttrVal_t component;
+ NW_String_t tempString;
+ NW_Status_t s = NW_STAT_SUCCESS; /* if no sequence, then declare success! */
+
+ NW_Mem_memset(&component, 0, sizeof(NW_TinyDom_AttrVal_t));
+
+ while ((AttributeValueOrText == NW_WBXML_TEXT_COMPONENT) ?
+ NW_TinyDom_TextHandle_iterate(pIterator, &component)
+ : NW_TinyDom_AttributeHandle_iterateValues(pIterator, &component)) {
+
+ s = NW_DOM_WbxmlComponent_toString(&component, &tempString, encoding);
+ if (s != NW_STAT_SUCCESS) {
+ break;
+ }
+ if ((pOutString->length == 0) || (pOutString->storage == NULL)) {
+ s = NW_String_deepCopy(pOutString, &tempString);
+ } else {
+ s = NW_String_concatenate(pOutString, &tempString, encoding);
+ }
+ NW_String_deleteStorage(&tempString);
+ if (s != NW_STAT_SUCCESS) {
+ break;
+ }
+ }
+ if (s != NW_STAT_SUCCESS) {
+ NW_String_deleteStorage(pOutString);
+ if (s == NW_STAT_OUT_OF_MEMORY)
+ {
+ s = NW_STAT_OUT_OF_MEMORY;
+ }
+ else
+ {
+ s = NW_STAT_DOM_NO_STRING_RETURNED;
+ }
+ }
+ return s;
+}
+
+
+
+/*
+ * Returns length of opaque data
+ */
+
+NW_Uint32
+NW_DOM_Opaque_getLength(NW_DOM_Opaque_t *opaque)
+{
+ NW_ASSERT(opaque != NULL);
+
+ return opaque->length & 0x7FFFFFFF;
+}
+
+/*
+ * Returns data from opaque
+ */
+
+NW_Byte *
+NW_DOM_Opaque_getData(NW_DOM_Opaque_t *opaque)
+{
+ NW_ASSERT(opaque != NULL);
+ return opaque->data;
+}
+
+
+/*
+ * Returns true if user owns data storage and can
+ * deallocate it
+ */
+NW_Bool
+NW_DOM_Opaque_getUserOwnsData(NW_DOM_Opaque_t *opaque)
+{
+ NW_ASSERT(opaque != NULL);
+
+ /* The MSB of NW_Byte length if set represents that the
+ string is from storage buffer, so BufferOwns String */
+ if((opaque->length & 0x80000000) == 0){
+ return NW_FALSE;
+ }
+ return NW_TRUE;
+}
+
+NW_Status_t
+NW_DOM_Opaque_setUserOwnsData(NW_DOM_Opaque_t *opaque)
+{
+ NW_ASSERT(opaque != NULL);
+
+ /* The MSB of NW_Byte length if set represents that the
+ string is from storage buffer, so BufferOwns String */
+
+ opaque->length = opaque->length | 0x80000000;
+ return NW_STAT_SUCCESS;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/encoder/include/nw_encoder_tinydom2wbxml.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,291 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_Encoder
+
+ @synopsis: default
+
+ @description: Maps TinyDom types onto WBXMLWriter functions.
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef NW_TINYDOM2WBXML_H
+#define NW_TINYDOM2WBXML_H
+
+#include <xml/cxml/nw_encoder_wbxmlwriter.h>
+#include <xml/cxml/nw_dom_attribute.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_writeAttrVal
+
+ @synopsis: Write attribute.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_DOM_AttrVal_t* val
+ The attirbute value.
+
+ [in] NW_Uint32 encoding
+ Charset as IANA MIBenum.
+
+ @description: Write attribute.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Attribute written.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Required value is null or invalid token.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Couldn't allocate memory.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_Encoder_writeAttrVal(NW_WBXML_Writer_t* pW,
+ NW_DOM_AttrVal_t *val,
+ NW_Uint32 encoding);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_writeAttributeByToken
+
+ @synopsis: Write attribute specified token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_Uint16 attrFqToken
+ The fully qualified token.
+
+ [in] NW_TinyDom_AttrVal_t* val
+ Value to write.
+
+ [in] NW_Uint32 encoding
+ Encoding to use.
+
+ @description: Write attribute specified token.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Attribute written.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Required value is null or invalid token.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Couldn't allocate memory.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_Encoder_writeAttributeByToken(NW_WBXML_Writer_t* pW,
+ NW_Uint16 attrFqToken,
+ NW_TinyDom_AttrVal_t* val,
+ NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_writeAttributeByName
+
+ @synopsis: Writes an Attribute by name plus AttrVal.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_String_t* attrName
+ The attribute name to use.
+
+ [in] NW_TinyDom_AttrVal_t* val
+ The value to write.
+
+ [in] NW_Uint32 encoding
+ The encoding to use.
+
+ @description: Writes an Attribute by name plus AttrVal.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Attribute written.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Required value is NULL or invalid.
+
+ [NW_STAT_FAILURE]
+ Not found.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Memory couldn't be allocated.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_Encoder_writeAttributeByName(NW_WBXML_Writer_t* pW,
+ NW_String_t* attrName,
+ NW_TinyDom_AttrVal_t* val,
+ NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_writeElementByToken
+
+ @synopsis: Write element by token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_Uint16 elementToken
+ The token to write.
+
+ @description: Write element by token.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Attribute written.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Required value is NULL or invalid.
+
+ [NW_STAT_FAILURE]
+ Not found.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Memory couldn't be allocated.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_Encoder_writeElementByToken(NW_WBXML_Writer_t* pW,
+ NW_Uint16 elementToken);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_writeElementByName
+
+ @synopsis: Write element by name.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_String_t* elementName
+ Name of element to write.
+
+ [in] NW_Uint32 encoding
+ Encoding to use.
+
+ @description: Write element by name.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Attribute written.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Required value is NULL or invalid.
+
+ [NW_STAT_FAILURE]
+ Not found.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Memory couldn't be allocated.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_Encoder_writeElementByName(NW_WBXML_Writer_t* pW,
+ NW_String_t* elementName,
+ NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_writeText
+
+ @synopsis: Write text.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_TinyDom_Text_t* text
+ default
+
+ [in] NW_Uint32 encoding
+ default
+
+ @description: Write text.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Attribute written.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Required value is NULL or invalid.
+
+ [NW_STAT_FAILURE]
+ Not found.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Memory couldn't be allocated.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_Encoder_writeText(NW_WBXML_Writer_t* pW,
+ NW_TinyDom_Text_t* text,
+ NW_Uint32 encoding);
+
+#ifdef __cplusplus
+} // extern "C" {
+#endif /* __cplusplus */
+
+/* NW_TINYDOM2WBXML_H */
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/encoder/src/StringTable.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,721 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include <xml/cxml/nw_encoder_stringtable.h>
+#include <xml/cxml/nw_wbxml_parse.h>
+#include <xml/cxml/nw_dom_attribute.h>
+#include <xml/cxml/nw_dom_element.h>
+#include <xml/cxml/nw_dom_text.h>
+#include <xml/cxml/nw_dom_document.h>
+#include "cxml_internal.h"
+
+/* ------------------------------------------------------------------------- *
+ private methods
+ * ------------------------------------------------------------------------- */
+
+/* ------------------------------------------------------------------------- */
+static
+NW_Status_t
+NW_Encoder_StringItem_initialize(NW_Encoder_StringItem_t *strItem,
+ NW_String_t *str)
+{
+ NW_Status_t status = NW_STAT_SUCCESS;
+
+ if (strItem == NULL){
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ if(str == NULL)
+ {
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+
+ strItem->data.storage = CXML_Mem_Malloc(str->length + 1);
+
+ if(strItem->data.storage == NULL)
+ {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ NW_Mem_memcpy(strItem->data.storage,str->storage,str->length);
+
+ strItem->data.storage[str->length] = '\0';
+
+ if (status == NW_STAT_SUCCESS)
+ {
+ strItem->frequency = 1;
+ strItem->data.length = str->length;
+ }
+ else
+ {
+ status = NW_STAT_OUT_OF_MEMORY;
+ }
+
+ return status;
+}
+
+/*
+ * Finds string contained in an item (AttrValItem or Text Item)
+ * An item can be string, extension, entity, opaque, or token
+ * Only extension and string may contain strings
+ * Returns NW_STAT_BAD_INPUT_PARAM
+ * NW_STAT_SUCCESS
+ */
+/* ------------------------------------------------------------------------- */
+static
+NW_Status_t
+NW_Encoder_StringTable_getItemString(NW_Encoder_StringTable_t *strTable,
+ NW_DOM_AttrVal_t *item)
+{
+ NW_Uint32 ignoreVal;
+
+ if ((strTable == NULL) || (item == NULL)){
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ switch(item->type) {
+ case NW_DOM_ATTR_VAL_STRING:
+ return NW_Encoder_StringTable_append(strTable, &item->component.string,
+ NW_FALSE, &ignoreVal);
+
+ case NW_DOM_ATTR_VAL_EXTENSION:
+ {
+ NW_Uint8 t; /* 8-bit token */
+
+ t = (NW_Uint8)(item->component.ext.token);
+ if ((item->component.ext.type == NW_TINYDOM_EXTENSION_TYPE_NORMAL)
+ && ((t == NW_WBXML_EXT_T_0)
+ || (t == NW_WBXML_EXT_T_1)
+ || (t == NW_WBXML_EXT_T_2))) {
+ return NW_Encoder_StringTable_append(strTable,
+ &(item->component.ext.value.string),
+ NW_FALSE, &ignoreVal);
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/**
+ * Finds strings in an attribute - iterates over attribute values
+ * Returns NW_STAT_BAD_INPUT_PARAM
+ * NW_STAT_SUCCESS
+ */
+/* ------------------------------------------------------------------------- */
+static
+NW_Status_t
+NW_Encoder_StringTable_getAttributeStrings(NW_Encoder_StringTable_t *strTable,
+ NW_DOM_AttributeHandle_t *attrHandle)
+{
+ NW_Status_t status;
+ NW_DOM_AttrVal_t attrVal;
+ NW_Uint16 token;
+ NW_Uint16 fqToken;
+
+ if ((strTable == NULL) || (attrHandle == NULL)){
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ fqToken = NW_DOM_AttributeHandle_getToken(attrHandle);
+ NW_ASSERT(fqToken);
+ token = (NW_Uint16)(fqToken & NW_WBXML_MASK_TOKEN);
+ if (token == NW_WBXML_LITERAL)
+ {
+ NW_Uint32 ignoreVal;
+ NW_String_t attributeName;
+
+ status = NW_DOM_AttributeHandle_getName(attrHandle, &attributeName);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ status = NW_Encoder_StringTable_append(strTable, &attributeName, NW_TRUE,
+ &ignoreVal);
+ }
+
+ while (NW_DOM_AttributeHandle_getNextVal(attrHandle, &attrVal) == NW_STAT_WBXML_ITERATE_MORE)
+ {
+ status = NW_Encoder_StringTable_getItemString(strTable, &attrVal);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ }
+
+ return NW_STAT_SUCCESS;
+}
+
+/**
+ * Finds strings in an Element Node
+ * Returns NW_STAT_BAD_INPUT_PARAM
+ * NW_STAT_SUCCESS
+ */
+/* ------------------------------------------------------------------------- */
+static
+NW_Status_t
+NW_Encoder_StringTable_getElementStrings(NW_Encoder_StringTable_t *strTable,
+ NW_DOM_ElementNode_t *e)
+{
+ NW_Status_t status;
+ NW_DOM_AttributeListIterator_t listIterator;
+ NW_DOM_AttributeHandle_t attrHandle;
+ NW_Uint32 fqToken;
+ NW_Uint8 token;
+
+ if ((strTable == NULL) || (e == NULL)){
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ fqToken = NW_DOM_ElementNode_getTagToken(e);
+ if (fqToken == 0){
+ return NW_STAT_FAILURE;
+ }
+
+ token = (NW_Uint8)(fqToken & NW_WBXML_MASK_TOKEN);
+
+ /* put element in table if it is LITERAL tag */
+ if (token == NW_WBXML_LITERAL)
+ {
+ NW_String_t elementName;
+ NW_Uint32 ignoreVal;
+
+ if (NW_DOM_ElementNode_getTagName(e, &elementName) != NW_STAT_SUCCESS){
+ return NW_STAT_FAILURE;
+ }
+ status = NW_Encoder_StringTable_append(strTable, &elementName, NW_TRUE,
+ &ignoreVal);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ }
+
+ /* go through attribute strings */
+ if (NW_DOM_ElementNode_hasAttributes(e))
+ {
+ status = NW_DOM_ElementNode_getAttributeListIterator(e, &listIterator);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ while (NW_DOM_AttributeListIterator_getNextAttribute(&listIterator, &attrHandle) == NW_STAT_WBXML_ITERATE_MORE)
+ {
+ status = NW_Encoder_StringTable_getAttributeStrings(strTable, &attrHandle);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ }
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/**
+ * Finds strings in a TextNode
+ * Returns NW_STAT_BAD_INPUT_PARAM
+ * NW_STAT_SUCCESS
+ */
+/* ------------------------------------------------------------------------- */
+static
+NW_Status_t
+NW_Encoder_StringTable_getTextStrings(NW_Encoder_StringTable_t *strTable,
+ NW_DOM_TextNode_t *textNode)
+{
+ NW_DOM_TextItemIterator_t textIter;
+ NW_DOM_TextItem_t item;
+ NW_Status_t status;
+
+ if ((strTable == NULL) || (textNode == NULL))
+ {
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ (void) NW_DOM_TextNode_getTextItemIterator(textNode, &textIter);
+ while (NW_DOM_TextItemIterator_getNextTextItem(&textIter, &item) == NW_STAT_WBXML_ITERATE_MORE)
+ {
+ status = NW_Encoder_StringTable_getItemString(strTable, &item);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/**
+ * Finds strings in a Node (Recursive in nature)
+ * So it finds strings in entire tree
+ * Returns NW_STAT_BAD_INPUT_PARAM
+ * NW_STAT_SUCCESS
+ */
+/* ------------------------------------------------------------------------- */
+static
+NW_Status_t
+NW_Encoder_StringTable_getNodeStrings(NW_Encoder_StringTable_t *strTable,
+ NW_DOM_Node_t *node,
+ NW_WBXML_Dictionary_t *dictionary)
+{
+ NW_Uint32 type;
+
+ type = NW_DOM_Node_getNodeType(node);
+
+ if ((strTable == NULL) || (node == NULL)){
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ switch (type)
+ {
+ case NW_DOM_ELEMENT_NODE:
+ {
+ NW_Encoder_StringTable_getElementStrings(strTable, node);
+ if (NW_DOM_Node_getFirstChild(node))
+ {
+ NW_Encoder_StringTable_getNodeStrings(strTable, NW_DOM_Node_getFirstChild(node), dictionary);
+ }
+
+ if (NW_DOM_Node_getNextSibling(node))
+ {
+ NW_Encoder_StringTable_getNodeStrings(strTable, NW_DOM_Node_getNextSibling(node), dictionary);
+ }
+ }
+ break;
+
+ case NW_DOM_TEXT_NODE:
+ NW_Encoder_StringTable_getTextStrings(strTable, node);
+
+ if (NW_DOM_Node_getNextSibling(node))
+ {
+ NW_Encoder_StringTable_getNodeStrings (strTable, NW_DOM_Node_getNextSibling(node), dictionary);
+ }
+
+ break;
+
+ case NW_DOM_PROCESSING_INSTRUCTION_NODE:
+/* PiPrint (node, encoding); */
+
+ if (NW_DOM_Node_getNextSibling(node))
+ {
+ NW_Encoder_StringTable_getNodeStrings (strTable, NW_DOM_Node_getNextSibling(node), dictionary);
+ }
+
+ break;
+
+ default:
+ if (NW_DOM_Node_getNextSibling(node))
+ {
+ NW_Encoder_StringTable_getNodeStrings (strTable, NW_DOM_Node_getNextSibling(node), dictionary);
+ }
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/**
+ * Finds all the string in document
+ * Returns NW_STAT_BAD_INPUT_PARAM
+ * NW_STAT_OUT_OF_MEMORY
+ * NW_STAT_SUCCESS
+ */
+/* ------------------------------------------------------------------------- */
+static
+NW_Status_t
+NW_Encoder_StringTable_findDocStrings(NW_Encoder_StringTable_t *strTable,
+ NW_DOM_DocumentNode_t *doc,
+ NW_WBXML_Dictionary_t *dictionary)
+{
+ NW_String_t docType;
+ NW_DOM_ElementNode_t *elem;
+ NW_Status_t status;
+
+ if ((strTable == NULL) || (doc == NULL)){
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ if (NW_DOM_DocumentNode_getPublicIdAsNumber(doc) == 0)
+ {
+ NW_Uint32 ignoreVal;
+ status = NW_DOM_DocumentNode_getPublicId(doc, &docType);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ status = NW_Encoder_StringTable_append(strTable, &docType, NW_TRUE,
+ &ignoreVal);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ }
+ elem = NW_DOM_DocumentNode_getDocumentElement(doc);
+ status = NW_Encoder_StringTable_getNodeStrings(strTable, elem, dictionary);
+ return status;
+}
+
+/* ------------------------------------------------------------------------- *
+ public methods
+ * ------------------------------------------------------------------------- */
+
+/*
+ * Creates a new String Table
+ */
+/* ------------------------------------------------------------------------- */
+EXPORT_C
+NW_Encoder_StringTable_t *
+NW_Encoder_StringTable_new()
+{
+ NW_Encoder_StringTable_t* strTable;
+
+ strTable = (NW_Encoder_StringTable_t*)
+ NW_Mem_Malloc(sizeof(NW_Encoder_StringTable_t));
+ if (strTable != NULL){
+ strTable->vector = CXML_Vector_Construct(sizeof(NW_Encoder_StringItem_t), 4);
+ if(strTable->vector == NULL)
+ {
+ NW_Mem_Free(strTable);
+ return NULL;
+ }
+ }
+
+ return strTable;
+}
+
+/*
+ * Deletes a String Table
+ */
+/* ------------------------------------------------------------------------- */
+
+EXPORT_C void
+NW_Encoder_StringTable_delete(NW_Encoder_StringTable_t* strTable)
+{
+ CXML_Vector_t* vectorObj = NULL;
+ NW_Encoder_StringItem_t* strItem = NULL;
+ CXML_Vector_Metric_t index;
+
+ if (strTable == NULL)
+ {
+ return;
+ }
+
+ if(strTable->vector)
+ {
+ vectorObj = strTable->vector;
+ }
+
+ //Free the data memory.
+
+
+ for (index = 0; index < vectorObj->size; index++)
+ {
+ strItem = (NW_Encoder_StringItem_t*) CXML_Vector_AddressAt(vectorObj,index);
+ if(strItem)
+ {
+ if((strItem->data).storage)
+ {
+ NW_Mem_Free ( (strItem->data).storage);
+ }
+ }
+ }/*end for() */
+
+ CXML_Vector_Destruct(strTable->vector);
+ NW_Mem_Free(strTable);
+}
+
+/* returns number of elements in the string table */
+/* ------------------------------------------------------------------------- */
+EXPORT_C CXML_Vector_Metric_t
+NW_Encoder_StringTable_GetSize(NW_Encoder_StringTable_t *strTable)
+{
+ return (NW_Uint32)strTable->vector->size;
+}
+
+/**
+ * Appends new found string in the document to the list. If the string
+ * was already present in the list, then it increases its frequency,
+ * otherwise it creates a new StringItem in the list
+ *
+ * MODIFIED index n= of the string into the table
+ *
+ * Returns NW_STAT_BAD_INPUT_PARAM
+ * NW_STAT_STR_TBL_OVERFLOW
+ * NW_STAT_OUT_OF_MEMORY
+ * NW_STAT_SUCCESS
+ */
+/* ------------------------------------------------------------------------- */
+NW_Status_t
+NW_Encoder_StringTable_append(NW_Encoder_StringTable_t *strTable,
+ NW_String_t *string,
+ NW_Bool literalOrDocType,
+ NW_Uint32 *extensionByteOffset)
+{
+ NW_Encoder_StringItem_t* strItem;
+ NW_Encoder_StringItem_t newStrItem;
+ NW_Uint32 ignoreVal;
+ NW_Status_t status;
+
+ if ((strTable == NULL) || (string == NULL)){
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ newStrItem.data.storage = NULL;
+
+ /* Also, there can be malformed document. cXML parser wants to limits
+ * non DTD elements or attributes. So check current number of elements
+ * in the parser. This is for security reasons.
+ */
+
+ if((NW_Uint32)strTable->vector->size > CXML_MAX_STRTBL_ITEMS)
+ {
+ return NW_STAT_STR_TBL_OVERFLOW;
+ }
+
+ /* Find if string is already there in the string table. By design
+ if string isn't found, then *extensionByteOffset has value equal to
+ the offset of the new item to add which is just the count of all
+ bytes already in the string table. */
+ strItem = NW_Encoder_StringTable_find(strTable, string, &ignoreVal,
+ extensionByteOffset);
+ if (strItem != NULL) {
+ strItem->frequency++;
+ return NW_STAT_SUCCESS;
+ }
+ /* string not found, create a new entry. We need a duplicating the
+ * strings.
+ */
+
+ status = NW_Encoder_StringItem_initialize(&newStrItem, string);
+
+
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ if (literalOrDocType){
+ newStrItem.frequency = 2;
+ }
+ CXML_Vector_InsertAt(strTable->vector, &newStrItem,
+ CXML_Vector_AtEnd, NULL);
+
+
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Finds a string in the list and returns the corresponding
+ * StringItem, otherwise returns NULL
+ */
+/* ------------------------------------------------------------------------- */
+NW_Encoder_StringItem_t*
+NW_Encoder_StringTable_find(NW_Encoder_StringTable_t *strTable,
+ NW_String_t *string,
+ NW_Uint32 *strIndex,
+ NW_Uint32 *byteOffset)
+{
+ CXML_Vector_Metric_t index;
+
+ if ((strTable == NULL) || (string == NULL)){
+ return NULL;
+ }
+ *strIndex = 0;
+ *byteOffset = 0;
+ for (index = 0;
+ index < strTable->vector->size;
+ index++)
+ {
+ NW_Encoder_StringItem_t *item;
+
+ item = (NW_Encoder_StringItem_t*)
+ CXML_Vector_ElementAt(strTable->vector, index);
+ if (NW_String_equals(string, &item->data))
+ {
+ *strIndex = index;
+ return item;
+ }
+ *byteOffset = *byteOffset + NW_String_getByteCount(&item->data);
+ }
+ return NULL;
+}
+
+/**
+ * Finds the string at a given index
+ */
+/* ------------------------------------------------------------------------- */
+NW_Status_t
+NW_Encoder_StringTable_get(NW_Encoder_StringTable_t *strTable,
+ NW_Uint32 index,
+ NW_String_t* string)
+{
+ NW_Encoder_StringItem_t *strItem;
+
+ strItem = (NW_Encoder_StringItem_t*)
+ CXML_Vector_ElementAt(strTable->vector,
+ (CXML_Vector_Metric_t)index);
+
+ if (strItem){
+ string->storage = strItem->data.storage;
+ string->length = strItem->data.length;
+ return NW_STAT_SUCCESS;
+ }
+ return NW_STAT_FAILURE;
+}
+
+/**
+ * Finds item at a given index
+ */
+/* ------------------------------------------------------------------------- */
+NW_Encoder_StringItem_t*
+NW_Encoder_StringTable_getItemAt(NW_Encoder_StringTable_t *strTable,
+ NW_Uint32 index)
+{
+ return (NW_Encoder_StringItem_t*)
+ CXML_Vector_ElementAt(strTable->vector,
+ (CXML_Vector_Metric_t)index);
+}
+
+/**
+ * Removes a string item
+ */
+/* ------------------------------------------------------------------------- */
+NW_Status_t
+NW_Encoder_StringTable_removeAt(NW_Encoder_StringTable_t *strTable,
+ CXML_Vector_Metric_t index)
+{
+ return CXML_Vector_RemoveAt(strTable->vector, (CXML_Vector_Metric_t)index);
+}
+
+/*
+ * Returns the total number of bytes used for storing all the
+ * strings in the list
+ */
+/* ------------------------------------------------------------------------- */
+EXPORT_C NW_Uint32
+NW_Encoder_StringTable_getTotalBytes(NW_Encoder_StringTable_t *strTable)
+{
+ NW_Uint32 byteLength;
+ CXML_Vector_Metric_t index;
+
+ byteLength = 0;
+
+ for (index = 0;
+ index < strTable->vector->size;
+ index++)
+ {
+ NW_Encoder_StringItem_t *strItem;
+
+ strItem = (NW_Encoder_StringItem_t*)
+ CXML_Vector_ElementAt(strTable->vector, index);
+ byteLength += strItem->data.length;
+ }
+
+ return byteLength;
+}
+
+/* ------------------------------------------------------------------------- */
+EXPORT_C NW_Status_t
+NW_Encoder_StringTable_createFromDOM(NW_Encoder_StringTable_t *strTable,
+ NW_DOM_DocumentNode_t *doc,
+ NW_WBXML_Dictionary_t *dictionary)
+{
+
+ /* make a table of strings in the document */
+ NW_Encoder_StringTable_findDocStrings(strTable, doc, dictionary);
+
+ /* The string table will be freed once at the end. So, don't do
+ * this here. This is causing the memory leak otherwise.
+ */
+ return NW_STAT_SUCCESS;
+}
+
+
+/* callback implementations */
+/* ------------------------------------------------------------------------- */
+EXPORT_C NW_Status_t
+NW_Encoder_StringTable_getStringTableOffset(void* pStringTableObject,
+ NW_Uint32 byteCount,
+ const NW_Uint8* pString,
+ NW_Bool* pFound,
+ NW_Uint32* pTableOffset)
+{
+ NW_Encoder_StringItem_t *strItem;
+ NW_Uint32 strIndex;
+ NW_String_t string;
+
+ string.storage = (NW_Byte*)pString;
+ string.length = byteCount;
+
+ strItem = NW_Encoder_StringTable_find((NW_Encoder_StringTable_t*) pStringTableObject,
+ &string, &strIndex, pTableOffset);
+
+ if (strItem == NULL)
+ *pFound = NW_FALSE;
+ else
+ *pFound = NW_TRUE;
+
+ return NW_STAT_SUCCESS;
+}
+
+/* ------------------------------------------------------------------------- */
+EXPORT_C NW_Status_t
+NW_Encoder_StringTable_addToStringTable(void* pStringTableObject,
+ NW_Uint32 byteCount,
+ const NW_Uint8* pString,
+ NW_Uint32* pTableOffset)
+{
+ NW_String_t string;
+
+ string.storage = (NW_Byte*)pString;
+ string.length = byteCount;
+ *pTableOffset = 0;
+ return NW_Encoder_StringTable_append((NW_Encoder_StringTable_t*) pStringTableObject,
+ &string, NW_TRUE, pTableOffset);
+}
+
+/* ------------------------------------------------------------------------- */
+EXPORT_C NW_Status_t
+NW_Encoder_StringTable_StringTableIterateInit(void* pStringTableObject,
+ void* pStringTableIterator)
+{
+ NW_Encoder_StringTableIterator_t *strIterator;
+
+ strIterator = (NW_Encoder_StringTableIterator_t*)pStringTableIterator;
+ strIterator->strTable = (NW_Encoder_StringTable_t*)pStringTableObject;
+ strIterator->currentIndex = 0;
+ return NW_STAT_SUCCESS;
+}
+
+/* at end of string table return byteCount = 0 */
+/* ------------------------------------------------------------------------- */
+EXPORT_C NW_Status_t
+NW_Encoder_StringTable_StringTableIterateNext(void* pStringTableIterator,
+ NW_Uint32* pByteCount,
+ NW_Uint8** ppBuf)
+{
+ NW_Encoder_StringTableIterator_t *strIterator;
+ CXML_Vector_Metric_t size;
+ NW_String_t string;
+ NW_Status_t status;
+
+ strIterator = (NW_Encoder_StringTableIterator_t*)pStringTableIterator;
+ size = NW_Encoder_StringTable_GetSize(strIterator->strTable);
+
+ if (strIterator->currentIndex >= size){
+ return NW_STAT_WBXML_ITERATE_DONE;
+ }
+ status = NW_Encoder_StringTable_get(strIterator->strTable, strIterator->currentIndex, &string);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ *pByteCount = string.length;
+ *ppBuf = string.storage;
+ strIterator->currentIndex++;
+ return NW_STAT_WBXML_ITERATE_MORE;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/encoder/src/WBXMLWriter.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,999 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_wbxml_token.h>
+#include <xml/cxml/nw_encoder_wbxmlwriter.h>
+#include <xml/cxml/nw_wbxml_parse.h>
+#include "cxml_mem.h"
+
+// WLIU_DEBUG: #include "flogger.h"
+ /* a reserved name used for encoding tags and attributes that
+otherwise aren't in the dictionaries. zzzunknown must be in the
+dictionary for both tag names and attribute names */
+#define zzzunknownCharCount 10
+static const NW_Uint8 zzzunknown[] = {'z','z','z','u','n','k','n','o','w','n','\0'};
+#define zzzunknownEncoding HTTP_utf_8
+
+
+static
+NW_Status_t
+NW_WBXML_Writer_Memcpy(NW_WBXML_Writer_t* pW, const NW_Uint8* pBytes,
+ NW_Uint32 writeLength)
+{
+ NW_Status_t s = NW_STAT_SUCCESS;
+ if (writeLength == 0) {
+ return NW_STAT_FAILURE;
+ }
+ if (!pW->sizing) {
+ if (((pW->index + writeLength - 1) >= pW->byteCount)
+ && (pW->growBufCallback != NULL)) {
+ /* try to grow buf */
+ s = (*pW->growBufCallback)(pW, writeLength);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ }
+ if ((pW->index + writeLength - 1) >= pW->byteCount) {
+ /* grow buf unavailable or didn't alloc enough */
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+ NW_Mem_memcpy(pW->pBuf + pW->index, pBytes, writeLength);
+ }
+ pW->index += writeLength;
+ return s;
+}
+
+typedef struct NW_WBXML_Multibyte_s {
+ NW_Uint8 length; /* encoded length in bytes from 1..5 */
+ NW_Uint8 buf[5];
+} NW_WBXML_Multibyte_t;
+
+/* see the WBXML specification for the definition of this function */
+static
+void
+NW_WBXML_EncodeMultibyte(NW_Uint32 x, NW_WBXML_Multibyte_t* pM)
+{
+ NW_Uint8 i;
+ NW_Uint8 littleEndian[5];
+
+ littleEndian[0] = (NW_Uint8)(x & 0x7f);
+ for (i = 1; i < 5; i++) {
+ x >>= 7; /* unsigned x, no sign extension */
+ littleEndian[i] = (NW_Uint8)(x & 0x7f);
+ if (!x) {
+ break;
+ }
+ }
+ pM->length = i;
+ for (i = 0; i < pM->length; i++) {
+ pM->buf[i] = littleEndian[pM->length - 1 - i];
+ if ((i + 1) < pM->length) {
+ pM->buf[i] |= 0x80;
+ }
+ }
+}
+
+static
+NW_Status_t
+NW_WBXML_Writer_Multibyte(NW_WBXML_Writer_t* pW, NW_Uint32 x)
+{
+ NW_WBXML_Multibyte_t multibyte;
+
+ NW_WBXML_EncodeMultibyte(x, &multibyte);
+ return NW_WBXML_Writer_Memcpy(pW, multibyte.buf,
+ multibyte.length);
+}
+
+typedef enum {
+ NW_WBXML_TAG,
+ NW_WBXML_ATTRIBUTE
+} NW_WBXML_Writer_ItemType;
+
+static
+NW_Status_t
+NW_WBXML_Writer_MaybeSwitchPage(NW_WBXML_Writer_t* pW, NW_Uint8 page,
+ NW_WBXML_Writer_ItemType itemType,
+ NW_Bool* switched)
+{
+ NW_Status_t s = NW_STAT_SUCCESS;
+ NW_Uint8 token = NW_WBXML_SWITCH_PAGE; /* global so on all code pages */
+ NW_Bool changePage = 0;
+
+ *switched = NW_FALSE;
+ switch (itemType) {
+ case NW_WBXML_TAG:
+ changePage = (NW_Bool)(page != pW->tagCodePage);
+ if (changePage) {
+ pW->tagCodePage = page;
+ // WLIU_DEBUG: pW->cp_count++;
+ }
+ break;
+ case NW_WBXML_ATTRIBUTE:
+ changePage = (NW_Bool)(page != pW->attributeCodePage);
+ if (changePage) {
+ pW->attributeCodePage = page;
+ // WLIU_DEBUG: pW->cp_count++;
+ }
+ break;
+ default:
+ s = NW_STAT_FAILURE;
+ break;
+ }
+ if (changePage) {
+ s = NW_WBXML_Writer_Memcpy(pW, &token, 1);
+ // WLIU_DEBUG: RFileLogger::WriteFormat(_L("Browser"), _L("cp_count.txt"), EFileLoggingModeAppend, _L("=== cp_count: %x, pW->index: %x \n"), pW->cp_count, pW->index);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ s = NW_WBXML_Writer_Memcpy(pW, &page, 1);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ *switched = NW_TRUE;
+ }
+ return s;
+}
+
+EXPORT_C
+NW_Status_t
+NW_WBXML_Writer_Header(NW_WBXML_Writer_t* pW, NW_Uint8 WBXMLVersion,
+ NW_Uint32 publicIdentifier, NW_Uint32 charsetMIBEnum,
+ NW_Uint32 stringTableByteCount)
+
+{
+ NW_Status_t s;
+ NW_Uint32 byteCount;
+ NW_Uint8* pBuf;
+ NW_Encoder_StringTableIterator_t strTableIterator;
+
+ /* header = version publicid charset stringtable */
+
+ s = NW_WBXML_Writer_Memcpy(pW, &WBXMLVersion, 1);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ s = NW_WBXML_Writer_Multibyte(pW, publicIdentifier);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ s = NW_WBXML_Writer_Multibyte(pW, charsetMIBEnum);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ s = NW_WBXML_Writer_Multibyte(pW, stringTableByteCount);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (stringTableByteCount) {
+ NW_ASSERT(pW->stringTableIterateInit);
+ NW_ASSERT(pW->stringTableIterateNext);
+ s = (*(pW->stringTableIterateInit))(pW->pStringTableObject,
+ &strTableIterator);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ s = (*(pW->stringTableIterateNext))(&strTableIterator,
+ &byteCount, &pBuf);
+ while (s == NW_STAT_WBXML_ITERATE_MORE){
+ s = NW_WBXML_Writer_Memcpy(pW, pBuf, byteCount);
+ if (s != NW_STAT_SUCCESS){
+ return s;
+ }
+ s = (*(pW->stringTableIterateNext))(&strTableIterator,
+ &byteCount, &pBuf);
+ }
+ if (s != NW_STAT_WBXML_ITERATE_DONE){
+ return NW_STAT_FAILURE;
+ }
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/* if boolean "set" is 1 then "or" with mask, else "and" with ~mask */
+static
+NW_Status_t
+NW_WBXML_Writer_TagFlagOp(NW_WBXML_Writer_t* pW, NW_Uint32 index,
+ NW_Uint8 mask, NW_Bool set)
+{
+ NW_Status_t s = NW_STAT_SUCCESS;
+ if (!pW->sizing) {
+ if (index < pW->byteCount) {
+ if (set) {
+ (pW->pBuf)[index] |= mask;
+ } else {
+ (pW->pBuf)[index] &= ~mask;
+ }
+ } else {
+ s = NW_STAT_FAILURE;
+ }
+ }
+ return s;
+}
+
+EXPORT_C
+NW_Status_t
+NW_WBXML_Writer_TagSetContentFlag(NW_WBXML_Writer_t* pW, NW_Uint32 index)
+{
+ return NW_WBXML_Writer_TagFlagOp(pW, index, NW_WBXML_FLAGS_CONTENT, 1);
+}
+
+EXPORT_C
+NW_Status_t
+NW_WBXML_Writer_TagClearContentFlag(NW_WBXML_Writer_t* pW, NW_Uint32 index)
+{
+ return NW_WBXML_Writer_TagFlagOp(pW, index, NW_WBXML_FLAGS_CONTENT, 0);
+}
+
+EXPORT_C
+NW_Status_t
+NW_WBXML_Writer_TagSetAttributesFlag(NW_WBXML_Writer_t* pW, NW_Uint32 index)
+{
+ return NW_WBXML_Writer_TagFlagOp(pW, index, NW_WBXML_FLAGS_ATTRIBUTES, 1);
+}
+
+NW_Status_t
+NW_WBXML_Writer_TagClearAttributesFlag(NW_WBXML_Writer_t* pW, NW_Uint32 index)
+{
+ return NW_WBXML_Writer_TagFlagOp(pW, index, NW_WBXML_FLAGS_ATTRIBUTES, 0);
+}
+
+NW_Status_t
+NW_WBXML_Writer_TagToken(NW_WBXML_Writer_t* pW, NW_Uint16 fqToken,
+ NW_Uint32* pTagIndex)
+{
+ NW_Status_t s;
+ NW_Uint8 token;
+ NW_Uint8 page;
+ NW_Bool switched = NW_FALSE;
+
+ token = NW_WBXML_Dictionary_extractToken(fqToken);
+ page = NW_WBXML_Dictionary_extractPage(fqToken);
+
+ s = NW_WBXML_Writer_MaybeSwitchPage(pW, page, NW_WBXML_TAG, &switched);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ *pTagIndex = pW->index;
+ return NW_WBXML_Writer_Memcpy(pW, &token, 1); /* tag token */
+ }
+
+static
+NW_Status_t
+NW_WBXML_Writer_Literal(NW_WBXML_Writer_t* pW, NW_Uint32 stringTableIndex)
+ {
+ NW_Status_t s;
+
+ /* global in WBXML spec, so on all code pages */
+ static const NW_Uint8 literalToken = NW_WBXML_LITERAL;
+
+ s = NW_WBXML_Writer_Memcpy(pW, &literalToken, 1);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ return NW_WBXML_Writer_Multibyte(pW, stringTableIndex);
+ }
+
+/* This function will write to the extension string Table. The buffer
+ * "pBuf" is not NULL terminated. This can handle any type of encoding.
+ */
+
+
+static
+NW_Status_t
+NW_WBXML_Writer_StringTableLiteral2(NW_WBXML_Writer_t* pW,
+ NW_Uint32 charCount,
+ const NW_Uint8* pBuf,
+ NW_Uint32 encoding)
+{
+ NW_Uint32 byteCount = 0;
+ NW_Uint32 totalByteCount = 0;
+ NW_Ucs2 c;
+ NW_Uint32 numbytes;
+ NW_Uint8* literalName = NULL;
+ NW_Status_t s = NW_STAT_SUCCESS;
+ NW_Uint32 i =0;
+ NW_Uint32 tableIndex = 0;
+
+ if(pBuf == NULL)
+ {
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ if (pW->addToStringTable != NULL)
+ {
+
+ /*
+ * pBuf is not NULL terminated. So, need to use the following method.
+ */
+
+ numbytes = NW_String_readChar( (NW_Byte*) pBuf,&c,encoding);
+
+ /* Calculate the length of string. Also add the number of characters
+ * required for the NULL termination.
+ */
+
+ byteCount = (numbytes * charCount) ;
+
+ totalByteCount = byteCount + numbytes;
+
+
+ literalName = (NW_Uint8*) NW_Mem_Malloc(totalByteCount);
+
+ if (literalName != NULL)
+ {
+ (void)NW_Mem_memcpy(literalName, pBuf, byteCount );
+
+
+ for(i=0; i < numbytes; i++)
+ {
+ literalName[byteCount+i] = '\0';
+ }
+
+
+ /* During the PASS -1, the Literal is also added to the string table
+ * so the correct index of Literal can be found. The index of the literal
+ * is written in the WBXML buffer. The index is UINT 32 so (index = 01) and
+ * (index == 0x80) is encoded differently in the WBXML integer encoding. So,
+ * string table function calculates the correct index. So, the calling function
+ * should free the string table after PASS-1. Currently, PASS-1 and PASS-2 is
+ * used in the XML parser only.
+ */
+
+
+ s = (*pW->addToStringTable)(pW->pStringTableObject,
+ totalByteCount, literalName,
+ &tableIndex);
+ if (NW_STAT_IS_SUCCESS(s))
+ {
+ s = NW_WBXML_Writer_Literal(pW,tableIndex);
+ if(literalName != NULL)
+ {
+ NW_Mem_Free(literalName);
+ }
+ }
+ }/*end if (literalName != NULL) */
+ else
+ {
+ s = NW_STAT_OUT_OF_MEMORY;
+ }
+ } /*end if(pW->addToStringTable != NULL)*/
+
+return s;
+}/* NW_WBXML_Writer_StringTableLiteral2(..) */
+
+/* Examine the out parameter *pFound to see if the string was found in
+the string table. If it wasn't found, then it can't be written as a literal
+in WBXML. A failure return code means something else went wrong. The key
+part of this function is that it just queries the string table and doesn't
+try to force the string to be added to the string table. */
+static
+NW_Status_t
+NW_WBXML_Writer_StringTableLiteral(NW_WBXML_Writer_t* pW,
+ NW_Uint32 byteCount,
+ const NW_Uint8* pBuf,
+ NW_Bool* pFound)
+{
+ NW_Status_t s;
+ NW_Uint32 tableIndex = 0;
+
+ *pFound = 0;
+ if (pW->getStringTableOffset) {
+ s = (*pW->getStringTableOffset)(pW->pStringTableObject,
+ byteCount, pBuf,
+ pFound, &tableIndex);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ }
+ if (*pFound) {
+ /* global, so on all code pages */
+ static const NW_Uint8 tableRefToken = NW_WBXML_STR_T;
+
+ s = NW_WBXML_Writer_Memcpy(pW, &tableRefToken, 1);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ return NW_WBXML_Writer_Multibyte(pW, tableIndex);
+ }
+ /* *pFound indicates whether the string table entry was found so
+ we return success */
+ return NW_STAT_SUCCESS;
+}
+
+/* charCount should not include null termination character if any exists */
+EXPORT_C
+NW_Status_t
+NW_WBXML_Writer_TagString(NW_WBXML_Writer_t* pW, NW_Uint32 encoding,
+ NW_Uint32 charCount, NW_Uint32 byteCount,
+ NW_Uint8* pBuf, NW_Uint32* pTagIndex)
+{
+ NW_Status_t s;
+ NW_Uint16 fqToken;
+
+ (void) byteCount;
+
+ /* try token */
+ s = NW_WBXML_Dictionary_getTagToken2(pW->pTagDictionary, encoding,
+ charCount, pBuf, &fqToken);
+ if (NW_STAT_IS_SUCCESS(s)) {
+ return NW_WBXML_Writer_TagToken(pW, fqToken, pTagIndex);
+ }
+
+ /* try string table reference */
+ if (pW->addToStringTable != NULL)
+ {
+ *pTagIndex = pW->index;
+ s = NW_WBXML_Writer_StringTableLiteral2(pW, charCount, pBuf, encoding);
+ // Return on success or failure (out of memory, etc.) except
+ // NW_STAT_STR_TBL_OVERFLOW.
+ if (s != NW_STAT_STR_TBL_OVERFLOW)
+ {
+ return s;
+ }
+ }
+
+ /* no token, not in string table...try to encode as the unknown tag */
+ s = NW_WBXML_Dictionary_getTagToken2(pW->pTagDictionary, zzzunknownEncoding,
+ zzzunknownCharCount,
+ (NW_Uint8*)&zzzunknown[0],
+ &fqToken);
+ if (NW_STAT_IS_SUCCESS(s))
+ {
+ return NW_WBXML_Writer_TagToken(pW, fqToken, pTagIndex);
+ }
+
+ /* getting here means no token, no string table entry
+ and the reserved unknown tag is missing from the dictionary */
+ NW_ASSERT(s == NW_STAT_SUCCESS); /* force error to be caught here */
+ return s;
+}
+
+static
+NW_Status_t
+NW_WBXML_Writer_InlineString(NW_WBXML_Writer_t* pW,
+ NW_Uint32 encoding,
+ NW_Uint32 byteCount,
+ const NW_Uint8* pTextIn)
+{
+ NW_Uint8* pTextOut = (NW_Uint8*)pTextIn; /* default */
+ NW_Status_t s;
+ NW_Bool nullTerminated;
+ NW_Uint8 token = NW_WBXML_STR_I; /* global so on all code pages */
+
+ nullTerminated = NW_FALSE;
+
+ s = NW_WBXML_Writer_Memcpy(pW, &token, 1);
+ if (NW_STAT_IS_FAILURE(s)) {
+ if (pTextOut != pTextIn) {
+ NW_Mem_Free(pTextOut);
+ }
+ return s;
+ }
+ s = NW_WBXML_Writer_Memcpy(pW, pTextOut, byteCount);
+ if (NW_STAT_IS_FAILURE(s)) {
+ if (pTextOut != pTextIn) {
+ NW_Mem_Free(pTextOut);
+ }
+ return s;
+ }
+ if (pTextOut != pTextIn) {
+ NW_Mem_Free(pTextOut);
+ }
+
+ /* test string to see if written bytes are already null terminated */
+ /* FUTURE MISSING UTILITY SUPPORT
+ this char encoding API isn't implemented yet
+ NW_Char_SimpleString_t n;
+ s = NW_CharEncoding_nullTermination(encoding, &n);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ test if null termination already written and if not...
+ s = NW_WBXML_Writer_Memcpy(pW, n.buf, n.byteCount);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ */
+ /* BUG HACK BEGIN
+ Should not assume null termination missing but this works
+ with the XMLP client. Remove this when char encoding
+ null termination utility support is available */
+
+ if (encoding == HTTP_iso_10646_ucs_2){
+ /* just look for any 1 bits in the UCS2 char */
+ NW_Uint8 lastChar = (pTextIn + byteCount)[-1];
+ lastChar |= (pTextIn + byteCount)[-2];
+ if (lastChar == 0){
+ nullTerminated = NW_TRUE;
+ }
+ }
+ else if ((encoding == HTTP_iso_8859_1) ||
+ (encoding == HTTP_utf_8) ||
+ (encoding == HTTP_us_ascii))
+ {
+ NW_Uint8 lastChar = (pTextIn + byteCount)[-1];
+ if (lastChar == 0){
+ nullTerminated = NW_TRUE;
+ }
+ }
+ else{
+ NW_ASSERT(0);
+ }
+ if (!nullTerminated)
+ {
+ token = 0;
+ s = NW_WBXML_Writer_Memcpy(pW, &token, 1);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (encoding == HTTP_iso_10646_ucs_2) {
+ s = NW_WBXML_Writer_Memcpy(pW, &token, 1);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ }
+ }
+ /* BUG HACK END */
+ return NW_STAT_SUCCESS;
+}
+
+/*
+1. charCount should not include null termination character if any exists
+2. if there is an attribute name but no value use valueCharCount==0,
+ valueByteCount==0 and pValue==NULL
+*/
+EXPORT_C
+NW_Status_t
+NW_WBXML_Writer_AttributeAndValue2(NW_WBXML_Writer_t* pW, NW_Uint32 encoding,
+ NW_Uint32 nameCharCount, NW_Uint8* pName,
+ NW_Uint32 valueCharCount, NW_Uint32 valueByteCount,
+ NW_Uint8* pValue,
+ NW_Uint32* cp_count)
+{
+ /*
+ Note: According to the WBXML specification, attribute codes (tokens) may
+ encode all or a prefix of the attribute value as well as the attribute name.
+ The implementation here is simpler, it assumes that attribute names are
+ encoded separately from attribute values.
+ */
+ NW_Status_t s;
+ NW_Uint16 fqToken;
+ NW_Uint8 token;
+ NW_Uint8 page;
+ NW_Bool switched = NW_FALSE;
+ NW_Bool extStrTbl = NW_FALSE;
+
+ *cp_count = 0;
+ /* Note: This dictionary lookup function is insufficient to look up
+ combined attribute and value. To do that we must be able to pass both
+ the name and value and get both a return token and a character count
+ of the value characters represented by the token so we can tell if there
+ are remaing value characters to write. */
+ s = NW_WBXML_Dictionary_getAttributeNameToken(pW->pAttributeDictionary,
+ encoding,
+ nameCharCount, pName, &fqToken);
+ if (NW_STAT_IS_FAILURE(s)) {
+ /* failure here means that we should encode as the reserved unknown
+ name, so force that */
+ fqToken = NW_WBXML_LITERAL;
+ }
+ token = NW_WBXML_Dictionary_extractToken(fqToken);
+ page = NW_WBXML_Dictionary_extractPage(fqToken);
+
+
+ if ((token & NW_WBXML_MASK_TAG_ID) == NW_WBXML_LITERAL)
+ {
+
+ /* If strig table is supported then the attribute name not found
+ * in the dictionary is stored in string table a LITRAL otherwise
+ * the workaround is to encode the name as a reserved unknown.
+ */
+
+ if (pW->getStringTableOffset)
+ {
+ s = NW_WBXML_Writer_StringTableLiteral2(pW,nameCharCount,pName, encoding);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return s;
+ }
+ extStrTbl = NW_TRUE;
+ }//end if(pW->getStringTableOffset)
+ else
+ {
+
+ s = NW_WBXML_Dictionary_getAttributeNameToken(pW->pAttributeDictionary,
+ zzzunknownEncoding,
+ zzzunknownCharCount,
+ (NW_Uint8*)&zzzunknown[0],
+ &fqToken);
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ /* failure here means the reserved unknown name is missing from
+ the dictionary */
+ NW_ASSERT(s==NW_STAT_SUCCESS);/*force error to be caught here*/
+ return s;
+ }
+ token = NW_WBXML_Dictionary_extractToken(fqToken);
+ page = NW_WBXML_Dictionary_extractPage(fqToken);
+ }//end else
+ }//end if ((token & NW_WBXML_MASK_TAG_ID) == NW_WBXML_LITERAL)
+
+ //
+ //If attribute name is found in the dictionary only then check for the
+ // Page switching.
+ //
+
+ if(!extStrTbl)
+ {
+
+ s = NW_WBXML_Writer_MaybeSwitchPage(pW, page, NW_WBXML_ATTRIBUTE, &switched);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (switched)
+ *cp_count = *cp_count + 1 ;
+ s = NW_WBXML_Writer_Memcpy(pW, &token, 1); /* attribute name token */
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ }//end if(!extStrTbl)
+
+
+ if ((valueCharCount == 0) && (pValue != NULL))
+ {
+ token = NW_WBXML_STR_I; /* global so on all code pages */
+
+ s = NW_WBXML_Writer_Memcpy(pW, &token, 1);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ token = 0;
+ s = NW_WBXML_Writer_Memcpy(pW, &token, 1);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (encoding == HTTP_iso_10646_ucs_2) {
+ s = NW_WBXML_Writer_Memcpy(pW, &token, 1);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ }
+ }
+ else
+ {
+ if ((valueCharCount != 0) && (pValue != NULL))
+ {
+ s = NW_WBXML_Dictionary_getAttributeValueToken(pW->pAttributeDictionary,
+ encoding,
+ valueCharCount, pValue,
+ &fqToken);
+ if (NW_STAT_IS_FAILURE(s)) {
+ /* failure means couldn't find a token, force to literal */
+ fqToken = NW_WBXML_LITERAL; /* page is irrelevant here */
+ }
+ token = NW_WBXML_Dictionary_extractToken(fqToken);
+ page = NW_WBXML_Dictionary_extractPage(fqToken);
+ if ((token & NW_WBXML_MASK_TAG_ID) == NW_WBXML_LITERAL)
+ {
+ s = NW_WBXML_Writer_InlineString(pW, encoding,
+ valueByteCount, pValue);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ } else {
+ s = NW_WBXML_Writer_MaybeSwitchPage(pW, page,
+ NW_WBXML_ATTRIBUTE, &switched);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (switched)
+ *cp_count = *cp_count + 1 ;
+ s = NW_WBXML_Writer_Memcpy(pW, &token, 1);/*attr value token*/
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ }
+ }
+ }
+ return NW_STAT_SUCCESS;
+}
+
+EXPORT_C
+NW_Status_t
+NW_WBXML_Writer_AttributeAndValue(NW_WBXML_Writer_t* pW, NW_Uint32 encoding,
+ NW_Uint32 nameCharCount, NW_Uint8* pName,
+ NW_Uint32 valueCharCount, NW_Uint32 valueByteCount,
+ NW_Uint8* pValue)
+{
+ NW_Uint32 cp_cnt = 0;
+ return NW_WBXML_Writer_AttributeAndValue2(pW, encoding, nameCharCount, pName, valueCharCount,
+ valueByteCount, pValue, &cp_cnt);
+
+}
+
+NW_Status_t
+NW_WBXML_Writer_AttributeNameString(NW_WBXML_Writer_t* pW, NW_Uint32 encoding,
+ NW_Uint32 nameCharCount,
+ NW_Uint32 nameByteCount, NW_Uint8* pName)
+{
+ NW_Status_t s;
+ NW_Uint16 fqToken;
+
+ (void) nameByteCount;
+
+ /* try token */
+ s = NW_WBXML_Dictionary_getAttributeToken2(pW->pAttributeDictionary,
+ encoding, nameCharCount,
+ pName, &fqToken,
+ NW_TRUE /* isName */);
+ if (NW_STAT_IS_SUCCESS(s)) {
+ return NW_WBXML_Writer_AttributeToken(pW, fqToken);
+ }
+
+ /* try string table */
+ if (pW->addToStringTable != NULL) {
+ s = NW_WBXML_Writer_StringTableLiteral2(pW, nameCharCount, pName, encoding);
+ return s;
+
+ }
+ /* no token, no string table so try unknown token */
+ s = NW_WBXML_Dictionary_getAttributeToken2(pW->pAttributeDictionary,
+ zzzunknownEncoding,
+ zzzunknownCharCount,
+ (NW_Uint8*)&zzzunknown[0],
+ &fqToken,
+ NW_TRUE /* isName */);
+ if (NW_STAT_IS_SUCCESS(s)) {
+ return NW_WBXML_Writer_AttributeToken(pW, fqToken);
+ }
+ NW_ASSERT(NW_STAT_IS_SUCCESS(s)); /* force debug to stop here */
+ return NW_STAT_FAILURE;
+}
+
+NW_Status_t
+NW_WBXML_Writer_AttributeToken(NW_WBXML_Writer_t* pW,
+ NW_Uint16 fqToken)
+
+{
+ NW_Status_t s;
+ NW_Uint8 token;
+ NW_Uint8 page;
+ NW_Bool switched = NW_FALSE;
+
+ token = NW_WBXML_Dictionary_extractToken(fqToken);
+ page = NW_WBXML_Dictionary_extractPage(fqToken);
+
+ s = NW_WBXML_Writer_MaybeSwitchPage(pW, page, NW_WBXML_ATTRIBUTE, &switched);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ return NW_WBXML_Writer_Memcpy(pW, &token, 1); /* attribute token */
+}
+
+NW_Status_t
+NW_WBXML_Writer_Entity(NW_WBXML_Writer_t* pW,
+ NW_Uint32 entity)
+{
+ NW_Status_t s;
+ static const NW_Uint8 entityToken = NW_WBXML_ENTITY;
+
+ s = NW_WBXML_Writer_Memcpy(pW, &entityToken, 1);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ return NW_WBXML_Writer_Multibyte(pW, entity);
+}
+
+/*
+This is a helper function for the EXT_T_[0,1,2] forms for these extensions.
+*/
+NW_Status_t
+NW_WBXML_Writer_ExtensionUseStringTable(NW_WBXML_Writer_t* pW,
+ NW_Uint16 fqToken,
+ NW_Uint32 byteCount,
+ NW_Uint8* pBuf)
+{
+ NW_Uint32 tableIndex;
+ NW_Status_t s;
+
+ if (pW->addToStringTable != NULL) {
+ s = (*pW->addToStringTable)(pW->pStringTableObject,
+ byteCount, pBuf, &tableIndex);
+ if (NW_STAT_IS_SUCCESS(s)) {
+ return NW_WBXML_Writer_Extension(pW, fqToken, tableIndex, 0, NULL);
+ }
+ }
+ return NW_STAT_FAILURE;
+}
+
+/*
+There are three type of extensions:
+
+1. one of three possible single byte tokens
+ NW_WBXML_EXT_[0,1,2]
+2. an extension token followed by a multibyte encoded NW_Uint32 value
+ NW_WBXML_EXT_T_[0,1,2] multibyte(anonymousValue)
+3. an extension token followed by an in-line string
+ NW_WBXML_EXT_I_[0,1,2] null-terminated-string
+
+This function handles all three cases so you have to pass the appropriate
+arguments for each case:
+
+1. fqToken should be one of NW_WBXML_EXT_[0,1,2] (with any page value)
+ and anonymousValue, byteCount and pBuf should be 0 or NULL
+
+2. fqToken should be one of NW_WBXML_EXT_T_[0,1,2] (with any page value),
+ anonymousValue should be the value to multibyte encode
+ and byteCount and pBuf should be 0 and NULL
+
+3. fqToken should be one of NW_WBXML_EXT_I_[0,1,2] (with any page value),
+ byteCount should be the byte length of the null terminated string
+ pointed to by pBuf
+ and anonymousValue is ignored
+*/
+NW_Status_t
+NW_WBXML_Writer_Extension(NW_WBXML_Writer_t* pW,
+ NW_Uint16 fqToken,
+ NW_Uint32 anonymousValue,
+ NW_Uint32 byteCount,
+ NW_Uint8* pBuf)
+{
+ NW_Status_t s;
+ NW_Uint8 token = (NW_Uint8)(fqToken & NW_WBXML_MASK_TOKEN);
+
+ s = NW_WBXML_Writer_Memcpy(pW, &token, 1);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+
+ switch (token) {
+ case NW_WBXML_EXT_0:
+ case NW_WBXML_EXT_1:
+ case NW_WBXML_EXT_2:
+ NW_ASSERT(byteCount == 0);
+ NW_ASSERT(pBuf == NULL);
+ break;
+ case NW_WBXML_EXT_T_0:
+ case NW_WBXML_EXT_T_1:
+ case NW_WBXML_EXT_T_2:
+ NW_ASSERT(byteCount == 0);
+ NW_ASSERT(pBuf == NULL);
+ s = NW_WBXML_Writer_Multibyte(pW, anonymousValue);
+ break;
+ case NW_WBXML_EXT_I_0:
+ case NW_WBXML_EXT_I_1:
+ case NW_WBXML_EXT_I_2:
+ NW_ASSERT(byteCount > 0);
+ NW_ASSERT(pBuf != NULL);
+ s = NW_WBXML_Writer_Memcpy(pW, pBuf, byteCount);
+ break;
+ default:
+ NW_ASSERT(!"wrong token");
+ return NW_STAT_FAILURE;
+ }
+ return s;
+}
+
+EXPORT_C
+NW_Status_t
+NW_WBXML_Writer_Opaque(NW_WBXML_Writer_t* pW, NW_Uint32 byteCount,
+ NW_Uint8* pBuf)
+{
+ NW_Status_t s;
+ NW_Uint8 token = NW_WBXML_OPAQUE; /* global so on all code pages */
+ s = NW_WBXML_Writer_Memcpy(pW, &token, 1);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ s = NW_WBXML_Writer_Multibyte(pW, byteCount);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ s = NW_WBXML_Writer_Memcpy(pW, pBuf, byteCount);
+ return s;
+}
+
+EXPORT_C
+NW_Status_t
+NW_WBXML_Writer_Text(NW_WBXML_Writer_t* pW, NW_Uint32 encoding,
+ NW_Uint32 byteCount, const NW_Uint8* pText)
+{
+ NW_Status_t s;
+ NW_Bool found = 0;
+
+ /* try string table */
+ s = NW_WBXML_Writer_StringTableLiteral(pW, byteCount, pText, &found);
+ if (NW_STAT_IS_FAILURE(s) || found) {
+ return s;
+ }
+ /* back off to inline string */
+ return NW_WBXML_Writer_InlineString(pW, encoding, byteCount, pText);
+}
+
+EXPORT_C
+NW_Status_t
+NW_WBXML_Writer_PI(NW_WBXML_Writer_t* pW)
+{
+ NW_Uint8 piToken = 0x43; /* global, so on all code pages */
+ return NW_WBXML_Writer_Memcpy(pW, &piToken, 1);
+}
+
+
+EXPORT_C
+NW_Status_t
+NW_WBXML_Writer_End(NW_WBXML_Writer_t* pW)
+{
+ NW_Uint8 endToken = NW_WBXML_END; /* global, so on all code pages */
+ return NW_WBXML_Writer_Memcpy(pW, &endToken, 1);
+}
+
+EXPORT_C
+void
+NW_WBXML_Writer_Initialize(NW_WBXML_Writer_t* pW,
+ NW_Uint32 byteCount, NW_Uint8* pBuf,
+ NW_WBXML_Writer_GrowBuf_t growBufCallback,
+ NW_WBXML_Dictionary_t* pTagDictionary,
+ NW_WBXML_Dictionary_t* pAttributeDictionary,
+ NW_WBXML_Writer_GetStringTableOffset_t getStringTableOffset,
+ NW_WBXML_Writer_AddToStringTable_t addToStringTable,
+ void* pStringTableObject,
+ NW_WBXML_Writer_StringTableIterateInit_t stringTableIterateInit,
+ NW_WBXML_Writer_StringTableIterateNext_t stringTableIterateNext,
+ NW_Bool sizing)
+{
+ pW->index = 0;
+ pW->byteCount = byteCount;
+ pW->pBuf = pBuf;
+ pW->growBufCallback = growBufCallback;
+ pW->pTagDictionary = pTagDictionary;
+ pW->pAttributeDictionary = pAttributeDictionary;
+ pW->getStringTableOffset = getStringTableOffset;
+ pW->addToStringTable = addToStringTable;
+ pW->pStringTableObject = pStringTableObject;
+ pW->stringTableIterateInit = stringTableIterateInit;
+ pW->stringTableIterateNext = stringTableIterateNext;
+ pW->tagCodePage = 0;
+ pW->attributeCodePage = 0;
+ pW->sizing = sizing;
+ //WLIU_DEBUG: pW->cp_count = 0;
+}
+
+void
+NW_WBXML_Writer_SetToSizing(NW_WBXML_Writer_t* pW)
+{
+ pW->index = 0;
+ pW->tagCodePage = 0; /* TBD BUG ? will this give correct code pages */
+ pW->attributeCodePage = 0;/* TBD BUG ? will this give correct code pages */
+ pW->sizing = 1;
+ // WLIU_DEBUG: pW->cp_count = 0;
+}
+
+
+void
+NW_WBXML_Writer_SetToWrite(NW_WBXML_Writer_t* pW, NW_Uint32 byteCount, NW_Uint8* pBuf)
+{
+ pW->index = 0;
+ pW->byteCount = byteCount;
+ pW->pBuf = pBuf;
+ pW->tagCodePage = 0; /* TBD BUG ? will this give correct code pages */
+ pW->attributeCodePage = 0;/* TBD BUG ? will this give correct code pages */
+ pW->sizing = 0;
+ // WLIU_DEBUG: pW->cp_count = 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/encoder/src/domencoder.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,513 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_encoder_domencoder.h>
+#include <xml/cxml/nw_encoder_stringtable.h>
+#include <xml/cxml/nw_dom_element.h>
+#include <xml/cxml/nw_dom_text.h>
+#include <xml/cxml/nw_dom_attribute.h>
+
+/* ------------------------------------------------------------------------- *
+ private methods
+ * ------------------------------------------------------------------------- */
+
+/*
+* Encodes an Attribute Val
+* Returns NW_STAT_BAD_INPUT_PARAM
+* NW_STAT_OUT_OF_MEMORY
+* NW_STAT_SUCCESS
+*/
+/* ------------------------------------------------------------------------- */
+static
+NW_Status_t
+NW_Encoder_encodeAttrVal(NW_Encoder_t * encoder, NW_DOM_AttrVal_t *val)
+{
+ NW_Status_t status;
+
+ if ((encoder == NULL) || (val == NULL)){
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+ status = NW_STAT_SUCCESS;
+ switch(NW_DOM_AttrVal_getType(val))
+ {
+ case NW_DOM_ATTR_VAL_STRING:
+ {
+ status = NW_WBXML_Writer_Text(&encoder->writer, encoder->encoding,
+ val->component.string.length,
+ val->component.string.storage);
+ break;
+ }
+ case NW_DOM_ATTR_VAL_EXTENSION:
+ {
+ NW_Uint8 t; /* 8-bit token */
+ NW_String_t str;
+
+ t = (NW_Uint8)(val->component.ext.token);
+ if ((t == NW_WBXML_EXT_0)
+ || (t == NW_WBXML_EXT_1)
+ || (t == NW_WBXML_EXT_2)) {
+ status
+ = NW_WBXML_Writer_Extension(&encoder->writer,
+ (NW_Uint16)(val->component.ext.token),
+ 0, 0, NULL);
+ } else if ((t == NW_WBXML_EXT_T_0)
+ || (t == NW_WBXML_EXT_T_1)
+ || (t == NW_WBXML_EXT_T_2)) {
+ NW_ASSERT((val->component.ext.type
+ == NW_TINYDOM_EXTENSION_TYPE_NORMAL)
+ || (val->component.ext.type
+ == NW_TINYDOM_EXTENSION_TYPE_EXT_T_INTEGER));
+ if (val->component.ext.type == NW_TINYDOM_EXTENSION_TYPE_NORMAL) {
+ NW_Uint16 token = NW_DOM_TextItem_getExtension(val, &str);
+ status
+ = NW_WBXML_Writer_ExtensionUseStringTable(&encoder->writer,
+ token,
+ str.length,
+ str.storage);
+ } else {
+ status = NW_WBXML_Writer_Extension(&encoder->writer,
+ (NW_Uint16)(val->component.ext.token),
+ val->component.ext.value.x,
+ 0, NULL);
+ }
+ } else if ((t == NW_WBXML_EXT_I_0)
+ || (t == NW_WBXML_EXT_I_1)
+ || (t == NW_WBXML_EXT_I_2)) {
+ NW_Uint16 token = NW_DOM_TextItem_getExtension(val, &str);
+ status = NW_WBXML_Writer_Extension(&encoder->writer, token,
+ 0, str.length, str.storage);
+ } else {
+ status = NW_STAT_FAILURE;
+ }
+ break;
+ }
+ case NW_DOM_ATTR_VAL_ENTITY:
+ {
+ NW_Uint32 entity;
+ entity = NW_DOM_TextItem_getEntity(val);
+ status = NW_WBXML_Writer_Entity(&encoder->writer, entity);
+ break;
+ }
+ case NW_DOM_ATTR_VAL_OPAQUE:
+ {
+ NW_Uint32 length;
+ NW_Byte *data;
+ data = NW_DOM_AttrVal_getOpaque(val, &length);
+ status = NW_WBXML_Writer_Opaque(&encoder->writer, length, data);
+ break;
+ }
+ case NW_DOM_ATTR_VAL_TOKEN:
+ {
+ NW_Uint16 fqToken = NW_DOM_AttrVal_getToken(val);
+ status = NW_WBXML_Writer_AttributeToken(&encoder->writer, fqToken);
+ break;
+ }
+ default:
+ return NW_STAT_FAILURE;
+ }
+ return status;
+}
+
+/*
+* Encodes an attribute
+* Returns NW_STAT_BAD_INPUT_PARAM
+* NW_STAT_OUT_OF_MEMORY
+* NW_STAT_SUCCESS
+*/
+/* ------------------------------------------------------------------------- */
+static
+NW_Status_t
+NW_Encoder_encodeAttribute(NW_Encoder_t * encoder,
+ NW_DOM_AttributeHandle_t * attrHandle)
+{
+ NW_Status_t status;
+ NW_DOM_AttrVal_t attrVal;
+ NW_Uint16 fqToken = 0;
+ NW_Uint8 token = 0;
+ NW_Ucs2 c;
+ NW_Uint32 numbytes;
+
+ fqToken = NW_DOM_AttributeHandle_getToken(attrHandle);
+
+ if ((encoder == NULL) || (attrHandle == NULL)){
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+ token = (NW_Uint8)(fqToken & NW_WBXML_MASK_TOKEN);
+
+ if (token == NW_WBXML_LITERAL)
+ {
+ NW_String_t attributeName;
+ if (NW_DOM_AttributeHandle_getName(attrHandle, &attributeName)
+ != NW_STAT_SUCCESS){
+ return NW_STAT_FAILURE;
+ }
+
+ numbytes = NW_String_readChar(attributeName.storage, &c, encoder->encoding);
+
+ status = NW_WBXML_Writer_AttributeNameString(&encoder->writer,
+ encoder->encoding,
+ (attributeName.length - numbytes)/numbytes,
+ attributeName.length,
+ attributeName.storage);
+ }
+ else{
+ status = NW_WBXML_Writer_AttributeToken(&encoder->writer, fqToken);
+ }
+
+ while (NW_DOM_AttributeHandle_getNextVal(attrHandle, &attrVal)
+ == NW_STAT_WBXML_ITERATE_MORE)
+ {
+ status = NW_Encoder_encodeAttrVal(encoder, &attrVal);
+ if (status != NW_STAT_SUCCESS)
+ return status;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/*
+* Encodes an element node
+* Returns NW_STAT_BAD_INPUT_PARAM
+* NW_STAT_OUT_OF_MEMORY
+* NW_STAT_SUCCESS
+*/
+/* ------------------------------------------------------------------------- */
+static
+NW_Status_t
+NW_Encoder_encodeElementNode(NW_Encoder_t * encoder, NW_DOM_ElementNode_t * e)
+{
+ NW_Status_t status;
+ NW_DOM_AttributeListIterator_t listIterator;
+ NW_DOM_AttributeHandle_t attrHandle;
+ NW_Uint16 fqToken;
+ NW_Uint8 token;
+ NW_Uint32 tagIndex;
+ NW_Int32 charCount;
+
+ if ((encoder == NULL) || (e == NULL)){
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+ fqToken = NW_DOM_ElementNode_getTagToken(e);
+ token = (NW_Uint8)(fqToken & NW_WBXML_MASK_TOKEN);
+ if (token == NW_WBXML_LITERAL)
+ {
+ NW_String_t elementName;
+
+ if (NW_DOM_ElementNode_getTagName(e, &elementName) != NW_STAT_SUCCESS){
+ return NW_STAT_FAILURE;
+ }
+
+ /*Get the char count */
+
+ charCount = NW_String_charBuffGetLength(elementName.storage,
+ encoder->encoding,
+ &(elementName.length) );
+
+ status = NW_WBXML_Writer_TagString(&encoder->writer, encoder->encoding, charCount,
+ elementName.length, elementName.storage, &tagIndex);
+ /* Do not free literal element here as this will be freed when literal table
+ * will be freed.
+ */
+
+ // NW_String_delete(&elementName);
+ }
+ else{
+ status = NW_WBXML_Writer_TagToken(&encoder->writer, fqToken, &tagIndex);
+ NW_ASSERT(status == NW_STAT_SUCCESS);
+ }
+
+ if (NW_DOM_Node_getFirstChild(e)){
+ status = NW_WBXML_Writer_TagSetContentFlag(&encoder->writer, tagIndex);
+ NW_ASSERT(status == NW_STAT_SUCCESS);
+ }
+ if (NW_DOM_ElementNode_hasAttributes(e)){
+ status = NW_WBXML_Writer_TagSetAttributesFlag(&encoder->writer, tagIndex);
+ NW_ASSERT(status == NW_STAT_SUCCESS);
+ }
+
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ if (NW_DOM_ElementNode_hasAttributes(e))
+ {
+ status = NW_DOM_ElementNode_getAttributeListIterator(e, &listIterator);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ while (NW_DOM_AttributeListIterator_getNextAttribute(&listIterator, &attrHandle)
+ == NW_STAT_WBXML_ITERATE_MORE)
+ {
+ NW_Encoder_encodeAttribute(encoder, &attrHandle);
+ }
+ return NW_WBXML_Writer_End(&encoder->writer);
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/*
+* Encodes a TextNode
+* Returns NW_STAT_BAD_INPUT_PARAM
+* NW_STAT_OUT_OF_MEMORY
+* NW_STAT_SUCCESS
+*/
+/* ------------------------------------------------------------------------- */
+static
+NW_Status_t
+NW_Encoder_encodeTextNode (NW_Encoder_t * encoder, NW_DOM_TextNode_t * textNode)
+{
+ NW_DOM_TextItemIterator_t textIter;
+ NW_DOM_TextItem_t item;
+ NW_Status_t status;
+
+ if ((encoder == NULL) || (textNode == NULL))
+ return NW_STAT_BAD_INPUT_PARAM;
+
+ status = NW_DOM_TextNode_getTextItemIterator(textNode, &textIter);
+ while (NW_DOM_TextItemIterator_getNextTextItem(&textIter, &item)
+ == NW_STAT_WBXML_ITERATE_MORE)
+ {
+ status = NW_Encoder_encodeAttrVal(encoder, &item);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/*
+* Encodes a Node (recursive)
+* Returns NW_STAT_BAD_INPUT_PARAM
+* NW_STAT_OUT_OF_MEMORY
+* NW_STAT_SUCCESS
+*/
+/* ------------------------------------------------------------------------- */
+static
+NW_Status_t
+NW_Encoder_encodeNode(NW_Encoder_t * encoder, NW_DOM_Node_t *node)
+{
+ NW_Uint32 type = NW_DOM_Node_getNodeType(node);
+
+ if ((encoder == NULL) || (node == NULL))
+ return NW_STAT_BAD_INPUT_PARAM;
+
+ switch (type)
+ {
+ case NW_DOM_ELEMENT_NODE:
+ {
+ NW_Encoder_encodeElementNode(encoder, node);
+ if (NW_DOM_Node_getFirstChild(node))
+ {
+ NW_Encoder_encodeNode(encoder, NW_DOM_Node_getFirstChild(node));
+ /* Encode the tag terminator */
+ NW_WBXML_Writer_End(&encoder->writer);
+ }
+ if (NW_DOM_Node_getNextSibling(node))
+ NW_Encoder_encodeNode(encoder, NW_DOM_Node_getNextSibling(node));
+ }
+ break;
+
+ case NW_DOM_TEXT_NODE:
+ NW_Encoder_encodeTextNode(encoder, node);
+
+ if (NW_DOM_Node_getNextSibling(node)){
+ NW_Encoder_encodeNode (encoder, NW_DOM_Node_getNextSibling(node));
+ }
+ break;
+
+ case NW_DOM_PROCESSING_INSTRUCTION_NODE:
+ /* TODO: Pi Node support code */
+ if (NW_DOM_Node_getNextSibling(node))
+ NW_Encoder_encodeNode (encoder, NW_DOM_Node_getNextSibling(node));
+
+ break;
+
+ default:
+ if (NW_DOM_Node_getNextSibling(node))
+ NW_Encoder_encodeNode (encoder, NW_DOM_Node_getNextSibling(node));
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/*
+* Encodes the header of document (version, publicid, docType, charset,
+* and string table
+* Returns NW_STAT_BAD_INPUT_PARAM
+* NW_STAT_OUT_OF_MEMORY
+* NW_STAT_SUCCESS
+*/
+/* ------------------------------------------------------------------------- */
+NW_Status_t
+NW_Encoder_encodeDocHeader(NW_Encoder_t * encoder, NW_DOM_DocumentNode_t * doc)
+{
+ NW_Uint8 version;
+ NW_Uint32 publicid;
+ NW_Uint32 byteLength;
+
+ version = NW_DOM_DocumentNode_getVersion(doc);
+ publicid = NW_DOM_DocumentNode_getPublicIdAsNumber(doc);
+ if (encoder->enableStringTable == NW_TRUE) {
+ byteLength = NW_Encoder_StringTable_getTotalBytes(encoder->stringTable);
+ } else {
+ byteLength = 0;
+ }
+
+ /* This call also encodes the string table, if any is used. */
+ return NW_WBXML_Writer_Header(&encoder->writer, version, publicid,
+ encoder->encoding, byteLength);
+}
+
+/* ------------------------------------------------------------------------- *
+ public methods
+ * ------------------------------------------------------------------------- */
+
+/*
+* Initializes an encoder
+* Returns NW_STAT_BAD_INPUT_PARAM
+* NW_STAT_OUT_OF_MEMORY
+* NW_STAT_SUCCESS
+*/
+/* ------------------------------------------------------------------------- */
+NW_Status_t
+NW_Encoder_initialize(NW_Encoder_t *encoder, NW_Bool enableStringTable)
+{
+ if (encoder == NULL){
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+ encoder->encoding = 0;
+ encoder->enableStringTable = enableStringTable;
+ encoder->stringTable = NULL;
+ if (enableStringTable == NW_TRUE) {
+ encoder->stringTable = NW_Encoder_StringTable_new();
+ if (encoder->stringTable == NULL) {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/*
+* Encodes the DOM document represented by document node
+* Returns NW_STAT_BAD_INPUT_PARAM
+* NW_STAT_OUT_OF_MEMORY
+* NW_STAT_SUCCESS
+*/
+/* ------------------------------------------------------------------------- */
+EXPORT_C NW_Status_t
+NW_Encoder_encodeWBXML(NW_Encoder_t* encoder,
+ NW_DOM_DocumentNode_t * docNode,
+ NW_Bool enableStringTable,
+ NW_Uint32 *length,
+ NW_Byte **buffer)
+{
+ NW_Status_t status;
+ NW_DOM_ElementNode_t *elem;
+ NW_Uint32 publicid;
+ NW_WBXML_Dictionary_t* dictionary;
+
+ if ((encoder == NULL) || (docNode == NULL)){
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ status = NW_Encoder_initialize(encoder, enableStringTable);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ encoder->encoding = NW_DOM_DocumentNode_getCharacterEncoding(docNode);
+ elem = NW_DOM_DocumentNode_getDocumentElement(docNode);
+ publicid = NW_DOM_DocumentNode_getPublicIdAsNumber(docNode);
+
+ /* initialize WBXMLWriter */
+ if (publicid != 0){
+ dictionary = NW_WBXML_Dictionary_getByPublicId(publicid);
+ }
+ else
+ {
+ NW_String_t docType;
+
+ status = NW_DOM_DocumentNode_getPublicId(docNode, &docType);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ dictionary = NW_WBXML_Dictionary_getByDocType(&docType, encoder->encoding);
+ }
+ if (enableStringTable == NW_TRUE) {
+ /* assuming that same dictionary is used for both attributes and tags */
+ status = NW_Encoder_StringTable_createFromDOM(encoder->stringTable,
+ docNode,
+ dictionary);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ }
+
+ /* Set up the writer for a sizing pass */
+ NW_WBXML_Writer_SetToSizing(&encoder->writer);
+
+ NW_WBXML_Writer_Initialize(&encoder->writer,
+ 0,
+ NULL,
+ NULL,
+ dictionary,
+ dictionary,
+ ((enableStringTable == NW_TRUE) ?
+ NW_Encoder_StringTable_getStringTableOffset :
+ NULL),
+ ((enableStringTable == NW_TRUE) ?
+ NW_Encoder_StringTable_addToStringTable :
+ NULL),
+ ((enableStringTable == NW_TRUE) ?
+ encoder->stringTable :
+ NULL),
+ ((enableStringTable == NW_TRUE) ?
+ NW_Encoder_StringTable_StringTableIterateInit :
+ NULL),
+ ((enableStringTable == NW_TRUE) ?
+ NW_Encoder_StringTable_StringTableIterateNext :
+ NULL),
+ NW_TRUE /* sizing only */);
+
+ status = NW_Encoder_encodeDocHeader(encoder, docNode);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ status = NW_Encoder_encodeNode(encoder, elem);
+
+ /* Allocate a buffer of the correct size */
+ *length = (CXML_Vector_Metric_t)NW_WBXML_Writer_GetSize(&encoder->writer);
+ *buffer = (NW_Byte*)NW_Mem_Malloc(*length);
+
+ if (*buffer == NULL){
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ /* Set up the writer for a writing pass */
+ NW_WBXML_Writer_SetToWrite(&encoder->writer, *length, *buffer);
+
+ status = NW_Encoder_encodeDocHeader(encoder, docNode);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ status = NW_Encoder_encodeNode(encoder, elem);
+ NW_ASSERT(status == NW_STAT_SUCCESS);
+
+ NW_Encoder_StringTable_delete(encoder->stringTable);
+ return NW_STAT_SUCCESS;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/encoder/src/tinydom2wbxml.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,280 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+
+/*****************************************************************
+** File: tinydom2wbxml.c
+**
+** Description: maps TinyDom types onto WBXMLWriter functions
+*****************************************************************/
+
+#include "cxml_internal.h"
+#include "nw_encoder_tinydom2wbxml.h"
+#include <xml/cxml/nw_dom_text.h>
+
+/*
+Writes an AttrVal
+Return NW_STAT_BAD_INPUT_PARAM
+ NW_STAT_OUT_OF_MEMORY
+ NW_STAT_SUCCESS
+*/
+NW_Status_t
+NW_Encoder_writeAttrVal(NW_WBXML_Writer_t* pW, NW_DOM_AttrVal_t *val, NW_Uint32 encoding)
+{
+ if ((val == NULL) || (pW == NULL)) {
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ switch (NW_DOM_AttrVal_getType(val)) {
+ case NW_DOM_ATTR_VAL_STRING:
+ {
+ NW_String_t *string = &(val->component.string);
+ return NW_WBXML_Writer_Text(pW, encoding,
+ string->length, string->storage);
+ }
+ case NW_DOM_ATTR_VAL_EXTENSION:
+ {
+ NW_Uint8 t; /* 8-bit token */
+ NW_String_t str;
+ NW_Status_t status;
+
+ t = (NW_Uint8)(val->component.ext.token);
+ if ((t == NW_WBXML_EXT_0)
+ || (t == NW_WBXML_EXT_1)
+ || (t == NW_WBXML_EXT_2)) {
+ status
+ = NW_WBXML_Writer_Extension(pW,
+ (NW_Uint16)(val->component.ext.token),
+ 0, 0, NULL);
+ } else if ((t == NW_WBXML_EXT_T_0)
+ || (t == NW_WBXML_EXT_T_1)
+ || (t == NW_WBXML_EXT_T_2)) {
+ NW_ASSERT((val->component.ext.type
+ == NW_TINYDOM_EXTENSION_TYPE_NORMAL)
+ || (val->component.ext.type
+ == NW_TINYDOM_EXTENSION_TYPE_EXT_T_INTEGER));
+ if (val->component.ext.type == NW_TINYDOM_EXTENSION_TYPE_NORMAL) {
+ NW_Uint16 token = NW_DOM_TextItem_getExtension(val, &str);
+ status
+ = NW_WBXML_Writer_ExtensionUseStringTable(pW,
+ token,
+ str.length,
+ str.storage);
+ } else {
+ status = NW_WBXML_Writer_Extension(pW,
+ (NW_Uint16)(val->component.ext.token),
+ val->component.ext.value.x,
+ 0, NULL);
+ }
+ } else if ((t == NW_WBXML_EXT_I_0)
+ || (t == NW_WBXML_EXT_I_1)
+ || (t == NW_WBXML_EXT_I_2)) {
+ NW_Uint16 token = NW_DOM_TextItem_getExtension(val, &str);
+ status = NW_WBXML_Writer_Extension(pW, token,
+ 0, str.length, str.storage);
+ } else {
+ status = NW_STAT_FAILURE;
+ }
+ return status;
+ }
+ case NW_DOM_ATTR_VAL_ENTITY:
+ {
+ NW_Uint32 entity = NW_DOM_TextItem_getEntity(val);
+ return NW_WBXML_Writer_Entity(pW, entity);
+ }
+ case NW_DOM_ATTR_VAL_OPAQUE:
+ {
+ NW_Uint32 length = 0;
+ NW_Byte* data = NW_DOM_AttrVal_getOpaque(val, &length);
+ return NW_WBXML_Writer_Opaque(pW, length, data);
+ }
+ case NW_DOM_ATTR_VAL_TOKEN:
+ {
+ NW_Uint16 fqToken = NW_DOM_AttrVal_getToken(val);
+ return NW_WBXML_Writer_AttributeToken(pW, fqToken);
+ }
+ default:
+ break;
+ }
+
+ return NW_STAT_FAILURE;
+}
+
+/*
+Writes an attrFqToken with AttrVal
+Return NW_STAT_BAD_INPUT_PARAM
+ NW_STAT_OUT_OF_MEMORY
+ NW_STAT_SUCCESS
+ NW_STAT_FAILURE
+*/
+NW_Status_t
+NW_Encoder_writeAttributeByToken(NW_WBXML_Writer_t* pW,
+ NW_Uint16 attrFqToken,
+ NW_TinyDom_AttrVal_t *val,
+ NW_Uint32 encoding)
+{
+ NW_Status_t s;
+ NW_Uint8 token = (NW_Uint8)(attrFqToken & NW_WBXML_MASK_TOKEN);
+
+ if ((token == NW_WBXML_LITERAL) || (val == NULL) || (pW == NULL)) {
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ s = NW_WBXML_Writer_AttributeToken(pW, attrFqToken);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+
+ /* TODO: Talk to Shaun about it */
+ if ((NW_DOM_AttrVal_getType(val) == NW_DOM_ATTR_VAL_TOKEN) &&
+ (attrFqToken == val->component.value_token))
+ {}
+ else{
+ s = NW_Encoder_writeAttrVal(pW, val, encoding);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ }
+
+ return NW_WBXML_Writer_End(pW);
+}
+
+/*
+Writes an Attribute by name plus AttrVal
+Return NW_STAT_BAD_INPUT_PARAM
+ NW_STAT_OUT_OF_MEMORY
+ NW_STAT_SUCCESS
+ NW_STAT_FAILURE
+*/
+NW_Status_t
+NW_Encoder_writeAttributeByName(NW_WBXML_Writer_t* pW,
+ NW_String_t *attrName,
+ NW_TinyDom_AttrVal_t *val,
+ NW_Uint32 encoding)
+{
+ NW_Status_t s;
+ NW_Uint32 byteCount;
+ NW_Int32 charCount;
+
+ if ((pW == NULL) || (attrName == NULL) || (val == NULL)) {
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ charCount = NW_String_charBuffGetLength(attrName->storage,
+ encoding,
+ &byteCount);
+ if (charCount < 0) {
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+ NW_ASSERT(byteCount == attrName->length);
+ s = NW_WBXML_Writer_AttributeNameString(pW, encoding, (NW_Uint32)charCount,
+ byteCount, attrName->storage);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+
+ s = NW_Encoder_writeAttrVal(pW, val, encoding);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+
+ return NW_WBXML_Writer_End(pW);
+}
+
+/*
+Writes an Element by token
+Return NW_STAT_BAD_INPUT_PARAM
+ NW_STAT_OUT_OF_MEMORY
+ NW_STAT_SUCCESS
+*/
+NW_Status_t
+NW_Encoder_writeElementByToken(NW_WBXML_Writer_t* pW,
+ NW_Uint16 elementToken)
+{
+ NW_Status_t s;
+ NW_Uint32 ignoreIndex;
+
+ if (pW == NULL) {
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+ s = NW_WBXML_Writer_TagToken(pW, elementToken, &ignoreIndex);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+
+ return NW_WBXML_Writer_End(pW);
+}
+
+/*
+Writes an Element
+Return NW_STAT_BAD_INPUT_PARAM
+ NW_STAT_OUT_OF_MEMORY
+ NW_STAT_SUCCESS
+*/
+NW_Status_t
+NW_Encoder_writeElementByName(NW_WBXML_Writer_t* pW,
+ NW_String_t *elementName,
+ NW_Uint32 encoding)
+{
+ NW_Status_t s;
+ NW_Uint32 ignoreIndex;
+ NW_Uint32 byteCount;
+ NW_Int32 charCount;
+
+ if ((elementName == NULL) || (pW == NULL)) {
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+
+ charCount = NW_String_charBuffGetLength(elementName->storage,
+ encoding,
+ &byteCount);
+ if (charCount < 0) {
+ return NW_STAT_BAD_INPUT_PARAM;
+ }
+ NW_ASSERT(byteCount == elementName->length);
+ s = NW_WBXML_Writer_TagString(pW, encoding, (NW_Uint32)charCount, byteCount,
+ elementName->storage, &ignoreIndex);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+
+ return NW_WBXML_Writer_End(pW);
+}
+
+/*
+Writes a TextItem
+Return NW_STAT_BAD_INPUT_PARAM
+ NW_STAT_OUT_OF_MEMORY
+ NW_STAT_SUCCESS
+*/
+NW_Status_t
+NW_Encoder_writeText(NW_WBXML_Writer_t* pW,
+ NW_TinyDom_Text_t *text,
+ NW_Uint32 encoding)
+{
+ NW_Status_t s;
+ s = NW_Encoder_writeAttrVal(pW, text, encoding);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+
+ return NW_WBXML_Writer_End(pW);
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/string/src/char.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,588 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/*****************************************************************
+** File: character.c
+** Description:
+*
+* Note: all of the char functions assume that the input buffer points
+* to an array of characters which contains a null somewhere and is
+* correctly encoded for the particular encoding. Bad things can happen
+* if this is not the case. In order to avoid having to check these
+* conditions on every operation, a set of validate functions is provided
+* to pre-test a string where the caller is not sure these conditions
+* are met. It is especially important, when calling character operations
+* on bytecode, to make sure to validate all strings.
+*
+*****************************************************************/
+#include "cxml_internal.h"
+#include <xml/cxml/nw_string_char.h>
+
+/*
+* TODO: Note that there is some duplication between the Validate*
+* calls and the string length function. The Validate*S could return
+* the length too.
+*/
+
+/*
+* Check that storage points to a valid UTF8 string no longer
+* than length bytes.
+*/
+static NW_Int32
+StringValidUTF8 (NW_Byte * storage, NW_Uint32 length)
+{
+ NW_Uint32 i;
+ NW_Byte bits;
+
+ NW_ASSERT(storage != NULL);
+ NW_ASSERT(length != 0);
+
+ for (i = 0; i < length;)
+ {
+ if (storage[i] == 0)
+ {
+ return 1;
+ }
+ bits = (NW_Byte) (storage[i] >> 4);
+ if (bits < 8)
+ {
+ i++;
+ }
+ else if ((bits == 12) || (bits == 13))
+ {
+ i+=2;
+ }
+ else if (bits == 14)
+ {
+ i += 3;
+ }
+ else if (bits == 15)
+ {
+ i += 4;
+ }
+ else
+ {
+ return 0;
+ }
+ }
+ return 0;
+}
+
+
+/*
+* Check validity of UCS2 string storage
+*/
+static NW_Int32
+StringValidUCS2 (NW_Byte * storage, NW_Uint32 length)
+{
+ NW_Uint32 i;
+
+ NW_ASSERT(storage != NULL);
+ NW_ASSERT(length != 0);
+
+ for (i = 0; i < (length - 1); i += 2)
+ {
+ if (((storage[i] << 8) | storage[i + 1]) == 0)
+ {
+ return 1;
+ }
+ }
+ return 0;
+}
+
+
+/*
+* Check validity of ISO8859 string storage
+*/
+static NW_Int32
+StringValidISO88591 (NW_Byte * storage, NW_Uint32 length)
+{
+
+ NW_Uint32 i;
+
+ NW_ASSERT(storage != NULL);
+ NW_ASSERT(length != 0);
+
+ for (i = 0; i < length; i++)
+ {
+ if (storage[i] == 0)
+ {
+ return 1;
+ }
+ }
+ return 0;
+}
+
+
+/*
+* Check validity of ASCII string storage
+*/
+static NW_Int32
+StringValidUSASCII (NW_Byte * storage, NW_Uint32 length)
+{
+ NW_Uint32 i;
+
+ NW_ASSERT(storage != NULL);
+ NW_ASSERT(length != 0);
+
+ for (i = 0; i < length; i++)
+ {
+ if (storage[i] == 0)
+ {
+ return 1;
+ }
+ }
+ return 0;
+}
+
+
+/*
+* Check the given charset encoding (MIBENUM) and if it
+* is supported.
+*/
+
+NW_Status_t
+NW_String_charsetValid (NW_Uint32 encoding)
+{
+ switch (encoding)
+ {
+ case HTTP_iso_10646_ucs_2:
+ case HTTP_iso_8859_1:
+ case HTTP_utf_8:
+ case HTTP_us_ascii:
+ return NW_STAT_SUCCESS;
+ default:
+ return NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED;
+ }
+}
+
+
+/*
+* RETURN -1 if the encoding is not supported
+*/
+NW_Int32
+NW_String_valid(NW_Byte * storage, NW_Uint32 length, NW_Uint32 encoding)
+{
+ if (encoding == HTTP_iso_10646_ucs_2)
+ {
+ return StringValidUCS2 (storage, length);
+ }
+ else if (encoding == HTTP_utf_8)
+ {
+ return StringValidUTF8 (storage, length);
+ }
+ else if (encoding == HTTP_iso_8859_1)
+ {
+ return StringValidISO88591 (storage, length);
+ }
+ else if (encoding == HTTP_us_ascii)
+ {
+ return StringValidUSASCII (storage, length);
+ }
+
+ return -1;
+}
+
+
+/*
+* TODO: The following routines are taken from Rainbow.
+* They should be revisited for better efficiency, etc.
+*/
+
+/*
+* Read one UTF8 character from a buffer and store it as a NW_Ucs2.
+* Returns number of input bytes read.
+*/
+static NW_Int32
+ReadUTF8Char (NW_Byte * buff, NW_Ucs2 * c)
+{
+ switch ((buff[0] >> 4) & 0xf)
+ {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ /* 1 NW_Byte */
+ *c = (NW_Ucs2) buff[0];
+ return 1;
+
+ case 12:
+ case 13:
+ /* 2 bytes */
+ if ((buff[1] & 0xC0) != 0x80)
+ {
+ return -1;
+ }
+ *c = (NW_Ucs2) (((buff[0] & 0x1F) << 6) | (buff[1] & 0x3F));
+ return 2;
+
+ case 14:
+ /* 3 bytes */
+ if (((buff[1] & 0xC0) != 0x80) && ((buff[2] & 0xC0) != 0x80))
+ {
+ return -1;
+ }
+ *c = (NW_Ucs2) (((buff[0] & 0x0F) << 12) |
+ ((buff[1] & 0x3F) << 6) | ((buff[2] & 0x3F) << 0));
+ return 3;
+
+ //we used not to handle 4-bytes UTF-8 case (only 16 bits handled), the case 15 is newly added, it may cause
+ //problem if in an application the a 4-byte character would convert to ucs2 encoding.
+ case 15:
+ /* 4 bytes */
+
+ if (((buff[1] & 0xC0) != 0x80) && ((buff[2] & 0xC0) != 0x80) && ((buff[3] & 0xC0) != 0x80))
+ {
+ return -1;
+ }
+ *c = (((buff[0] & 0x07) << 18) |
+ ((buff[1] & 0x3F) << 12) |
+ ((buff[2] & 0x3F) << 6) |
+ (buff[3] & 0x3F));
+ return 4;
+
+
+
+ default:
+ return -1; /* Bad format */
+ }
+}
+
+
+/*
+* Write a NW_Ucs2 into a buffer as UTF8. Returns number of bytes written
+*/
+NW_Uint32
+NW_String_writeUTF8Char (NW_Ucs2 c, NW_Byte * buff)
+{
+ if (c <= 0x007F)
+ {
+ /* 0x0000 - 0x007F: 1 NW_Byte UTF-8 encoding. */
+ buff[0] = (NW_Byte) c;
+ return 1;
+ }
+ else if (c > 0x07FF)
+ {
+ /* 0x0800 - 0xFFFF: 3 NW_Byte UTF-8 encoding. */
+ buff[0] = (NW_Byte) (0xE0 | ((c >> 12) & 0x0F));
+ buff[1] = (NW_Byte) (0x80 | ((c >> 6) & 0x3F));
+ buff[2] = (NW_Byte) (0x80 | ((c >> 0) & 0x3F));
+ return 3;
+ }
+ else
+ {
+ /* 0x0080 - 0x07ff: 2 NW_Byte UTF-8 encoding. */
+ buff[0] = (NW_Byte) (0xC0 | ((c >> 6) & 0x1F));
+ buff[1] = (NW_Byte) (0x80 | ((c >> 0) & 0x3F));
+ return 2;
+ }
+}
+
+
+static NW_Int32
+ReadInt16Char (NW_Byte * buff, NW_Ucs2 * c)
+{
+ /* read unaligned native-endian to aligned native-endian */
+ (void) NW_Mem_memcpy(c, buff, sizeof(NW_Ucs2));
+ return sizeof(NW_Ucs2);
+}
+
+static NW_Int32
+ReadISO88591Char (NW_Byte * buff, NW_Ucs2 * c)
+{
+ *c = buff[0];
+ return 1;
+}
+
+static NW_Int32
+ReadUSASCIIChar (NW_Byte * buff, NW_Ucs2 * c)
+{
+ *c = buff[0];
+ return 1;
+}
+
+/*
+* Read one character of some encoding, returning the NW_Ucs2
+* equivalent and the count of raw characters read
+*
+* RETURN -1 if encoding is not supported
+*/
+EXPORT_C NW_Int32
+NW_String_readChar (NW_Byte * buff, NW_Ucs2 * c, NW_Uint32 encoding)
+{
+ NW_Int32 nbytes = 0;
+
+ if (encoding == HTTP_iso_10646_ucs_2)
+ return ReadInt16Char (&buff[nbytes], c);
+ else if (encoding == HTTP_utf_8)
+ return ReadUTF8Char (&buff[nbytes], c);
+ else if (encoding == HTTP_iso_8859_1)
+ return ReadISO88591Char (&buff[nbytes], c);
+ else if (encoding == HTTP_us_ascii)
+ return ReadUSASCIIChar (&buff[nbytes], c);
+
+ return -1;
+}
+
+
+/*
+* Get the length of a character string in some encoding. Returns the number
+* of characters (less the terminating char). The out param byte_count returns
+* the number of bytes of storage scanned (including the terminating char).
+* Note that there is NO validity check here. This should be done first if
+* needed. TODO: Also note that the validity check could return the length
+* directly, thus eliminating the need for call to this function when
+* doint32 validity checkint32.
+*/
+EXPORT_C NW_Int32
+NW_String_charBuffGetLength (void *buffer, NW_Uint32 encoding, NW_Uint32 * byte_count)
+{
+ NW_Int32 chars = 0;
+ NW_Ucs2 c = 1;
+ NW_Int32 retval = 0;
+
+ *byte_count = 0;
+ while (c)
+ {
+ c = 0; /* partial protection against an infinite loop */
+ retval = NW_String_readChar ((NW_Byte *) buffer + *byte_count, &c, encoding);
+ if(retval < 0){
+ return -1;
+ }
+ (*byte_count) += (NW_Uint32) retval;
+ chars++;
+ }
+
+ return chars - 1;
+}
+
+
+/*
+* Conversions among character strings of various types and ucs2.
+* These functions assume that the length in characters of the
+* input buffer has been pre-calculated, so that this operation
+* doesn't have to be performed for every conversion. This works well
+* for String_t which store the character count.
+*
+* RETURN NULL if malloc fails
+*/
+NW_String_UCS2Buff_t *
+NW_String_charToUCS2Buff (NW_Byte * s, NW_Uint32 encoding)
+{
+ NW_String_UCS2Buff_t *storage;
+ NW_Ucs2 c;
+ NW_Int32 i;
+ NW_Int32 count = 0;
+ NW_Int32 length = 0;
+ NW_Uint32 byteCount = 0;
+ NW_Int32 retval = 0;
+
+ if (!NW_String_charsetValid(encoding))
+ {
+ return NULL;
+ }
+
+ length = NW_String_charBuffGetLength(s, encoding, &byteCount);
+ if(length < 0){
+ return NULL;
+ }
+ storage =
+ (NW_String_UCS2Buff_t*)
+ NW_Mem_Malloc(((NW_Uint32)length + 1) * sizeof (NW_String_UCS2Buff_t));
+ if (storage == NULL)
+ {
+ return NULL;
+ }
+
+ for (i = 0; i < length; i++)
+ {
+ retval = NW_String_readChar (s + count, &c, encoding);
+ if(retval < 0){
+ NW_Mem_Free(storage);
+ return NULL;
+ }
+ count += retval;
+ storage[i].bytes[0] = (NW_Byte) ((c & 0xff00) >> 8);
+ storage[i].bytes[1] = (NW_Byte) (c & 0xff);
+ }
+ storage[length].bytes[0] = 0;
+ storage[length].bytes[1] = 0;
+
+ return storage;
+}
+
+
+/*
+* TODO: is this a public or private function ???
+*/
+NW_String_UCS2Buff_t *
+NW_String_UTF8ToUCS2Buff (NW_Byte * s)
+{
+ return NW_String_charToUCS2Buff (s, HTTP_utf_8);
+}
+
+
+/*
+* TODO: is this a public or private function ???
+*/
+NW_String_UCS2Buff_t *
+NW_String_ISO88591ToUCS2Buff (NW_Byte * s)
+{
+ return NW_String_charToUCS2Buff (s, HTTP_iso_8859_1);
+}
+
+
+/*
+* RETURN NULL if malloc fails
+*/
+NW_Byte *
+NW_String_UCS2ToUTF8 (NW_String_UCS2Buff_t * s, NW_Uint32 length)
+{
+ NW_Byte *tstore;
+ NW_Byte *storage;
+ NW_Ucs2 c;
+ NW_Uint32 i;
+ NW_Int32 count = 0;
+ NW_Ucs2 *src = (NW_Ucs2 *)s; /*WMS we should use UCS2 pointer,
+ because s is a structure and the size of a structure is not fixed
+ in ARM processor, the size of NW_String_UCS2Buff_t is 4 byte
+ (address alignment issue) */
+
+ tstore = (NW_Byte *) NW_Mem_Malloc ((length + 1) * 3);
+ if (tstore == NULL)
+ {
+ return NULL;
+ }
+
+ for (i = 0; i < length; i++)
+ {
+ ReadInt16Char ((NW_Byte *) (src + i), &c);
+ count += NW_String_writeUTF8Char (c, tstore + count);
+ }
+ *(tstore + count) = 0;
+ storage = (NW_Byte *) NW_Mem_Malloc (count + 1);
+ if (storage)
+ {
+ NW_Mem_memcpy (storage, tstore, count + 1);
+ }
+ NW_Mem_Free (tstore);
+
+ return storage;
+}
+
+
+/*
+* RETURN NULL if malloc fails
+* byteCount is total allocation size of s as far as conversion is concerned
+*/
+NW_Byte *
+NW_String_UCS2ToISO88591 (NW_String_UCS2Buff_t * s, NW_Uint32 byteCount)
+{
+ NW_Byte *storage = NULL;
+ NW_Ucs2 c;
+ NW_Uint32 i;
+ NW_Ucs2 *src = (NW_Ucs2 *)s; /*WMS we should use UCS2 pointer,
+ because s is a structure and the size of a structure is not fixed
+ in ARM processor, the size of NW_String_UCS2Buff_t is 4 byte
+ (address alignment issue) */
+
+ storage = (NW_Byte *) NW_Mem_Malloc (byteCount + 1);
+ if (storage == NULL)
+ {
+ return NULL;
+ }
+
+ for (i = 0; i < byteCount; i++)
+ {
+ ReadInt16Char ((NW_Byte *) (src + i), &c);
+ storage[i] = (NW_Byte) (c & 0xff);
+ }
+ storage[byteCount] = 0;
+
+ return storage;
+}
+
+/* Ordered comparison of ucs2 strings */
+NW_Int32
+NW_String_UCS2BuffCmp (NW_String_UCS2Buff_t * s1,
+ NW_String_UCS2Buff_t * s2,
+ NW_Bool matchCase)
+{
+ NW_Ucs2 c1, c2;
+ NW_Ucs2 *src1 = (NW_Ucs2 *)s1; /*WMS we should use UCS2 pointer, */
+ NW_Ucs2 *src2 = (NW_Ucs2 *)s2; /*because s is a structure and the size of a structure is not fixed
+ in ARM processor, the size of NW_String_UCS2Buff_t is 4 byte
+ (address alignment issue) */
+
+ while ( ( *src1 ) || ( *src2 ) )
+ {
+ ReadInt16Char ((NW_Byte *) src1++, &c1);
+ ReadInt16Char ((NW_Byte *) src2++, &c2);
+
+ if (matchCase == NW_FALSE) {
+ c1 = CXML_Str_ToLower (c1);
+ c2 = CXML_Str_ToLower (c2);
+ }
+ if (c1 == c2)
+ {
+ continue;
+ }
+ return (c1 < c2) ? -1 : 1;
+ }
+
+ return 0;
+
+}
+
+
+/* Assumes s2 is null terminated, native byte order
+and aligned for 16-bit access */
+NW_Status_t
+NW_String_CmpToNativeAlignedUCS2 (NW_Uint32 encoding, NW_Uint32 charCount,
+ NW_Uint8 * s1, NW_Uint16 * s2,
+ NW_Int32 * r)
+{
+ NW_Uint32 i;
+ NW_Int32 byteCount = 0;
+ NW_Ucs2 c1;
+
+ for (i = 0; i < charCount; i++, s1 += byteCount, s2++) {
+ byteCount = NW_String_readChar (s1, &c1, encoding);
+ if (byteCount < 0) {
+ return NW_STAT_FAILURE;
+ }
+ *r = c1 - *s2;
+ if (*r || (*s2 == 0)) {
+ break;
+ }
+ }
+ /* You can exit the above loop three ways: i == charCount or
+ when i != charCount because one of mismatch or null termination
+ of s2 is encountered. The only one that needs a fixup is if
+ i == charCount but s2 isn't at null termination. */
+
+ /*lint -e{794} Conceivable use of null pointer */
+ if ((i == charCount) && (*s2 != 0)) {
+ *r = -*s2;
+ }
+ return NW_STAT_SUCCESS;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/string/src/string.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,881 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/*****************************************************************
+** File: xml_string.c
+**
+** Description:
+ *
+ * The following routines are an interface to raw strings stored in
+ * various encodings The implementation assumes a few things that
+ * are not necessarily generally true:
+ * - every character read can be converted into a ucs_2 character
+ * - the string terminating character is a null character (not a null
+ * NW_Byte)
+ *
+*****************************************************************/
+#include "cxml_internal.h"
+#include <xml/cxml/nw_string_string.h>
+#include <xml/cxml/nw_string_char.h>
+#include <xml/cxml/nw_wbxml_dictionary.h>
+
+static NW_Status_t
+StringUCS2Init(NW_String_UCS2String_t * string, void *storage)
+{
+ NW_Status_t status = NW_STAT_SUCCESS;
+ NW_Uint32 numBytes = 0;
+
+ string->storage = (NW_Byte*) storage;
+ if (string->storage){
+ if (NW_String_charBuffGetLength(storage, HTTP_iso_10646_ucs_2, &numBytes) < 0) {
+ numBytes = 0;
+ status = NW_STAT_FAILURE;
+ }
+ }
+ string->length = numBytes;
+ return status;
+}
+
+
+/*
+ * TODO: The following functions need to have the allocator passed
+ * as an argument !!
+ */
+
+/*
+ * RETURN NULL if malloc fails
+ */
+EXPORT_C NW_String_t *
+NW_String_new (void)
+{
+ NW_String_t *str =
+ (NW_String_t *) NW_Mem_Malloc (sizeof (NW_String_t));
+ if (str == NULL)
+ return NULL;
+ str->length = 0;
+ str->storage = NULL;
+ return str;
+}
+
+EXPORT_C NW_Status_t
+NW_String_initialize (NW_String_t *string, void *storage, NW_Uint32 encoding)
+{
+ NW_Status_t status;
+ NW_Uint32 numBytes = 0;
+
+ NW_ASSERT(string != NULL);
+
+ if (storage == NULL) {
+ string->storage = NULL;
+ string->length = 0;
+
+ return NW_STAT_SUCCESS;
+ }
+
+ if ((status = NW_String_charsetValid (encoding)) != NW_STAT_SUCCESS)
+ return status;
+
+ string->storage = (NW_Byte*) storage;
+
+ if (string->storage){
+ if (NW_String_charBuffGetLength(storage, encoding, &numBytes) < 0) {
+ return NW_STAT_FAILURE;
+ }
+ }
+ string->length = numBytes;
+
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Freeing a string might not free the storage!
+ * String storage is complicated by the fact that
+ * it can be allocated outside the bounds
+ * of the parser. If so, it is not freed here.
+ *
+ */
+
+EXPORT_C void
+NW_String_delete(NW_String_t *s)
+{
+
+ NW_ASSERT(s != NULL);
+
+ if (NW_String_getUserOwnsStorage(s)){
+ NW_Mem_Free (s->storage);
+ }
+
+ NW_Mem_Free (s);
+}
+
+EXPORT_C NW_Status_t
+NW_String_deleteStorage(NW_String_t *s)
+{
+
+ NW_ASSERT(s != NULL);
+
+ if (NW_String_getUserOwnsStorage(s))
+ {
+ if (s->storage != NULL){
+ NW_Mem_Free(s->storage);
+ }
+ }
+ s->storage = NULL;
+ s->length = 0;
+ return NW_STAT_SUCCESS;
+}
+/*
+ * Determine the length of the given string in characters (not
+ * bytes).
+ *
+ * RETURN length in characters or 0 if s is NULL
+ */
+
+EXPORT_C NW_Uint16
+NW_String_getCharCount(NW_String_t *s, NW_Uint32 encoding)
+{
+ NW_Uint16 numChar = 0;
+ NW_Uint32 getNumChar = NW_String_getCharCount32(s,encoding);
+
+ if(getNumChar <= NW_UINT16_MAX)
+ {
+ numChar =(NW_Uint16) getNumChar;
+ }
+
+ return numChar;
+}
+/*
+ * The following function is a duplication of NW_String_getByteCount to
+ * handle big files. For not affecting the components other than
+ * browser, this function is only called inside the browser.).
+ *
+ * INSTEAD OF CALLING NW_String_getByteCount, ALL THE BROWSER CODES SHOULD
+ * CALL THIS DUPLICATE FUNCTION TO GET CHARACTER COUNTS.
+ *
+ */
+
+EXPORT_C NW_Uint32
+NW_String_getCharCount32(NW_String_t *s, NW_Uint32 encoding)
+{
+ NW_Int32 numChars;
+ NW_Uint32 byteCount;
+
+ if (s == NULL)
+ return 0;
+
+ if (s->storage == NULL)
+ return 0;
+
+ numChars = NW_String_charBuffGetLength(s->storage, encoding, &byteCount);
+
+ if ( numChars < 0 ) {
+ numChars = 0;
+ }
+
+ return NW_UINT32_CAST( numChars );
+}
+
+EXPORT_C NW_Uint32
+NW_String_getByteCount (NW_String_t *s)
+{
+ NW_Uint32 uint32Len;
+
+ if (s == NULL)
+ return 0;
+
+ /* The MSB of NW_Byte length if set represents that the
+ string is from storage buffer, so BufferOwns String */
+ uint32Len = (s->length) & 0x7FFFFFFF;
+ return uint32Len;
+}
+
+/*
+ * Returns NULL or valid storage
+ */
+EXPORT_C NW_Byte *
+NW_String_getStorage(NW_String_t *str)
+{
+ if (str == NULL)
+ return NULL;
+
+ return str->storage;
+}
+
+/*
+ * Boolean comparison. This function assumes encodings to be
+ * the same. It does not attempt to convert strings of different
+ * encodings for comparison, since we want to treat encoding as
+ * implicit for xml strings.
+ *
+ * RETURN 1 if the strings are equal; 0 if the strings are not equal
+ */
+
+EXPORT_C NW_Int32
+NW_String_equals(const NW_String_t *s1, const NW_String_t *s2)
+{
+ if ( (s1 == NULL) || (s2 == NULL) )
+ return 0;
+
+ if (s1 == s2)
+ return 1;
+
+ if (NW_String_getByteCount((NW_String_t *) s1) != NW_String_getByteCount((NW_String_t *) s2))
+ return 0;
+ /*
+ * Assumes that strings are zero terminated, so a substring
+ * can't share storage with the super string
+ */
+ if (s1->storage == s2->storage)
+ return 1;
+
+ /* Same length, different storage, compare NW_Byte-by-NW_Byte */
+
+ if (NW_Mem_memcmp (((NW_String_t *) s1)->storage, ((NW_String_t *) s2)->storage,
+ NW_String_getByteCount((NW_String_t *) s1)))
+ return 0;
+
+ return 1;
+}
+
+EXPORT_C NW_Bool
+NW_String_getUserOwnsStorage(NW_String_t * s)
+{
+ NW_Uint32 i;
+ if (s == NULL)
+ return 0;
+
+ /* The MSB of NW_Byte length if set represents that the
+ string is from storage buffer, so BufferOwns String */
+ i = s->length & 0x80000000;
+ if (i== 0)
+ return NW_FALSE;
+ return NW_TRUE;
+}
+
+
+EXPORT_C NW_Status_t
+NW_String_setUserOwnsStorage(NW_String_t * s)
+{
+
+ NW_ASSERT(s != NULL);
+
+ /* The MSB of NW_Byte length if set represents that the
+ string is from storage buffer, so BufferOwns String */
+ s->length = s->length | 0x80000000;
+ return NW_STAT_SUCCESS;
+}
+
+EXPORT_C NW_Status_t
+NW_String_clearUserOwnsStorage(NW_String_t * s)
+{
+
+ NW_ASSERT(s != NULL);
+
+ /* The MSB of NW_Byte length if set represents that the
+ string is from storage buffer, so BufferOwns String */
+ s->length = s->length & 0x7fffffff;
+ return NW_STAT_SUCCESS;
+}
+
+
+/*
+ * Conversion routines
+ */
+
+/*
+ * RETURN NW_STAT_SUCCESS
+ * NW_STAT_OUT_OF_MEMORY
+ *
+ * MODIFIED ret_string
+ */
+NW_Status_t
+NW_String_stringToUCS2 (NW_String_UCS2String_t ** ret_string, NW_String_t * s, NW_Uint32 input_encoding)
+{
+ NW_String_UCS2Buff_t *storage;
+
+ if (*ret_string == NULL)
+ *ret_string = NW_String_new();
+
+ if (*ret_string == NULL)
+ return NW_STAT_OUT_OF_MEMORY;
+
+ if (input_encoding == HTTP_iso_10646_ucs_2)
+ return NW_String_copy(*ret_string, s);
+
+ if ((input_encoding == HTTP_utf_8) ||
+ (input_encoding == HTTP_us_ascii) ||
+ (input_encoding == HTTP_iso_8859_1))
+ {
+ NW_Status_t status;
+ storage = NW_String_charToUCS2Buff (s->storage, input_encoding);
+
+ if (storage == NULL){
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ status = NW_String_initialize(*ret_string, (void *)storage, HTTP_iso_10646_ucs_2);
+ if (status == NW_STAT_SUCCESS){
+ return NW_String_setUserOwnsStorage(*ret_string);
+ }
+ else{
+ NW_String_delete(*ret_string);
+ NW_Mem_Free(storage);
+ return status;
+ }
+ }
+ NW_String_delete(*ret_string);
+ return NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED;
+}
+
+/*
+ * RETURN NW_STAT_SUCCESS
+ * NW_STAT_OUT_OF_MEMORY
+ * NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED
+ *
+ * MODIFIED ret_string
+ */
+static
+NW_Status_t
+NW_String_stringFromUCS2 (NW_String_t ** ret_string, NW_String_UCS2String_t * s, NW_Uint32 output_encoding)
+{
+ NW_Byte *storage;
+ NW_String_UCS2Buff_t *ucs2Storage = (NW_String_UCS2Buff_t *) (s->storage);
+ NW_Uint32 byteLength = NW_String_getByteCount(s);
+ NW_Status_t status;
+
+ if (*ret_string == NULL)
+ *ret_string = NW_String_new();
+
+ if (*ret_string == NULL)
+ return NW_STAT_OUT_OF_MEMORY;
+
+ if (output_encoding == HTTP_iso_10646_ucs_2)
+ return NW_String_copy(*ret_string, s);
+
+ if ( (output_encoding == HTTP_utf_8) || (output_encoding == HTTP_us_ascii) )
+ {
+ storage = NW_String_UCS2ToUTF8 (ucs2Storage, byteLength);
+ }
+ else if (output_encoding == HTTP_iso_8859_1)
+ {
+ storage = NW_String_UCS2ToISO88591 (ucs2Storage, byteLength);
+ }
+ else {
+ NW_String_delete(*ret_string);
+ return NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED;
+ }
+ if (storage == NULL)
+ return NW_STAT_OUT_OF_MEMORY;
+
+ status = NW_String_initialize(*ret_string, storage, output_encoding);
+ if(status == NW_STAT_SUCCESS){
+ return NW_String_setUserOwnsStorage(*ret_string);
+ }
+ else{
+ NW_String_delete(*ret_string);
+ NW_Mem_Free(storage);
+ return status;
+ }
+}
+
+
+/*
+ * Convert a NW_String_t (in any of the supported character
+ * set encodings) to a UCS2Buff string.
+ *
+ * NOTE: caller is responsible for freeing the pointer returned
+ * by this function
+ *
+ * NOTE: returned array is null-terminated.
+ *
+ * RETURN NULL if malloc fails
+ */
+NW_String_UCS2Buff_t *
+NW_String_stringToUCS2Buff (NW_String_t * string, NW_Uint32 encoding)
+{
+ NW_Byte *b = string->storage;
+ if (!NW_String_charsetValid(encoding))
+ return NULL;
+
+ return NW_String_charToUCS2Buff(b, encoding);
+}
+
+/*
+ * RETURN NW_STAT_SUCCESS
+ * NW_STAT_OUT_OF_MEMORY
+ * NW_WBXML_ERROR_CHARSET_UNSUPPORTED
+ *
+ * MODIFIED ret_string
+ */
+EXPORT_C NW_Status_t
+NW_String_UCS2BuffToString(NW_String_UCS2Buff_t *buff, NW_String_t *str, NW_Uint32 encoding)
+{
+ NW_Status_t status;
+ NW_String_UCS2String_t* ucs2String = NW_String_new();
+
+ if (ucs2String == NULL) {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ status = StringUCS2Init(ucs2String, (void *)buff);
+ if (status == NW_STAT_SUCCESS) {
+ status = NW_String_stringFromUCS2 (&str, ucs2String, encoding);
+ }
+ /* Freeing only the NW_String_t and not the storage, since we
+ used the input storage */
+ NW_Mem_Free(ucs2String);
+ return status;
+}
+
+
+/*
+ * Returns
+ * NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED - If unsupported encoding
+ * NW_STAT_OUT_OF_MEMORY - If memory for string storage could not be allocated
+ * NW_STAT_WBXML_NO_NAME
+ * NW_STAT_SUCCESS
+ */
+EXPORT_C NW_Status_t
+NW_String_ucs2CharToString(NW_String_t *string, NW_Ucs2 *u, NW_Uint32 encoding)
+{
+ NW_Byte *storage;
+ NW_String_t *ucs2_string = NW_String_new();
+ NW_Status_t status;
+ NW_Ucs2 *p = u;
+ NW_Uint32 len = 0;
+
+ NW_ASSERT(string != NULL);
+ NW_ASSERT(u != NULL);
+
+ if (ucs2_string == NULL){
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ while (*p!= 0)
+ {
+ len++;
+ p++;
+ }
+
+ if (NW_String_charsetValid(encoding) != NW_STAT_SUCCESS) {
+ NW_String_delete(ucs2_string);
+ return NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED;
+ }
+ /* Create the storage and copy the bytes */
+
+ if ((storage = (NW_Byte*) NW_Mem_Malloc ((len + 1) * sizeof(NW_String_UCS2Buff_t))) == NULL){
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+#if 0
+ {
+ NW_Int32 index = 0;
+
+ while(*u != 0)
+ {
+ storage[index++] = (NW_Byte)(*u >> 8);
+ storage[index++] = (NW_Byte)(*u & 0x00ff);
+ u++;
+ }
+
+ storage[index++] = (NW_Byte)0;
+ storage[index] = (NW_Byte)0;
+ }
+#else
+ NW_Mem_memcpy(storage, u, (len + 1) * sizeof(NW_String_UCS2Buff_t));
+#endif
+
+ status = NW_String_initialize(ucs2_string, storage, HTTP_iso_10646_ucs_2);
+ if (status != NW_STAT_SUCCESS){
+ NW_Mem_Free(storage);
+ NW_String_delete(ucs2_string);
+ return status;
+ }
+ NW_String_setUserOwnsStorage(ucs2_string);
+
+ status = NW_String_stringFromUCS2(&string, ucs2_string, encoding);
+ NW_String_delete(ucs2_string);
+
+ return status;
+}
+
+/*
+ * Conversion to string
+ */
+EXPORT_C NW_Status_t
+NW_String_entityToString(NW_Uint32 entity, NW_String_t *str, NW_Uint32 encoding)
+{
+ NW_Status_t status;
+ NW_Ucs2 *s;
+ NW_Ucs2 e;
+
+ if ((s = (NW_Ucs2*) NW_Mem_Malloc(2 * sizeof(NW_Ucs2))) == NULL)
+ return NW_STAT_OUT_OF_MEMORY;
+
+ e = (NW_Ucs2) entity;
+ s[0] = e;
+ s[1] = 0;
+
+ status = NW_String_ucs2CharToString(str, s, encoding);
+ NW_Mem_Free(s);
+
+ return status;
+}
+
+
+NW_Status_t
+NW_String_byteToString(NW_Byte *s, NW_String_t *str, NW_Uint32 encoding)
+{
+ return NW_String_initialize(str, s, encoding);
+}
+
+EXPORT_C NW_Status_t
+NW_String_tokenToString(NW_Uint32 token, NW_String_t *str, NW_Uint32 encoding)
+{
+ NW_String_UCS2Buff_t *t;
+
+ /* Get the tag from the dictionary */
+ if ((t = NW_WBXML_Dictionary_getTagByFqToken (token)) == NULL)
+ /*
+ * This can happen if the token is not defined or if the dictonary
+ for this token's codepage is not defined. So, make a string
+ *from the token.
+ */
+ return NW_STAT_FAILURE;
+
+ return NW_String_UCS2BuffToString(t, str, encoding);
+}
+
+
+/*
+ * String manipulation functions
+ */
+
+/* Duplicates storage
+ * Returns
+ * NW_STAT_BAD_INPUT_PARAM
+ * NW_STAT_OUT_OF_MEMORY
+ * NW_STAT_SUCCESS
+ */
+NW_Status_t
+NW_String_copy(NW_String_t *dest, NW_String_t *source)
+{
+
+ NW_ASSERT(dest != NULL);
+ NW_ASSERT(source != NULL);
+
+ if (!NW_String_getUserOwnsStorage(source))
+ return NW_String_shallowCopy(dest, source);
+
+ return NW_String_deepCopy(dest, source);
+}
+
+EXPORT_C NW_Status_t
+NW_String_shallowCopy(NW_String_t *dest, NW_String_t *source)
+{
+
+ NW_ASSERT(dest != NULL);
+ NW_ASSERT(source != NULL);
+
+ dest->storage = source->storage;
+ dest->length = source->length;
+ return NW_STAT_SUCCESS;
+}
+
+EXPORT_C NW_Status_t
+NW_String_deepCopy(NW_String_t *dest, NW_String_t *source)
+{
+ NW_Uint32 len;
+
+ NW_ASSERT(dest != NULL);
+ NW_ASSERT(source != NULL);
+
+ len = NW_String_getByteCount(source);
+
+ dest->storage = (NW_Byte *) NW_Mem_Malloc (len);
+
+ if (dest->storage == NULL){
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+ NW_Mem_memcpy(dest->storage, source->storage, len);
+ dest->length = len;
+ /* Since we allocated the new storage, we own it */
+ NW_String_setUserOwnsStorage(dest);
+ return NW_STAT_SUCCESS;
+}
+
+EXPORT_C NW_Status_t
+NW_String_concatenate(NW_String_t *dest, NW_String_t *source, NW_Uint32 encoding)
+{
+ NW_Byte *storage = NULL;
+ NW_Uint32 destLength = 0;
+ NW_Uint32 sourceLength = 0;
+
+ NW_ASSERT(dest != NULL);
+ NW_ASSERT(source != NULL);
+ NW_ASSERT(source->storage != NULL);
+
+ destLength = NW_String_getByteCount(dest);
+ sourceLength = NW_String_getByteCount(source);
+ NW_ASSERT(sourceLength != 0);
+
+ /* get rid of the tailing NULL from dest string, in case of ucs2,
+ two bytes need to be removed. */
+ if ( (encoding == HTTP_iso_10646_ucs_2) &&
+ (destLength > 1) &&
+ (dest->storage[(destLength-1)] == 0) &&
+ (dest->storage[ (destLength-2) ] == 0) )
+ {
+ destLength--;
+ destLength--;
+ }
+ else if ((encoding == HTTP_utf_8) ||
+ (encoding == HTTP_us_ascii) ||
+ (encoding == HTTP_iso_8859_1))
+ {
+ if ( (destLength > 0) && (dest->storage[destLength-1] == 0) ) {
+ destLength--;
+ }
+ }
+
+ storage = (NW_Byte*) NW_Mem_Malloc (destLength +sourceLength);
+ if (storage == NULL)
+ return NW_STAT_OUT_OF_MEMORY;
+
+ if ((dest->storage != NULL) && (destLength > 0))
+ {
+ NW_Mem_memcpy(storage, dest->storage, destLength);
+ NW_Mem_memcpy(storage + destLength, source->storage, sourceLength);
+ }
+ else
+ {
+ NW_Mem_memcpy(storage, source->storage, sourceLength);
+ }
+ NW_String_deleteStorage(dest);
+ dest->storage = storage;
+ dest->length = destLength +sourceLength;
+ /* Since we allocated the new storage, we own it */
+ NW_String_setUserOwnsStorage(dest);
+ return NW_STAT_SUCCESS;
+}
+
+NW_Byte *
+NW_String_findChar(NW_String_t *string, NW_Int32 character, NW_Uint32 encoding)
+{
+ NW_Byte *storage;
+ NW_Uint32 length;
+ NW_Uint32 index, numbytes;
+ NW_Ucs2 c;
+
+ if (string == NULL)
+ return NULL;
+
+ length = NW_String_getCharCount(string, encoding);
+ storage = string->storage;
+
+ for (index= 0; index<length; index++)
+ {
+ /* read UCS2 character and advance pointer */
+ numbytes = NW_String_readChar(storage, &c, encoding);
+ if (c == character) {
+ return storage;
+ }
+ storage += numbytes;
+ }
+
+ return NULL;
+}
+
+
+/*
+ * Functions
+ */
+
+/*
+* IN - No of characters
+*/
+NW_Status_t
+NW_String_ucs2CharInit(NW_Ucs2 **data, NW_Uint32 length)
+{
+ NW_ASSERT(data != NULL);
+
+ if ((*data = (NW_Ucs2*) NW_Mem_Malloc (length *sizeof(NW_Ucs2))) == NULL) {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ return NW_STAT_SUCCESS;
+}
+
+EXPORT_C NW_Int32
+NW_String_ucs2CharLength (NW_Ucs2 *data)
+{
+ NW_Int32 length = 0;
+
+ if (data == NULL)
+ return -1;
+
+ while(*data != 0)
+ {
+ length++;
+ data++;
+ }
+ return length;
+}
+/*
+ * Given an arbitrary NW_Byte array with no known character encoding,
+ * convert it to a NW_Ucs2 string.
+ *
+ */
+EXPORT_C NW_Status_t
+NW_String_byteToUCS2Char (NW_Byte * b, NW_Uint32 length, NW_Ucs2 **data)
+{
+ NW_Status_t status;
+ NW_Byte *p = b;
+ NW_Uint32 i = 0;
+
+ NW_ASSERT(length != 0);
+ NW_ASSERT(b != NULL);
+
+ /*Need an extra NW_Byte for the null-terminator */
+ status = NW_String_ucs2CharInit(data, length + 1);
+ if (status != NW_STAT_SUCCESS)
+ return status;
+
+ for (i = 0; i < length; i++, p++)
+ {
+ (*data)[i] = *p;
+ }
+
+ /* Null-terminate the string */
+ (*data)[length] = '\000';
+
+ return NW_STAT_SUCCESS;
+}
+
+
+EXPORT_C NW_Status_t
+NW_String_entityToUCS2Char(NW_Uint32 entity, NW_Ucs2 **data)
+{
+ NW_Status_t status;
+
+ NW_ASSERT(data != NULL);
+
+ status = NW_String_ucs2CharInit(data, 2);
+ if (status != NW_STAT_SUCCESS)
+ return status;
+
+ (*data)[0] = (NW_Ucs2)entity;
+ (*data)[1] = 0;
+
+ return NW_STAT_SUCCESS;
+}
+
+/*
+NW_Status_t
+NW_String_tokenToUCS2Char(NW_Uint32 token, NW_Ucs2 **data)
+{
+ NW_String_UCS2Buff_t *t;
+
+ // Get the tag from the dictionary
+ if ((t = NW_WBXML_Dictionary_getTagByFqToken (token)) == NULL)
+
+ // This can happen if the token is not defined or if the dictonary
+ //for this token's codepage is not defined. So, make a string
+ //from the token.
+ //
+ return NW_STAT_FAILURE;
+
+ return NW_String_UCS2BuffToUCS2Char(t, data);
+}
+*/
+
+EXPORT_C NW_Status_t
+NW_String_stringToUCS2Char(const NW_String_t* string,
+ NW_Uint32 encoding,
+ NW_Ucs2 **data)
+{
+ NW_Uint32 i;
+ NW_Int32 numChars;
+ NW_Ucs2 c = 1;
+ NW_Uint32 count = 0;
+ NW_Byte *b = string->storage;
+ NW_Status_t status;
+ NW_Int32 retval = 0;
+ NW_Uint32 numBytes = 0;
+
+ if (b == NULL)
+ {
+ *data = NULL;
+ }
+ else
+ {
+ numChars = NW_String_charBuffGetLength(b, encoding, &numBytes);
+ if(numChars < 0){
+ return NW_STAT_FAILURE;
+ }
+
+ /* allocate the memory and point to it with *data */
+ status = NW_String_ucs2CharInit(data, (NW_Uint32)numChars+1);
+
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ /* copy the characters out of string->storage onto *data */
+ for (i=0; c != 0; i++) {
+ retval = NW_String_readChar((NW_Byte *) b + count, &c, encoding);
+ if(retval < 0){
+ NW_Mem_Free( *data );
+ *data = NULL;
+ return NW_STAT_FAILURE;
+ }
+ count += (NW_Uint32)retval;
+ (*data)[i] = c;
+ }
+
+ /* finally null terminate the string storage */
+ (*data)[numChars] = 0;
+ }
+ return NW_STAT_SUCCESS;
+}
+/*
+NW_Status_t
+NW_String_UCS2BuffToUCS2Char(NW_String_UCS2Buff_t *buff, NW_Ucs2 **data)
+{
+ NW_Int32 numChars = 0;
+ NW_Uint32 count;
+ NW_Status_t status;
+
+ NW_ASSERT(buff != NULL);
+ NW_ASSERT(data != NULL);
+
+ numChars = NW_String_charBuffGetLength(buff, HTTP_iso_10646_ucs_2, &count);
+ if (numChars < 0) {
+ return NW_STAT_FAILURE;
+ }
+ // Create the storage and copy the bytes
+ status = NW_String_ucs2CharInit(data, (NW_Uint32)numChars+1);
+ if (status != NW_STAT_SUCCESS) {
+ return status;
+ }
+ (void)NW_Mem_memcpy(*data, buff, (NW_Uint32) numChars * sizeof(NW_Ucs2));
+ (*data)[numChars] = 0;
+
+ return NW_STAT_SUCCESS;
+}
+*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/tinydom/src/tiny_dom.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,1673 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include "cxml_internal.h"
+#include <xml/cxml/nw_tinydom.h>
+#include <xml/cxml/nw_wbxml_parse.h>
+#include <xml/cxml/nw_wbxml_reader.h>
+#include <xml/cxml/nw_wbxml_event.h>
+#include "nw_wbxml_parsei.h"
+
+/*Parser flags */
+
+/* Top four bits are pass state */
+#define T_PARSE_PASS_MASK 0xF0000000
+#define T_PARSE_PASS_1 0x00000000
+#define T_PARSE_PASS_2 0x10000000
+#define T_PARSE_PASS_3 0x20000000
+
+/* Next 8 bits are for parser states */
+#define T_PARSE_S_MASK 0x07F00000
+#define T_PARSE_S_TAG_START 0x00000000
+#define T_PARSE_S_ATTR_START 0x00100000
+#define T_PARSE_S_ATTR_VALS 0x00200000
+#define T_PARSE_S_CONTENT 0x00300000
+#define T_PARSE_F_EXT 0x08000000 /* Extension substate flag */
+
+ /* Remaining 20 bits are flags */
+#define T_PARSE_FLAG_TEXT 0x00000001
+#define T_PARSE_FLAG_ATTR 0x00000002
+
+/*
+* Implements the tiny dom parser. This includes the methods to build a
+* tiny dom tree, and the underlying support routines to access the
+* "virtual elements" of the tree. The only thing that currently gets
+* in the way of a clean parser interface are several references to the
+* underlying parser state here. The underlying parser needs to be
+* fixed so it is never necessary to pass this. Several TODOs in this
+* file indicate places where references to parser state should be
+* removed.
+*/
+
+static
+NW_Uint32
+GET_PASS(NW_TinyDom_Parser_t* parser){
+ return parser->state & T_PARSE_PASS_MASK;
+}
+
+static
+void
+SET_PASS(NW_TinyDom_Parser_t* parser, NW_Uint32 pass){
+ parser->state &= ~T_PARSE_PASS_MASK;
+ parser->state |= pass;
+}
+
+static
+NW_Uint32
+GET_STATE(NW_TinyDom_Parser_t* parser){
+ return parser->state & T_PARSE_S_MASK;
+}
+
+static
+void
+SET_STATE(NW_TinyDom_Parser_t* parser, NW_Uint32 state){
+ parser->state &= ~T_PARSE_S_MASK;
+ parser->state |= state;
+}
+
+/* Callbacks to handle parsing passes:
+*
+* Tiny dom uses multiple passes to implement the tree lazily. The
+* first two build the tree. Later, lazy deserialization invokes
+* further passes over parts of the source.
+*
+* Pass 1 counts nodes and allocates space, pass 2 builds the
+* tree. However, there is much common behavior for both passes, since
+* accurate counting of nodes requires running the parser state
+* machine. Common behavior is implemented in common callbacks, while
+* pass-specific behavior is mostly implemented in pass-specific
+* callbacks.
+*
+* The tree built by passes 1 & 2 contains a node for every tag. If a tag
+* has attributes, the tree contains a node for the first attribute,
+* attached as the first child of the node. For text content, the tree
+* contains a node for the first text element in each sequence of text
+* elements. The goal of the tree design is to make it easy to find
+* elements for deserialization while using the minimum amount of
+* storage.
+*
+* The deserialization API invokes parser methods that know how to
+* parse one of the node types stored in the tree (tags, attributes,
+* text). The API sets the parser offset using the node offset,
+* identifies the node type using the node type flags, and then calls
+* the appropriate parser method to parse a section of the source.
+*
+* When called for deserialization the parser generates events as usual:
+* these are handled by the pass 3 handlers which build the appropriate
+* data structures for the API to return.
+*
+* This may seem like a rather byzantine mechanism for
+* deserialization, but the goal is to use exactly the same parsing
+* code for all operations on the source. This makes it easy to change
+* or replace parsing code. Also, all of the parsing logic is kept in
+* the parser module: the dom module (this one) has no knowledge of
+* parsing. This makes it easy to attach the dom module to different
+* parsers (one for wbxml, one for xml).
+*
+* A note on buffer usage: tiny trees use segmented expandable buffers
+* (ebuffers) so that the tree can be read and written in minimum memory.
+* When building a tree from an existing buffer (passes 1 & 2), the whole
+* buffer is contained in the ebuffer segment 0. This means that the
+* offsets we store in the tree nodes (which are indexes into the ebuffer)
+* are the same as the parser offsets in the buffer. However, for
+* deserialization (pass 3), we may be reading a tree that was constructed
+* or modified via the dom api. This may have multiple segments and a given
+* node offset may refer to an address in any segment. Therefore, when setting
+* the parser offset from a node source offset, we first need to translate
+* the node source offset into a segment + offset form, and use this to set
+* the parser.
+*/
+
+
+static
+NW_Status_t
+Pass_1_StartDocument_CB (NW_WBXML_Parser_t *parser,
+ NW_WBXML_Document_t *doc,
+ void *context)
+{
+
+ NW_TinyDom_Parser_t *tiny_parser = (NW_TinyDom_Parser_t*)context;
+
+ NW_REQUIRED_PARAM(parser);
+ NW_REQUIRED_PARAM(doc);
+
+ SET_STATE(tiny_parser, T_PARSE_S_CONTENT);
+ tiny_parser->state &= ~T_PARSE_FLAG_TEXT; /* prepare for text */
+ tiny_parser->node_count = 1;
+ return NW_STAT_SUCCESS;
+
+}
+
+static
+NW_Status_t
+Pass_2_StartDocument_CB (NW_WBXML_Parser_t *parser,
+ NW_WBXML_Document_t *doc,
+ void *context)
+{
+ NW_TinyDom_Parser_t *tiny_parser = (NW_TinyDom_Parser_t*)context;
+
+ NW_REQUIRED_PARAM(parser);
+ NW_REQUIRED_PARAM(doc);
+
+ tiny_parser->dom_tree->root_node = NW_TinyTree_setRoot(&(tiny_parser->dom_tree->tree), 0);
+
+ if (tiny_parser->dom_tree->root_node != NULL){
+ tiny_parser->current_node = tiny_parser->dom_tree->root_node;
+ NW_TinyTree_Node_setUserFlags(tiny_parser->current_node, T_DOM_NODE_DOC);
+ SET_STATE(tiny_parser, T_PARSE_S_CONTENT);
+ tiny_parser->state &= ~T_PARSE_FLAG_TEXT; /* prepare for text */
+ return NW_STAT_SUCCESS;
+ }
+ else{
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+}
+
+/* Private utility function to do NW_Byte reordering of ucs2 strings */
+/* TODO: move this to our string library */
+
+static
+void
+NW_String_Ucs2_ntoh(NW_String_t *string){
+ NW_Uint32 i;
+ NW_Ucs2 character;
+
+ for(i = 0; i < string->length; i+=2){
+ character = (NW_Ucs2)((string->storage[i] << 8) | string->storage[i+1]);
+ (void) NW_Mem_memcpy (&string->storage[i], &character, sizeof (character));
+ }
+}
+
+/*
+ * This callback sets the parser pass and takes care of any NW_Byte reordering
+ * that needs to be done on the string table. For some encodings (such as ucs2)
+ * this allows applications to reference strings from the original storage.
+ */
+
+/* TODO: TODO: Add a flag to document to check if this has already been done
+ (in case the same buffer is parsed over again from the beginning.)
+ */
+
+
+static
+NW_Status_t
+Pass_1_EndDocument_CB (NW_WBXML_Parser_t *parser,
+ void *context)
+{
+
+ NW_TinyDom_Parser_t *tiny_parser = (NW_TinyDom_Parser_t*)context;
+ //NW_String_t string;
+ //NW_WBXML_Document_t *doc = tiny_parser->dom_tree->doc;
+
+ NW_REQUIRED_PARAM(parser);
+
+ // WLIU: all byte order conversions are moved to pass 2.
+ //if(doc->charset == HTTP_iso_10646_ucs_2){
+ /* TODO: redefine string table as an NW_String_t ?? */
+ //string.storage = doc->strtbl.data;
+ //string.length = doc->strtbl.length;
+ //NW_String_Ucs2_ntoh(&string);
+ //}
+ SET_PASS(tiny_parser, T_PARSE_PASS_2);
+ return NW_STAT_SUCCESS;
+}
+
+
+static
+NW_Status_t
+Pass_2_EndDocument_CB (NW_WBXML_Parser_t *parser,
+ void *context)
+{
+
+ NW_TinyDom_Parser_t *tiny_parser = (NW_TinyDom_Parser_t*)context;
+
+ NW_REQUIRED_PARAM(parser);
+
+ SET_PASS(tiny_parser, T_PARSE_PASS_3);
+ return NW_STAT_SUCCESS;
+}
+
+static
+NW_Status_t
+Pass_1_Tag_Start_CB (NW_WBXML_Parser_t *parser,
+ void *context)
+{
+
+ NW_TinyDom_Parser_t *tiny_parser = (NW_TinyDom_Parser_t*)context;
+
+ NW_REQUIRED_PARAM(parser);
+
+ tiny_parser->node_count++;
+ return NW_STAT_SUCCESS;
+}
+
+
+static
+NW_Status_t
+Pass_2_Tag_Start_CB (NW_WBXML_Parser_t *parser,
+ void *context)
+{
+ NW_Status_t status = NW_STAT_SUCCESS;
+ NW_TinyDom_Parser_t *tiny_parser = (NW_TinyDom_Parser_t*)context;
+
+ //Atleast there should be root node, before any tag
+
+ if(tiny_parser->current_node != NULL)
+ {
+ tiny_parser->current_node =
+ NW_TinyTree_createChild(&(tiny_parser->dom_tree->tree),
+ tiny_parser->current_node,
+ (NW_TinyTree_Offset_t)parser->offset);
+
+ if (tiny_parser->current_node != NULL)
+ {
+ NW_TinyTree_Node_setUserFlags(tiny_parser->current_node, T_DOM_NODE_TAG);
+ status = NW_STAT_SUCCESS;
+ }
+ else
+ {
+ status = NW_STAT_FAILURE;
+ }
+ }//endif(tiny_parser->current_node != NULL)
+ else
+ {
+ status = NW_STAT_FAILURE;
+ }
+
+ return status;
+}//end Pass_2_Tag_Start_CB(..)
+
+
+static
+NW_Status_t
+Tag_Start_CB (NW_WBXML_Parser_t *parser,
+ void *context)
+
+{
+ NW_TinyDom_Parser_t *tiny_parser = (NW_TinyDom_Parser_t*)context;
+ NW_Status_t s = NW_STAT_FAILURE;
+
+ switch(GET_PASS(tiny_parser)){
+ case T_PARSE_PASS_1:
+ s = Pass_1_Tag_Start_CB(parser, context);
+ break;
+ case T_PARSE_PASS_2:
+ s = Pass_2_Tag_Start_CB(parser, context);
+ break;
+ default:
+ NW_ASSERT(NW_FALSE);
+ }
+ SET_STATE(tiny_parser, T_PARSE_S_TAG_START);
+ tiny_parser->state &= ~T_PARSE_FLAG_TEXT; /* No longer accumulating text */
+ tiny_parser->state &= ~T_PARSE_FLAG_ATTR; /* Turn off attribute flag */
+ return s;
+}
+
+static
+NW_Status_t
+Pass_2_Pi_CB (NW_WBXML_Parser_t *parser,
+ void *context)
+{
+ /* This is exactly like pass 2 tag start except for the node user flag. */
+ NW_TinyDom_Parser_t *tiny_parser = (NW_TinyDom_Parser_t*)context;
+ NW_Status_t s = Tag_Start_CB(parser, context);
+
+ if (s == NW_STAT_SUCCESS) {
+ NW_TinyTree_Node_setUserFlags(tiny_parser->current_node, T_DOM_NODE_PI);
+ }
+ return s;
+}
+
+static
+NW_Status_t
+Tag_End_CB (NW_WBXML_Parser_t *parser,
+ void *context)
+{
+ NW_Status_t status = NW_STAT_SUCCESS;
+ NW_TinyDom_Parser_t *tiny_parser = (NW_TinyDom_Parser_t*)context;
+ NW_Int32 lastvalid;
+ NW_REQUIRED_PARAM(parser);
+
+ lastvalid = NW_TinyDom_getLastValid(tiny_parser->dom_tree);
+ if(GET_PASS(tiny_parser)== T_PARSE_PASS_2)
+ {
+ /* for the dom tree appending, we won't handle close tag which is beyond last valid mark */
+ if (lastvalid == -1 || (NW_Int32)parser->offset <= lastvalid)
+ {
+ if(tiny_parser->current_node != NULL)
+ {
+ tiny_parser->current_node = NW_TinyTree_findParent(tiny_parser->current_node);
+ }
+ else
+ {
+ status = NW_STAT_FAILURE;
+ }
+ }
+ }
+
+ if(status == NW_STAT_SUCCESS)
+ {
+ SET_STATE(tiny_parser, T_PARSE_S_CONTENT);
+ tiny_parser->state &= ~T_PARSE_FLAG_TEXT; /* No longer accumulating text */
+ }
+ return status;
+}//end Tag_End_CB (..)
+
+/*
+* The first attribute is added as (first) child of the current node.
+* This makes it easy to find attributes for later deserialization
+*/
+
+static
+NW_Status_t
+Attr_Start_CB (NW_WBXML_Parser_t *parser,
+ void *context)
+{
+ NW_Status_t status = NW_STAT_SUCCESS;
+
+ NW_TinyTree_Node_t* attr_node;
+ NW_TinyDom_Parser_t *tiny_parser = (NW_TinyDom_Parser_t*)context;
+
+ switch(GET_STATE(tiny_parser)){
+ case T_PARSE_S_TAG_START:
+ case T_PARSE_S_ATTR_START:
+ case T_PARSE_S_ATTR_VALS:
+ if((tiny_parser->state & T_PARSE_FLAG_ATTR) != T_PARSE_FLAG_ATTR){
+ tiny_parser->state |= T_PARSE_FLAG_ATTR;
+ switch (GET_PASS(tiny_parser)){
+ case T_PARSE_PASS_1:
+ tiny_parser->node_count++;
+ break;
+ case T_PARSE_PASS_2:
+ attr_node = NW_TinyTree_createChild(&(tiny_parser->dom_tree->tree),
+ tiny_parser->current_node,
+ (NW_TinyTree_Offset_t)parser->offset);
+ if (attr_node != NULL){
+ NW_TinyTree_Node_setUserFlags(attr_node, T_DOM_NODE_ATTR);
+ }
+ else{
+ status = NW_STAT_OUT_OF_MEMORY;
+ }
+ break;
+ default:
+ NW_ASSERT(NW_FALSE);
+ status = NW_STAT_FAILURE;
+ }
+ }
+ SET_STATE(tiny_parser, T_PARSE_S_ATTR_START);
+ break;
+ default:
+ status = NW_STAT_FAILURE;
+ }
+ return status;
+}
+
+static
+NW_Status_t
+Attr_Val_CB (NW_WBXML_Parser_t *parser,
+ void *context)
+{
+
+ NW_TinyDom_Parser_t *tiny_parser = (NW_TinyDom_Parser_t*)context;
+
+ NW_REQUIRED_PARAM(parser);
+
+ switch(GET_STATE(tiny_parser)){
+ case T_PARSE_S_ATTR_START:
+ case T_PARSE_S_ATTR_VALS:
+ SET_STATE(tiny_parser,T_PARSE_S_ATTR_VALS);
+ return NW_STAT_SUCCESS;
+ default:
+ return NW_STAT_FAILURE;
+ }
+}
+
+static
+NW_Status_t
+Content_CB (NW_WBXML_Parser_t *parser,
+ void *context)
+{
+
+ NW_TinyDom_Parser_t *tiny_parser = (NW_TinyDom_Parser_t*)context;
+
+ SET_STATE(tiny_parser, T_PARSE_S_CONTENT);
+ /* We need to save the current offset to use if we need a text node. Ugh! */
+ tiny_parser->content_offset = (NW_TinyTree_Offset_t)parser->offset;
+ return NW_STAT_SUCCESS;
+}
+
+/* Count code page switches */
+
+static
+NW_Status_t
+Pass_1_CodePage_CB (NW_WBXML_Parser_t *parser,
+ void *context)
+{
+ NW_TinyDom_Parser_t *tiny_parser = (NW_TinyDom_Parser_t*)context;
+
+ NW_REQUIRED_PARAM(parser);
+
+ tiny_parser->cp_count++;
+ return NW_STAT_SUCCESS;
+}
+
+
+/*
+* The first text element in a series of text elements is added as
+* a child to the current element. This may be followed by several more
+* text elements in the source buffer.
+*/
+
+static
+NW_Status_t
+Text_CB (NW_WBXML_Parser_t *parser,
+ NW_Uint32 val,
+ void *context)
+{
+ NW_Status_t status = NW_STAT_SUCCESS;
+
+ NW_TinyTree_Node_t* text_node;
+ NW_TinyDom_Parser_t *tiny_parser = (NW_TinyDom_Parser_t*)context;
+
+ NW_REQUIRED_PARAM(parser);
+ NW_REQUIRED_PARAM(val);
+
+ /*We're getting content but aren't yet accumulating text */
+ if((GET_STATE(tiny_parser)==T_PARSE_S_CONTENT)
+ &&((tiny_parser->state & T_PARSE_FLAG_TEXT) != T_PARSE_FLAG_TEXT)){
+
+ switch(GET_PASS(tiny_parser)){
+ case T_PARSE_PASS_1:
+ tiny_parser->node_count++;
+ break;
+ case T_PARSE_PASS_2:
+ /* Attach text as child to current node. */
+
+ if(tiny_parser->current_node != NULL)
+ {
+ text_node = NW_TinyTree_createChild(&(tiny_parser->dom_tree->tree),
+ tiny_parser->current_node,
+ tiny_parser->content_offset);
+ if (text_node != NULL){
+ NW_TinyTree_Node_setUserFlags(text_node, T_DOM_NODE_TEXT);
+ }
+ else{
+ status = NW_STAT_FAILURE;
+ }
+ }
+ else
+ {
+ status = NW_STAT_FAILURE;
+ }
+ break;
+ default:
+ NW_ASSERT(NW_FALSE);
+ status = NW_STAT_FAILURE;
+ }
+ tiny_parser->state |= T_PARSE_FLAG_TEXT;
+ }
+ return status;
+}
+
+
+
+static
+NW_Status_t
+Pass_1_InlineString_CB (NW_WBXML_Parser_t *parser,
+ NW_Uint32 len,
+ void *context)
+{
+
+ return Text_CB(parser, len, context);
+
+}
+
+/*
+ * Pass 2 text callback to adjust the NW_Byte ordering of inline strings if needed.
+ * For some string encodings (such as ucs2) this allows the application to reference
+ * them directly from the original storage //TODO: Add a flag to buffer
+ */
+
+static
+NW_Status_t
+Pass_2_InlineString_CB (NW_WBXML_Parser_t *parser,
+ NW_Uint32 len,
+ void *context)
+{
+
+ NW_String_t string;
+ NW_TinyDom_Parser_t *tiny_parser = (NW_TinyDom_Parser_t*)parser->context;
+
+
+ if(tiny_parser->dom_tree->doc->charset == HTTP_iso_10646_ucs_2)
+ {
+ NW_WBXML_Parser_getStringInline(parser, tiny_parser->dom_tree->doc,
+ &string);
+ NW_String_Ucs2_ntoh(&string);
+ }
+
+ return Text_CB(parser, len, context);
+}
+
+
+
+static
+NW_Status_t
+Extension_CB (NW_WBXML_Parser_t *parser,
+ void *context){
+
+ return Text_CB(parser, 0, context);
+
+}
+
+
+static const NW_WBXML_EventHandler_t Pass_1_Handler = {
+ Pass_1_StartDocument_CB,
+ Pass_1_EndDocument_CB,
+ Tag_Start_CB, /* PI treated exactly like tag start in pass 1 */
+ 0,
+ Tag_Start_CB,
+ Tag_End_CB,
+ Attr_Start_CB,
+ Attr_Val_CB,
+ Content_CB,
+ Pass_1_CodePage_CB,
+ Extension_CB,
+ 0,
+ 0,
+ Pass_1_InlineString_CB,
+ Text_CB,
+ Text_CB,
+ Text_CB,
+ Text_CB,
+ 0 /*TODO: Add exception callback */
+};
+
+static const NW_WBXML_EventHandler_t Pass_2_Handler = {
+ Pass_2_StartDocument_CB,
+ Pass_2_EndDocument_CB,
+ Pass_2_Pi_CB,
+ Tag_End_CB, /* PI end treated exactly like tag end in pass 2 */
+ Tag_Start_CB,
+ Tag_End_CB,
+ Attr_Start_CB,
+ Attr_Val_CB,
+ Content_CB,
+ 0,
+ Extension_CB,
+ 0,
+ 0,
+ Pass_2_InlineString_CB,
+ Text_CB,
+ Text_CB,
+ Text_CB,
+ Text_CB,
+ 0
+};
+
+void
+NW_TinyDom_Tree_construct(NW_TinyDom_Tree_t* dom_tree,
+ NW_WBXML_Parser_t* parser,
+ NW_WBXML_Document_t* doc,
+ NW_WBXML_Writer_t* writer)
+{
+ NW_ASSERT(dom_tree != NULL);
+ dom_tree->doc = doc;
+ dom_tree->parser = parser;
+ dom_tree->writer = writer;
+ dom_tree->root_node = 0;
+/* dom_tree->tree = 0;*/
+}
+
+void
+NW_TinyDom_Tree_destruct(NW_TinyDom_Tree_t* dom_tree)
+{
+ if (dom_tree != NULL) {
+ NW_TinyTree_destruct(&(dom_tree->tree));
+ }
+}
+
+EXPORT_C void
+NW_TinyDom_Parser_construct(NW_TinyDom_Parser_t* dom_parser,
+ NW_TinyDom_Tree_t *dom_tree)
+{
+ dom_parser->state = 0;
+ dom_parser->node_count = 0;
+ dom_parser->cp_count = 0;
+ dom_parser->current_node = 0;
+ dom_parser->content_offset = 0;
+ dom_parser->dom_tree = dom_tree;
+}
+
+/* Build the tree by running pass 1 and pass 2. */
+
+/* TODO: ADD OUT OF MEMORY HANDLER!!! */
+
+NW_Status_t
+NW_TinyDom_Parser_buildTree(NW_TinyDom_Parser_t *dom_parser,
+ char *buffer,
+ NW_Uint32 buffsize,
+ NW_Bool freeBuff)
+{
+
+ NW_Status_t status;
+ NW_WBXML_CP_Registry_Entry_t* registry;
+ NW_WBXML_Dictionary_t* dictionary = NULL;
+ NW_String_t string;
+
+ /* Run pass 1 (count nodes and code page switches) */
+
+ status = NW_WBXML_Parser_registerHandler(dom_parser->dom_tree->parser,
+ &Pass_1_Handler,
+ (void *) dom_parser);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ status = NW_WBXML_Parser_parseBuffer (dom_parser->dom_tree->parser,
+ dom_parser->dom_tree->doc,
+ (NW_Byte *) buffer, buffsize);
+
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ /* Initialize the writer */
+
+ /* First get the dictionary */
+ dictionary = NW_WBXML_Dictionary_getByIndex(dom_parser->dom_tree->parser->dictionary);
+
+ if(dictionary == NULL){
+ return NW_STAT_FAILURE;
+ }
+
+ /* Initialize the writer */
+
+ NW_WBXML_Writer_Initialize(dom_parser->dom_tree->writer,
+ 0, NULL,
+ NULL,
+ dictionary,
+ dictionary,
+ NW_Encoder_StringTable_getStringTableOffset,
+ NW_Encoder_StringTable_addToStringTable,
+ dom_parser->dom_tree->doc->strtbl_extension,
+ NW_Encoder_StringTable_StringTableIterateInit,
+ NW_Encoder_StringTable_StringTableIterateNext,
+ NW_TRUE /* sizing only pass */);
+
+ /* Setup the tree and any code page registry */
+
+ status = NW_TinyTree_construct(&(dom_parser->dom_tree->tree),
+ (CXML_Vector_Metric_t)(dom_parser->node_count/4 + 2),
+ buffer,
+ buffsize,
+ (void*)dom_parser,
+ freeBuff);
+ if (status != NW_STAT_SUCCESS) {
+ return status;
+ }
+
+ /* TODO: move all of this down into the wbxml parser itself */
+ if(dom_parser->cp_count > 0){
+ /* There are code page switches, so add a code page registry */
+ registry = (NW_WBXML_CP_Registry_Entry_t*)
+ NW_Mem_Malloc((dom_parser->cp_count + 1) * sizeof (NW_WBXML_CP_Registry_Entry_t));
+ if (registry == NULL){
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ NW_Mem_memset(registry, 0, (dom_parser->cp_count + 1) * sizeof (NW_WBXML_CP_Registry_Entry_t) );
+
+
+ status = NW_WBXML_Parser_addCPRegistry(dom_parser->dom_tree->parser,
+ registry, dom_parser->cp_count);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ }
+ /* Run pass 2 (build tree and any code page registry) */
+ NW_WBXML_Parser_reset (dom_parser->dom_tree->parser);
+ NW_WBXML_Parser_registerHandler (dom_parser->dom_tree->parser,
+ &Pass_2_Handler,
+ (void*) dom_parser);
+ if(dom_parser->dom_tree->doc->charset == HTTP_iso_10646_ucs_2){
+ string.storage = dom_parser->dom_tree->doc->strtbl.data;
+ string.length = dom_parser->dom_tree->doc->strtbl.length;
+
+ if (string.length)
+ NW_String_Ucs2_ntoh(&string);
+ }
+ /* set last valid to undefined for non-appending dom tree parsing */
+ NW_TinyDom_setLastValid(dom_parser->dom_tree, -1);
+ status = NW_WBXML_Parser_parseBuffer(dom_parser->dom_tree->parser,
+ dom_parser->dom_tree->doc,
+ (NW_Byte *) buffer,
+ buffsize);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ return NW_STAT_SUCCESS;
+}
+
+/**********************************************************
+*/
+NW_Status_t
+NW_TinyDom_Parser_incrementalBuildTree(
+ NW_TinyDom_Parser_t *dom_parser,
+ char *buffer,
+ NW_Uint32 buffsize,
+ NW_Bool freeBuff,
+ NW_Int32 lastValid)
+{
+
+ NW_Status_t status;
+ NW_WBXML_CP_Registry_Entry_t *old_registry, *registry;
+ NW_WBXML_Dictionary_t* dictionary = NULL;
+ NW_Uint32 old_cp_offset = 0;
+ NW_String_t string;
+
+ if (dom_parser->dom_tree->tree.tree == NULL)
+ {
+ status = NW_TinyTree_construct(&(dom_parser->dom_tree->tree),
+ (CXML_Vector_Metric_t)(10),/*todo: remove hardcode number */
+ buffer,
+ buffsize,
+ (void*)dom_parser,
+ freeBuff);
+ if (status != NW_STAT_SUCCESS) {
+ goto finish_ibuildtree;
+ }
+ }
+ /* Initialize the writer */
+ if (dom_parser->dom_tree->parser->dictionary == 0)
+ {
+ dom_parser->dom_tree->parser->p = (NW_Byte *)buffer;
+ dom_parser->dom_tree->parser->left = buffsize;
+ if ((status = NW_WBXML_Parser_docHeaderParse (dom_parser->dom_tree->parser, dom_parser->dom_tree->doc))
+ != NW_STAT_SUCCESS)
+ goto finish_ibuildtree;
+
+ /* Now get the dictionary from the document */
+
+ if (dom_parser->dom_tree->doc->publicid > 0){
+ dom_parser->dom_tree->parser->dictionary =
+ NW_WBXML_Dictionary_getIndexByPublicId (dom_parser->dom_tree->doc->publicid);
+ }
+
+ else if (dom_parser->dom_tree->doc->doc_type){
+ dom_parser->dom_tree->parser->dictionary =
+ NW_WBXML_Dictionary_getIndexByDocType (dom_parser->dom_tree->doc->doc_type, dom_parser->dom_tree->doc->charset);
+ }
+
+ /* If a dictionary could not be attained try using the default public id */
+ if (dom_parser->dom_tree->parser->dictionary == 0){
+ dom_parser->dom_tree->doc->publicid = dom_parser->dom_tree->doc->default_public_id;
+ dom_parser->dom_tree->parser->dictionary =
+ NW_WBXML_Dictionary_getIndexByPublicId (dom_parser->dom_tree->doc->publicid);
+ }
+
+ /* Make the StartDocument callback */
+ /* Run pass 2 (build tree and any code page registry) */
+ NW_WBXML_Parser_registerHandler (dom_parser->dom_tree->parser,
+ &Pass_2_Handler,
+ (void*) dom_parser);
+ SET_PASS(dom_parser, T_PARSE_PASS_2);
+
+ if (dom_parser->dom_tree->parser->handler && dom_parser->dom_tree->parser->handler->StartDocument_CB)
+ {
+ status = (*(dom_parser->dom_tree->parser->handler->StartDocument_CB)) (dom_parser->dom_tree->parser,
+ dom_parser->dom_tree->doc, dom_parser);
+ if (status != NW_STAT_SUCCESS)
+ goto finish_ibuildtree;
+ }
+
+ /* Initialize the writer */
+ NW_WBXML_Writer_Initialize(dom_parser->dom_tree->writer,
+ 0, NULL,
+ NULL,
+ dictionary,
+ dictionary,
+ NW_Encoder_StringTable_getStringTableOffset,
+ NW_Encoder_StringTable_addToStringTable,
+ dom_parser->dom_tree->doc->strtbl_extension,
+ NW_Encoder_StringTable_StringTableIterateInit,
+ NW_Encoder_StringTable_StringTableIterateNext,
+ NW_TRUE /* sizing only pass */);
+ }
+ else
+ {
+ dom_parser->dom_tree->parser->p = (NW_Byte *)buffer + dom_parser->dom_tree->parser->offset;
+ dom_parser->dom_tree->parser->left = buffsize - dom_parser->dom_tree->parser->offset;
+
+ // copy the previous Ebuffer to overwrite the previous part of wbxml buffer.
+ // since the previous part has native endianess, the conversion of endianess
+ // (big endian to little endian) only occurs to new contents.
+ (void)NW_Mem_memcpy(
+ buffer, dom_parser->dom_tree->tree.ebuffer->segmentList->storage,
+ dom_parser->dom_tree->parser->offset);
+
+ }
+ /* First get the dictionary */
+ dictionary = NW_WBXML_Dictionary_getByIndex(dom_parser->dom_tree->parser->dictionary);
+
+ if(dictionary == NULL){
+ status = NW_STAT_FAILURE;
+ goto finish_ibuildtree;
+ }
+
+ /* Setup the tree and any code page registry */
+
+
+ NW_TinyDom_setLastValid(dom_parser->dom_tree, lastValid);
+
+ /* TODO: move all of this down into the wbxml parser itself */
+ if(dom_parser->cp_count > 0){
+ /* There are code page switches, so add a code page registry */
+ old_registry = dom_parser->dom_tree->parser->cp_registry.storage;
+ registry = (NW_WBXML_CP_Registry_Entry_t*)NW_Mem_Malloc((dom_parser->cp_count + 1) * sizeof (NW_WBXML_CP_Registry_Entry_t));
+ if (registry == NULL){
+ status = NW_STAT_OUT_OF_MEMORY;
+ goto finish_ibuildtree;
+ }
+
+ NW_Mem_memset(registry, 0, ( (dom_parser->cp_count + 1) * sizeof (NW_WBXML_CP_Registry_Entry_t) ) );
+ if (old_registry)
+ {
+ old_cp_offset = dom_parser->dom_tree->parser->cp_registry.current - dom_parser->dom_tree->parser->cp_registry.storage;
+ NW_Mem_memcpy(registry, old_registry,
+ dom_parser->dom_tree->parser->cp_registry.count*sizeof(NW_WBXML_CP_Registry_Entry_t));
+ NW_Mem_Free(old_registry);
+ }
+ status = NW_WBXML_Parser_addCPRegistry(dom_parser->dom_tree->parser,
+ registry, dom_parser->cp_count);
+ if (status != NW_STAT_SUCCESS){
+ goto finish_ibuildtree;
+ }
+ dom_parser->dom_tree->parser->cp_registry.current = registry + old_cp_offset;
+ // WLIU_DEBUG: dom_parser->dom_tree->parser->cp_registry.realcount = old_cp_offset;
+ /* Make sure flag is not set, so that new cp entry could be added to the registry */
+ dom_parser->dom_tree->parser->flags &= ~NW_WBXML_REGISTRY_INIT;
+ }
+
+ //NW_WBXML_Parser_reset (dom_parser->dom_tree->parser);
+
+ /* Run pass 2 (build tree and any code page registry) */
+ NW_WBXML_Parser_registerHandler (dom_parser->dom_tree->parser,
+ &Pass_2_Handler,
+ (void*) dom_parser);
+ SET_PASS(dom_parser, T_PARSE_PASS_2);
+ SET_STATE(dom_parser, T_PARSE_S_CONTENT);
+ dom_parser->state &= ~T_PARSE_FLAG_TEXT; /* prepare for text */
+
+ // convert endianess if necessary
+ if(dom_parser->dom_tree->doc->charset == HTTP_iso_10646_ucs_2){
+ string.storage = dom_parser->dom_tree->doc->strtbl.data;
+ string.length = dom_parser->dom_tree->doc->strtbl.length;
+ if (string.length)
+ NW_String_Ucs2_ntoh(&string);
+ }
+
+ NW_TinyTree_EBuffer_Destruct (dom_parser->dom_tree->tree.ebuffer );
+
+ dom_parser->dom_tree->tree.ebuffer = NW_TinyTree_EBuffer_Construct((NW_Byte *)buffer,
+ buffsize,
+ NW_TINY_TREE_BLOCK_SIZE_DEFAULT,
+ freeBuff);
+
+ status = NW_WBXML_Parser_parseBuffer(dom_parser->dom_tree->parser,
+ dom_parser->dom_tree->doc,
+ (NW_Byte *) buffer,
+ buffsize);
+ //WLIU_DEBUG: dom_parser->dom_tree->parser->lastValid = NW_TinyDom_getLastValid(dom_parser->dom_tree);
+ if (status != NW_STAT_SUCCESS){
+ goto finish_ibuildtree;
+ }
+ dom_parser->dom_tree->parser->offset = NW_TinyDom_getLastValid(dom_parser->dom_tree);
+finish_ibuildtree:
+ return status;
+}
+
+/*****************************************************************************
+*/
+/* Get a pointer to the dom parser from the tiny tree */
+
+EXPORT_C NW_TinyDom_Parser_t*
+NW_TinyDom_getParser(NW_TinyTree_t *tree)
+
+{
+ return (NW_TinyDom_Parser_t*)NW_TinyTree_getContext(tree);
+}
+
+/* Get a pointer to the dom tree from a tiny tree */
+
+EXPORT_C NW_TinyDom_Tree_t*
+NW_TinyDom_getTree(NW_TinyTree_t *tree)
+
+{
+
+ NW_TinyDom_Parser_t *dom_parser;
+
+ dom_parser = NW_TinyDom_getParser(tree);
+ if(dom_parser != NULL){
+ return dom_parser->dom_tree;
+ }
+ return NULL;
+}
+
+/* Get the doc header from the tiny tree */
+
+NW_WBXML_Document_t *
+NW_TinyDom_getDocHeader(NW_TinyTree_t *tree)
+
+{
+ NW_TinyDom_Tree_t *dom_tree = NW_TinyDom_getTree(tree);
+
+ if(dom_tree != NULL){
+ return dom_tree->doc;
+ }
+ return NULL;
+}
+
+/* Deserialization API */
+
+NW_Uint16
+NW_TinyDom_Node_getType(NW_TinyTree_Node_t* node){
+ return (NW_Uint16)(NW_TinyTree_Node_getFlags(node) & TNODE_USR_FLAGS);
+}
+
+/* Deserialization callbacks */
+
+
+/*
+* Tag callbacks
+* TODO: Combine these with the rest of the pass 3 callbacks
+*/
+
+static
+NW_Status_t
+T_Tag_Start_CB (NW_WBXML_Parser_t *parser,
+ void *context)
+{
+ NW_TinyDom_Tag_t *tag = (NW_TinyDom_Tag_t*)context;
+ NW_TinyDom_Parser_t *tiny_parser = tag->tiny_parser;
+
+ NW_REQUIRED_PARAM(parser);
+
+ SET_STATE(tiny_parser, T_PARSE_S_TAG_START);
+ return NW_STAT_SUCCESS;
+}
+
+static
+NW_Status_t
+T_FQToken_CB (NW_WBXML_Parser_t *parser,
+ NW_Uint32 token,
+ void *context){
+
+ NW_TinyDom_Tag_t *tag = (NW_TinyDom_Tag_t*)context;
+ NW_TinyDom_Parser_t *tiny_parser = tag->tiny_parser;
+
+ NW_REQUIRED_PARAM(parser);
+
+ switch (GET_STATE(tiny_parser)){
+ case T_PARSE_S_TAG_START:
+ tag->fq_token = token;
+ break;
+ default:
+ return NW_STAT_SUCCESS;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+static
+NW_Status_t
+T_TableString_CB (NW_WBXML_Parser_t *parser,
+ NW_Uint32 index,
+ void *context)
+{
+ NW_TinyDom_Tag_t *tag = (NW_TinyDom_Tag_t*)context;
+ NW_TinyDom_Parser_t *tiny_parser = tag->tiny_parser;
+
+ NW_REQUIRED_PARAM(parser);
+
+ switch (GET_STATE(tiny_parser)){
+ case T_PARSE_S_TAG_START:
+ tag->name_index = index;
+ break;
+ default:
+ return NW_STAT_SUCCESS;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+static const NW_WBXML_EventHandler_t Tag_Handler = {
+ 0,
+ 0,
+ 0,
+ 0,
+ T_Tag_Start_CB,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ T_FQToken_CB,
+ 0,
+ T_TableString_CB,
+ 0,
+ 0,
+ 0,
+ 0
+};
+
+
+/*
+* Pass 3 callbacks. These are called by the parser when deserializing
+* text and attributes. Since text elements are just a subset of
+* attribute elements, almost exactly the same callbacks can be used
+* for both.
+*
+* Note that parser state between callbacks is only meaningful if the
+* callbacks are part of an atomic sequence. Such sequences always
+* start with an Attr_Start, Attr_Val or Content callback, followed by
+* one of the data type callbacks. Any attempt to use the parser state
+* machine in another way is not reentrant.
+*/
+
+static
+NW_Status_t
+Pass_3_Attr_Start_CB (NW_WBXML_Parser_t *parser,
+ void *context)
+{
+ NW_TinyDom_AttributeHandle_t *handle = (NW_TinyDom_AttributeHandle_t*)context;
+ NW_TinyDom_Parser_t *tiny_parser = handle->tlit.tiny_parser;
+
+ NW_REQUIRED_PARAM(parser);
+
+ SET_STATE(tiny_parser, T_PARSE_S_ATTR_START);
+ return NW_STAT_SUCCESS;
+}
+
+static
+NW_Status_t
+Pass_3_Attr_Val_CB (NW_WBXML_Parser_t *parser,
+ void *context)
+{
+ NW_TinyDom_AttributeHandle_t *handle = (NW_TinyDom_AttributeHandle_t*)context;
+ NW_TinyDom_Parser_t *tiny_parser = handle->tlit.tiny_parser;
+
+ NW_REQUIRED_PARAM(parser);
+
+ SET_STATE(tiny_parser, T_PARSE_S_ATTR_VALS);
+ return NW_STAT_SUCCESS;
+}
+
+static
+NW_Status_t
+Pass_3_Content_CB (NW_WBXML_Parser_t *parser,
+ void *context)
+{
+ NW_TinyDom_AttributeHandle_t *handle = (NW_TinyDom_AttributeHandle_t*)context;
+ NW_TinyDom_Parser_t *tiny_parser = handle->tlit.tiny_parser;
+
+ NW_REQUIRED_PARAM(parser);
+
+ SET_STATE(tiny_parser, T_PARSE_S_CONTENT);
+ return NW_STAT_SUCCESS;
+}
+
+
+static
+NW_Status_t
+Pass_3_Extension_CB (NW_WBXML_Parser_t *parser,
+ void *context)
+{
+ NW_TinyDom_AttributeHandle_t *handle = (NW_TinyDom_AttributeHandle_t*)context;
+ NW_TinyDom_Parser_t *tiny_parser = handle->tlit.tiny_parser;
+
+ NW_REQUIRED_PARAM(parser);
+
+ /* Set the extension substate flag */
+ tiny_parser->state |= T_PARSE_F_EXT;
+ return NW_STAT_SUCCESS;
+}
+
+
+static
+NW_Status_t
+Pass_3_FQToken_CB (NW_WBXML_Parser_t *parser,
+ NW_Uint32 token,
+ void *context)
+{
+ NW_TinyDom_AttributeHandle_t *handle = (NW_TinyDom_AttributeHandle_t*)context;
+ NW_TinyDom_Parser_t *tiny_parser = handle->tlit.tiny_parser;
+ NW_TinyDom_AttrVal_t* attr_val = (NW_TinyDom_AttrVal_t*)(handle->value);
+
+ NW_REQUIRED_PARAM(parser);
+
+ switch (GET_STATE(tiny_parser)){
+ case T_PARSE_S_ATTR_START:
+ handle->fq_token = token;
+ break;
+ case T_PARSE_S_ATTR_VALS:
+ case T_PARSE_S_CONTENT:
+ if((tiny_parser->state & T_PARSE_F_EXT) == T_PARSE_F_EXT){
+ attr_val->type = NW_WBXML_ATTR_COMPONENT_EXT;
+ attr_val->component.ext.type
+ = (NW_Uint8)((tiny_parser->dom_tree->parser->ext_t_not_table_index) ?
+ NW_TINYDOM_EXTENSION_TYPE_EXT_T_INTEGER
+ : NW_TINYDOM_EXTENSION_TYPE_NORMAL);
+ attr_val->component.ext.token = token;
+ attr_val->component.ext.value.string.length = 0;
+ attr_val->component.ext.value.string.storage = NULL;
+ }
+ else{ /*TODO: NW_ASSERT that this is not called with T_PARSE_S_ATTR_CONTENT? */
+ attr_val->type = NW_WBXML_ATTR_COMPONENT_TOKEN;
+ attr_val->component.value_token = token;
+ }
+ break;
+ default:
+ break;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+static
+NW_Status_t
+Pass_3_InlineString_CB (NW_WBXML_Parser_t *parser,
+ NW_Uint32 len,
+ void *context)
+{
+ NW_Status_t status;
+ NW_TinyDom_AttributeHandle_t *handle = (NW_TinyDom_AttributeHandle_t*)context;
+ NW_TinyDom_Parser_t *tiny_parser = handle->tlit.tiny_parser;
+ NW_TinyDom_AttrVal_t* attr_val = (NW_TinyDom_AttrVal_t*)(handle->value);
+
+ NW_REQUIRED_PARAM(len);
+
+ switch (GET_STATE(tiny_parser)){
+ case T_PARSE_S_ATTR_VALS:
+ case T_PARSE_S_CONTENT:
+ if((tiny_parser->state & T_PARSE_F_EXT) == T_PARSE_F_EXT){
+ status = NW_WBXML_Parser_getStringInline(parser,
+ tiny_parser->dom_tree->doc,
+ &(attr_val->component.ext.value.string));
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+ tiny_parser->state &= ~T_PARSE_F_EXT; /* Unset extension sub-state */
+ }
+ else{
+ attr_val->type = NW_WBXML_ATTR_COMPONENT_STRING;
+ status = NW_WBXML_Parser_getStringInline(parser,
+ tiny_parser->dom_tree->doc,
+ &(attr_val->component.string));
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ }
+ break;
+ default:
+ break;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+static
+NW_Status_t
+Pass_3_TableString_CB (NW_WBXML_Parser_t *parser,
+ NW_Uint32 index,
+ void *context)
+{
+ NW_Status_t status;
+ NW_TinyDom_AttributeHandle_t *handle = (NW_TinyDom_AttributeHandle_t*)context;
+ NW_TinyDom_Parser_t *tiny_parser = handle->tlit.tiny_parser;
+ NW_TinyDom_AttrVal_t* attr_val = (NW_TinyDom_AttrVal_t*)(handle->value);
+
+ NW_REQUIRED_PARAM(parser);
+
+ switch (GET_STATE(tiny_parser)){
+ case T_PARSE_S_ATTR_START:
+ handle->name_index = index;
+ break;
+ case T_PARSE_S_ATTR_VALS:
+ case T_PARSE_S_CONTENT:
+ if((tiny_parser->state & T_PARSE_F_EXT) == T_PARSE_F_EXT){
+ status = NW_WBXML_Document_getTableString(tiny_parser->dom_tree->doc,
+ index,
+ &(attr_val->component.ext.value.string));
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+ tiny_parser->state &= ~T_PARSE_F_EXT; /* Unset extension sub-state */
+ }
+ else{
+ attr_val->type = NW_WBXML_ATTR_COMPONENT_STRING;
+ status = NW_WBXML_Document_getTableString(tiny_parser->dom_tree->doc,
+ index,
+ &(attr_val->component.string));
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+
+/* TODO: Fill in. This is to get inline integers */
+
+static
+NW_Status_t
+Pass_3_Binary_CB (NW_WBXML_Parser_t *parser,
+ NW_Uint32 x,
+ void *context)
+{
+ NW_TinyDom_AttributeHandle_t *handle = (NW_TinyDom_AttributeHandle_t*)context;
+ NW_TinyDom_Parser_t *tiny_parser = handle->tlit.tiny_parser;
+
+ NW_REQUIRED_PARAM(parser);
+
+ if ((tiny_parser->state & T_PARSE_F_EXT) == T_PARSE_F_EXT) {
+ NW_TinyDom_AttrVal_t* attr_val = (NW_TinyDom_AttrVal_t*)(handle->value);
+ attr_val->component.ext.value.x = x;
+ }
+ tiny_parser->state &= ~T_PARSE_F_EXT; /* Unset extension sub-state */
+ return NW_STAT_SUCCESS;
+}
+
+static
+NW_Status_t
+Pass_3_Opaque_CB (NW_WBXML_Parser_t *parser,
+ NW_Uint32 len,
+ void *context)
+{
+ NW_TinyDom_AttributeHandle_t *handle = (NW_TinyDom_AttributeHandle_t*)context;
+ NW_TinyDom_Parser_t *tiny_parser = handle->tlit.tiny_parser;
+ NW_TinyDom_AttrVal_t* attr_val = (NW_TinyDom_AttrVal_t*)(handle->value);
+
+ switch (GET_STATE(tiny_parser)){
+ case T_PARSE_S_ATTR_VALS:
+ case T_PARSE_S_CONTENT:
+ attr_val->type = NW_WBXML_ATTR_COMPONENT_OPAQUE;
+ NW_WBXML_Parser_getOpaque(parser, len, &(attr_val->component.opaque));
+ break;
+ default:
+ break;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+static NW_Status_t
+Pass_3_Entity_CB (NW_WBXML_Parser_t *parser,
+ NW_Uint32 e,
+ void *context)
+{
+ NW_TinyDom_AttributeHandle_t *handle = (NW_TinyDom_AttributeHandle_t*)context;
+ NW_TinyDom_Parser_t *tiny_parser = handle->tlit.tiny_parser;
+ NW_TinyDom_AttrVal_t* attr_val = (NW_TinyDom_AttrVal_t*)(handle->value);
+
+ NW_REQUIRED_PARAM(parser);
+
+ switch (GET_STATE(tiny_parser)){
+ case T_PARSE_S_ATTR_VALS:
+ case T_PARSE_S_CONTENT:
+ attr_val->type = NW_WBXML_ATTR_COMPONENT_ENTITY;
+ attr_val->component.entity = e;
+ break;
+ default:
+ break;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+
+static const NW_WBXML_EventHandler_t Pass_3_Handler = {
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ Pass_3_Attr_Start_CB,
+ Pass_3_Attr_Val_CB,
+ Pass_3_Content_CB,
+ 0,
+ Pass_3_Extension_CB,
+ 0,
+ Pass_3_FQToken_CB,
+ Pass_3_InlineString_CB,
+ Pass_3_TableString_CB,
+ Pass_3_Binary_CB,
+ Pass_3_Opaque_CB,
+ Pass_3_Entity_CB,
+ 0
+};
+
+
+/*
+* The tiny list iterator is a generic iterator that
+* can be used to invoke parser iterator methods.
+*/
+
+static void
+TinyDom_ListIterator_init(NW_TinyDom_ListIterator_t *it,
+ NW_TinyDom_Parser_t *tiny_parser,
+ NW_TinyTree_Node_t *list_node,
+ void *context){
+ it->tiny_parser = tiny_parser;
+ NW_TinyTree_Node_GetSegmentAndOffset(&(tiny_parser->dom_tree->tree),list_node, (NW_Uint8**)&(it->segment), &(it->segSize), &(it->offset));
+ it->state = NW_STAT_WBXML_ITERATE_MORE;
+ it->context = context;
+}
+
+/*
+*
+* This is a bit complicated: you pass in an iterator function (from
+* the parser) that knows how to iterate the type you are interested
+* in (e.g. attribute_iterate), and you pass in a handler that the
+* parser iterator's callbacks will invoke. When called, a handler
+* receives the interator context field as the context arg. The
+* handler is used to select elements, gather data, etc.
+*
+* This, NW_TinyDom_attribute_handle_init, and NW_TinyDom_tag_get, should
+* not be called reentrantly (from a parser callback). This doesn't
+* seem like a serious restriction. If this becomes a problem, the
+* ParserSaveContext/ParserRestoreContext lines can be uncommented to
+* make these reentrant.
+*/
+
+static
+NW_TinyTree_Offset_t
+TinyDom_ListIterator_iterate(NW_TinyDom_ListIterator_t *it,
+ const NW_WBXML_EventHandler_t *handler,
+ NW_Status_t (*type_iterator) (NW_WBXML_Parser_t*))
+{
+ NW_TinyTree_Offset_t startOffset;
+ NW_TinyTree_Offset_t sourceOffset;
+
+
+ if (it->state == NW_STAT_WBXML_ITERATE_MORE){
+
+
+ /* Set the parser buffer and buffer size to the values stored in the iterator */
+ NW_WBXML_Parser_resetBuffer(it->tiny_parser->dom_tree->parser,
+ (NW_Byte*) it->segment,
+ it->segSize);
+
+ /* Register the callbacks */
+ NW_WBXML_Parser_registerHandler (it->tiny_parser->dom_tree->parser,
+ handler,
+ it->context);
+ startOffset = it->offset;
+ /* Now set the parser offset to the value stored in the iterator */
+ NW_WBXML_Parser_setOffset(it->tiny_parser->dom_tree->parser, it->offset);
+ /* Run the type iterator */
+ it->state = (NW_Uint32)(*(type_iterator))(it->tiny_parser->dom_tree->parser);
+ /* Set the new iterator offset (the segment should be unchanged)*/
+ it->offset =
+ (NW_TinyTree_Offset_t)NW_WBXML_Parser_getOffset(it->tiny_parser->dom_tree->parser);
+
+ if((it->tiny_parser->dom_tree->parser->status != NW_STAT_SUCCESS) ||
+ (it->offset == startOffset)){ /* Hack, hack . . The parser didn't advance. */
+ return 0;
+ }
+
+ /* Convert the iterator offset into a source offset to return */
+
+ NW_TinyTree_GetSourceOffset(&(it->tiny_parser->dom_tree->tree),
+ (NW_Byte*) it->segment, startOffset, &sourceOffset);
+ return sourceOffset;
+ }
+ return 0;
+}
+
+void
+NW_TinyDom_AttrListHandle_init(NW_TinyDom_AttrListHandle_t *it,
+ NW_TinyDom_Parser_t *tiny_parser,
+ NW_TinyTree_Node_t *list_node)
+{
+ TinyDom_ListIterator_init(it, tiny_parser, list_node, 0);
+}
+
+/*
+* Iterate through a list of attributes. There are
+* no attribute list callbacks since we just want to iterate the
+* attribute list, returning the start of each attribute.
+*/
+
+NW_TinyTree_Offset_t
+NW_TinyDom_AttrListHandle_iterate(NW_TinyDom_AttrListHandle_t *it){
+ /* Call list_iterate with a null handler.*/
+ return TinyDom_ListIterator_iterate(it, 0, NW_WBXML_Parser_attributeListIterate);
+}
+
+/*
+* Internal function to iterate the values of an attribute.
+*/
+
+NW_TinyTree_Offset_t
+NW_TinyDom_AttributeHandle_valsIterate(NW_TinyDom_ListIterator_t *it)
+{
+ return TinyDom_ListIterator_iterate(it, &Pass_3_Handler, NW_WBXML_Parser_attributeValsIterate);
+}
+
+/*String indexes must be less than the largest offset */
+#define ILLEGAL_STRING_INDEX ((NW_TinyTree_Offset_t)~0)
+
+/*
+* Initialize an attribute handle by parsing an attribute's start
+* token and values, calling the attribute handlers.
+*/
+
+void
+NW_TinyDom_AttributeHandle_init(NW_TinyDom_AttributeHandle_t *handle,
+ NW_TinyDom_Parser_t *tiny_parser,
+ NW_TinyTree_Offset_t offset)
+{
+ /*lint --e{794} Conceivable use of null pointer */
+
+ NW_TinyTree_Node_t dummy_node;
+ void *segment;
+ NW_TinyTree_Offset_t segSize;
+ NW_TinyTree_Offset_t segOffset;
+
+ handle->fq_token = 0;
+ handle->name_index = ILLEGAL_STRING_INDEX;
+ handle->value = NULL;
+ /* Run parser once to get token, name */
+ handle->tlit.tiny_parser = tiny_parser;
+
+ /* Fill in a dummy node with the supplied source offset */
+ dummy_node.source_offset = offset;
+
+ /* Use this to initialize the parser */
+ NW_TinyTree_Node_GetSegmentAndOffset(&(tiny_parser->dom_tree->tree),
+ &dummy_node, (NW_Uint8**)&segment, &segSize, &segOffset);
+
+ NW_WBXML_Parser_resetBuffer(tiny_parser->dom_tree->parser, (NW_Byte*) segment, segSize);
+
+ NW_WBXML_Parser_registerHandler (tiny_parser->dom_tree->parser, &Pass_3_Handler, handle);
+ NW_WBXML_Parser_setOffset(tiny_parser->dom_tree->parser, segOffset);
+ /* Run parser once to get past name */
+ NW_WBXML_Parser_attributeNameParse(tiny_parser->dom_tree->parser);
+
+ /* Update the dummy node source offset to reflect the parser advance */
+ segOffset =
+ (NW_TinyTree_Offset_t)NW_WBXML_Parser_getOffset(tiny_parser->dom_tree->parser);
+
+ NW_TinyTree_GetSourceOffset(&(tiny_parser->dom_tree->tree), (NW_Byte*) segment,
+ segOffset, &(dummy_node.source_offset));
+
+ TinyDom_ListIterator_init((NW_TinyDom_ListIterator_t*)&(handle->tlit),
+ tiny_parser,
+ &dummy_node,
+ handle);
+}
+
+/* Get tag name and token */
+
+static
+void
+NW_TinyDom_getTag(NW_TinyDom_Parser_t* tiny_parser,
+ NW_TinyTree_Node_t* node,
+ NW_TinyDom_Tag_t* tag)
+{
+ NW_WBXML_Parser_t *parser = tiny_parser->dom_tree->parser;
+ void *segment;
+ NW_TinyTree_Offset_t segSize;
+ NW_TinyTree_Offset_t segOffset;
+
+ /*NW_WBXML_Parser_t saved_context; */
+
+ tag->tiny_parser = tiny_parser;
+ /*NW_WBXML_ParserSaveContext(parser, &saved_context); */
+
+ /* Convert the node source offset to segment and offset form */
+ NW_TinyTree_Node_GetSegmentAndOffset(&(tiny_parser->dom_tree->tree),
+ node, (NW_Uint8**)&segment, &segSize, &segOffset);
+
+ /* Use these values to init the parser */
+ NW_WBXML_Parser_resetBuffer(tiny_parser->dom_tree->parser, (NW_Byte*) segment, segSize);
+ NW_WBXML_Parser_setOffset(parser, segOffset);
+ NW_WBXML_Parser_registerHandler (parser, &Tag_Handler, tag);
+ /* Parse the tag name */
+ NW_WBXML_Parser_tagNameParse(parser);
+ /*NW_WBXML_ParserRestoreContext(parser, &saved_context); */
+}
+
+EXPORT_C NW_Uint32
+NW_TinyDom_getTagToken(NW_TinyDom_Parser_t* tiny_parser,
+ NW_TinyTree_Node_t* node)
+{
+ NW_TinyDom_Tag_t tag;
+ NW_TinyDom_getTag(tiny_parser, node, &tag);
+ return tag.fq_token;
+}
+
+
+NW_Status_t
+NW_TinyDom_getTagName(NW_TinyDom_Parser_t* tiny_parser,
+ NW_TinyTree_Node_t* node,
+ NW_String_t* name)
+{
+ NW_TinyDom_Tag_t tag;
+
+ tag.name_index = ILLEGAL_STRING_INDEX;
+ NW_TinyDom_getTag(tiny_parser, node, &tag);
+
+ if(tag.name_index != ILLEGAL_STRING_INDEX){
+ /*TODO: replace ??*/
+ return NW_WBXML_Document_getTableString(tiny_parser->dom_tree->doc,
+ tag.name_index,
+ name);
+ }
+ return NW_STAT_WBXML_NO_NAME;
+}
+
+NW_Uint32
+NW_TinyDom_AttributeHandle_getToken(NW_TinyDom_AttributeHandle_t *handle)
+{
+ return handle->fq_token;
+}
+
+/* getName is going to return the entire "start token" which might
+ include a value prefix */
+NW_Status_t
+NW_TinyDom_AttributeHandle_getName(NW_TinyDom_AttributeHandle_t *handle,
+ NW_String_t *name)
+{
+ NW_TinyDom_Parser_t * tiny_parser = handle->tlit.tiny_parser;
+
+ if(handle->name_index != ILLEGAL_STRING_INDEX){
+ /*TODO: replace?? */
+ return NW_WBXML_Document_getTableString(tiny_parser->dom_tree->doc,
+ handle->name_index,
+ name);
+ }
+ return NW_STAT_WBXML_NO_NAME;
+}
+
+NW_TinyTree_Offset_t
+NW_TinyDom_AttributeHandle_iterateValues(NW_TinyDom_AttributeHandle_t* handle,
+ NW_TinyDom_AttrVal_t *value)
+{
+ handle->value = value; /* Set up handle to receive value.*/
+ return NW_TinyDom_AttributeHandle_valsIterate((NW_TinyDom_ListIterator_t*)&(handle->tlit));
+}
+
+
+/* Init a text handle */
+
+void
+NW_TinyDom_TextHandle_init(NW_TinyDom_TextHandle_t* handle,
+ NW_TinyDom_Parser_t* tiny_parser,
+ NW_TinyTree_Offset_t offset)
+{
+ NW_TinyTree_Node_t dummy_node;
+
+ dummy_node.source_offset = offset;
+ /* Initialize the iterator with this handle as the context */
+ TinyDom_ListIterator_init((NW_TinyDom_ListIterator_t *)&(handle->tlit),
+ tiny_parser,
+ &dummy_node,
+ handle);
+ handle->value = NULL;
+}
+
+/* Iterate through the text items in a text element, calling the text handlers */
+
+NW_TinyTree_Offset_t
+NW_TinyDom_TextHandle_iterate(NW_TinyDom_TextHandle_t *handle,
+ NW_TinyDom_Text_t *item)
+{
+ handle->value = item;
+ return TinyDom_ListIterator_iterate(&(handle->tlit),
+ &Pass_3_Handler,
+ NW_WBXML_Parser_textIterate);
+}
+
+void
+NW_TinyDom_setLastValid(NW_TinyDom_Tree_t* dom_tree, NW_Int32 lastValid)
+{
+ NW_ASSERT(dom_tree->tree.tree != NULL);
+ dom_tree->tree.tree->lastValid = lastValid;
+}
+
+
+NW_Int32
+NW_TinyDom_getLastValid(NW_TinyDom_Tree_t* dom_tree)
+{
+ if (dom_tree->tree.tree == NULL)
+ return 0;
+ return dom_tree->tree.tree->lastValid;
+}
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/tinydom/src/tiny_dom_utils.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,147 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_tinydom_utils.h>
+#include <xml/cxml/nw_dom_document.h>
+
+
+/****************************************************************************
+ * Name: NW_TinyDom_ParserInitialize
+ * Description: Helper function to initialize the parser
+ *
+ * Parameters: p -- pointer to a Parser_t struct
+ * dictionaries -- pointer to the WBXML dictionaries
+ * dictionaryCount -- number of dictionaries
+ *
+ * Algorithm: This is just a wrapper to conceal unnecessary initialization details.
+ * Return value: NW_STAT_SUCCESS, NW_STAT_FAILURE, NW_STAT_OUT_OF_MEMORY
+ ***************************************************************************/
+EXPORT_C NW_Status_t NW_TinyDom_ParserInitialize(Parser_t *p,
+ NW_WBXML_Dictionary_t * dictionaries[],
+ NW_Int32 dictionaryCount,
+ NW_Uint32 default_public_id)
+{
+ NW_Status_t status;
+
+ NW_ASSERT(p != NULL);
+
+ (void) NW_Mem_memset(p, 0, sizeof(*p));
+
+ /* Initialize the dictionary to use */
+ if (dictionaries){
+ status = NW_WBXML_Dictionary_add( dictionaryCount, dictionaries );
+
+ if (status == NW_STAT_FAILURE) {
+
+ status = NW_WBXML_Dictionary_initialize (dictionaryCount, dictionaries);
+ if (status != NW_STAT_SUCCESS) {
+ return status;
+ }
+ }
+ }
+
+ /* create the WBXML Parser */
+ NW_WBXML_Parser_newInPlace (&(p->wbxmlParser));
+ status = NW_WBXML_Document_construct(&(p->document), default_public_id);
+
+ /* This ASSERT removed for "out of memory" testing using CXML Testkit component */
+// NW_ASSERT(status == NW_STAT_SUCCESS);
+
+ if (status == NW_STAT_SUCCESS){
+ /* initialize the TinyDOM stuff */
+ NW_TinyDom_Tree_construct (&(p->tinyDOMTree), &(p->wbxmlParser),
+ &(p->document), &(p->writer));
+ NW_TinyDom_Parser_construct (&(p->tinyParser), &(p->tinyDOMTree));
+ }
+ return status;
+}
+
+/****************************************************************************
+ * Name: NW_TinyDom_MakeDOMTree
+ * Description: Helper function to parse the buffer, creating a tree
+ *
+ * Parameters: p -- pointer to a Parser_t struct
+ * buffer -- pointer to content
+ * length -- number of bytes in buffer
+ * root -- pointer to document root node
+ * Algorithm: This is just a wrapper to conceal unnecessary parsing details.
+ * Return value: NW_STAT_SUCCESS, NW_STAT_FAILURE, NW_STAT_OUT_OF_MEMORY
+ ***************************************************************************/
+EXPORT_C NW_Status_t
+NW_TinyDom_MakeDOMTree (Parser_t *p,
+ NW_Byte *buffer,
+ NW_Uint32 length,
+ NW_DOM_DocumentNode_t **root)
+{
+
+ NW_Status_t status;
+
+ NW_ASSERT(p != NULL);
+
+ /* build the tinyDOM tree */
+ status = NW_TinyDom_Parser_buildTree (&(p->tinyParser), (char *)buffer, length, NW_FALSE);
+ if ((status == NW_STAT_SUCCESS) && (root != NULL)) {
+ *root = p->tinyDOMTree.root_node;
+ }
+ return status;
+}
+
+EXPORT_C NW_Status_t
+NW_TinyDom_AppendDOMTree (Parser_t *p,
+ NW_Byte *buffer,
+ NW_Uint32 length,
+ NW_Uint32 cp_count,
+ NW_Int32 lastValid,
+ NW_DOM_DocumentNode_t **root)
+{
+
+ NW_Status_t status;
+
+ NW_ASSERT(p != NULL);
+
+ /* build the tinyDOM tree */
+ //p->wbxmlParser.offset = p->wbxmlParser.lastValid;
+ p->wbxmlParser.offset = NW_TinyDom_getLastValid(p->tinyParser.dom_tree);
+ p->tinyParser.cp_count = cp_count;
+ //p->wbxmlParser.lastValid = lastValid;
+ status = NW_TinyDom_Parser_incrementalBuildTree (&(p->tinyParser), (char *)buffer, length, NW_FALSE, lastValid);
+ if ((status == NW_STAT_SUCCESS) && (root != NULL)) {
+ *root = p->tinyDOMTree.root_node;
+ }
+ return status;
+}
+
+/****************************************************************************
+ * Name: NW_TinyDom_ParserDelete
+ * Description: Free the internal memory in allocated in NW_TinyDom_MakeDOMTree:
+ *
+ * Parameters: p -- pointer to a Parser_t struct
+ *
+ * Algorithm:
+ * Return value: None
+ ***************************************************************************/
+EXPORT_C void NW_TinyDom_ParserDelete(Parser_t *p)
+{
+ if (p != NULL) {
+ NW_WBXML_Parser_delete(&(p->wbxmlParser));
+ NW_TinyDom_Tree_destruct(&(p->tinyDOMTree));
+ NW_WBXML_Document_destruct(&(p->document));
+ (void) NW_Mem_memset(p, 0, sizeof(*p));
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/tinydom/src/tiny_dom_write.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,636 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+/* ************************************************************************/
+#include "cxml_internal.h"
+#include <xml/cxml/nw_wbxml_parse.h>
+#include <xml/cxml/nw_wbxml_document.h>
+#include <xml/cxml/nw_encoder_wbxmlwriter.h>
+#include "nw_encoder_tinydom2wbxml.h"
+#include <xml/cxml/nw_tinytree.h>
+#include <xml/cxml/nw_tinydom.h>
+
+
+/* Create an empty tree */
+
+NW_Status_t
+NW_TinyDom_Tree_create(NW_TinyDom_Tree_t *dom_tree,
+ NW_TinyDom_Parser_t *dom_parser,
+ NW_WBXML_Document_t *doc,
+ NW_WBXML_Parser_t *parser,
+ NW_WBXML_Writer_t* writer,
+ NW_Uint16 init_node_count,
+ NW_Bool enableStringTable)
+{
+ NW_WBXML_Dictionary_t* dictionary = NULL;
+
+ /* First get the dictionary */
+
+ if (doc->publicid != 0) {
+ dictionary = NW_WBXML_Dictionary_getByPublicId (doc->publicid);
+ parser->dictionary = NW_WBXML_Dictionary_getIndexByPublicId(doc->publicid);
+ }
+ else if (doc->doc_type != NULL) {
+ dictionary = NW_WBXML_Dictionary_getByDocType (doc->doc_type, doc->charset);
+ parser->dictionary = NW_WBXML_Dictionary_getIndexByDocType(doc->doc_type, doc->charset);
+ }
+
+ if (dictionary == NULL) {
+ return NW_STAT_FAILURE;
+ }
+
+ /* TODO: make dictionary a member of dom_parser ?? */
+
+ /* Initialize the writer */
+
+ NW_WBXML_Writer_Initialize(writer,
+ 0, NULL,
+ NULL,
+ dictionary,
+ dictionary,
+ ((enableStringTable == NW_TRUE) ?
+ NW_Encoder_StringTable_getStringTableOffset :
+ NULL),
+ ((enableStringTable == NW_TRUE) ?
+ NW_Encoder_StringTable_addToStringTable :
+ NULL),
+ ((enableStringTable == NW_TRUE) ?
+ doc->strtbl_extension :
+ NULL),
+ ((enableStringTable == NW_TRUE) ?
+ NW_Encoder_StringTable_StringTableIterateInit :
+ NULL),
+ ((enableStringTable == NW_TRUE) ?
+ NW_Encoder_StringTable_StringTableIterateNext :
+ NULL),
+ NW_TRUE);
+
+ /* Construct the dom tree object */
+ NW_TinyDom_Tree_construct(dom_tree, parser, doc, writer);
+
+ /* Construct the dom parser object */
+ NW_TinyDom_Parser_construct(dom_parser, dom_tree);
+
+ /* Construct the tiny tree object, passing the dom parser as the
+ context argument */
+
+
+ if( (NW_TinyTree_construct(&(dom_tree->tree),
+ (CXML_Vector_Metric_t)(init_node_count + 1),
+ 0,
+ 0,
+ dom_parser,
+ NW_TRUE) ) == NW_STAT_FAILURE)
+ {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ /* The root node we create here actually has no valid buffer storage yet */
+ NW_TinyTree_setRoot(&(dom_tree->tree), 0);
+
+ /* TODO: Why does dom_tree need a doc member if parser has one too ???? */
+ parser->doc = doc;
+
+ dom_tree->root_node = NW_TinyTree_getRoot(&(dom_tree->tree));
+
+ /* Write the doc header block. This will fill in the root node storage */
+ dom_tree->root_node = NW_TinyDom_writeDocHeader(dom_tree,
+ doc->version,
+ doc->publicid,
+ doc->charset);
+ if (dom_tree->root_node == NULL) {
+ return NW_STAT_FAILURE;
+ }
+ /* Mark the root node as the doc node */
+ NW_TinyTree_Node_setUserFlags(dom_tree->root_node, T_DOM_NODE_DOC);
+ return NW_STAT_SUCCESS;
+}
+
+NW_TinyTree_Node_t *
+NW_TinyDom_writeDocHeader(NW_TinyDom_Tree_t *dom_tree,
+ NW_Uint8 version,
+ NW_Uint32 publicid,
+ NW_Uint32 encoding)
+{
+ NW_Status_t status;
+ NW_TinyTree_Offset_t offset;
+ NW_TinyTree_Node_t * node = dom_tree->root_node;
+ CXML_Vector_Metric_t size;
+
+ /* If the root node isn't set, the tree wasn't properly inited */
+ if (node != NULL) {
+ NW_Uint8* buffer;
+ /* Set up the writer for a sizing pass */
+ NW_WBXML_Writer_SetToSizing(dom_tree->writer);
+ /* Call the writer to run the sizing pass */
+ status = NW_WBXML_Writer_Header(dom_tree->writer,
+ version,
+ publicid,
+ encoding,
+ 0);
+
+
+ if (status != NW_STAT_SUCCESS) {
+ return NULL;
+ }
+ /* Allocate a buffer of the correct size */
+ size = (CXML_Vector_Metric_t)NW_WBXML_Writer_GetSize(dom_tree->writer);
+ buffer = NW_TinyTree_GetWritableBlock(&(dom_tree->tree), size, &offset);
+
+ if(buffer == NULL)
+ {
+ return NULL;
+ }
+
+ /* Set up the writer for actual writing */
+ NW_WBXML_Writer_SetToWrite(dom_tree->writer, size, buffer);
+ /* Do the write */
+ status = NW_WBXML_Writer_Header(dom_tree->writer,
+ version,
+ publicid,
+ encoding,
+ 0);
+
+ if (status != NW_STAT_SUCCESS) {
+ return NULL;
+ }
+ /* Point the root node source offset at the new block */
+ node->source_offset = offset;
+ }
+ return node;
+}
+
+
+NW_TinyTree_Node_t *
+NW_TinyDom_createAttributeByToken(NW_TinyDom_Tree_t *dom_tree,
+ NW_Uint16 token,
+ NW_TinyDom_AttrVal_t *value)
+{
+ NW_Status_t status;
+ NW_TinyTree_Offset_t offset;
+
+ NW_TinyTree_Node_t * node = NW_TinyTree_createNode(&(dom_tree->tree),0);
+
+ if (node != NULL) {
+ NW_Uint8* buffer;
+ CXML_Vector_Metric_t size;
+
+ /* Set up the writer for a sizing pass */
+ NW_WBXML_Writer_SetToSizing(dom_tree->writer);
+ /* Call the writer to run the sizing pass */
+ status = NW_Encoder_writeAttributeByToken(dom_tree->writer, token, value,
+ dom_tree->doc->charset);
+
+ if (status != NW_STAT_SUCCESS) {
+ return NULL;
+ }
+ /* Allocate a buffer of the correct size */
+ size = (CXML_Vector_Metric_t)NW_WBXML_Writer_GetSize(dom_tree->writer);
+ buffer = NW_TinyTree_GetWritableBlock(&(dom_tree->tree), size, &offset);
+ if (buffer == NULL)
+ {
+ return NULL;
+ }
+
+ /* Set up the writer for actual writing */
+ NW_WBXML_Writer_SetToWrite(dom_tree->writer, size, buffer);
+ /* Do the write */
+ status = NW_Encoder_writeAttributeByToken(dom_tree->writer, token, value,
+ dom_tree->doc->charset);
+ if (status != NW_STAT_SUCCESS) {
+ return NULL;
+ }
+ /* Point the node source offset at the new block */
+ node->source_offset = offset;
+ /* Mark node as attribute node */
+ NW_TinyTree_Node_setUserFlags(node, T_DOM_NODE_ATTR);
+ return node;
+ }
+ return NULL;
+}
+
+NW_TinyTree_Node_t *
+NW_TinyDom_createAttributeByName(NW_TinyDom_Tree_t *dom_tree,
+ NW_String_t *name,
+ NW_TinyDom_AttrVal_t *value)
+{
+ NW_Status_t status;
+ NW_TinyTree_Offset_t offset;
+
+ NW_TinyTree_Node_t * node = NW_TinyTree_createNode(&(dom_tree->tree),0);
+
+ if (node != NULL) {
+ NW_Uint8* buffer;
+ CXML_Vector_Metric_t size;
+
+ /* Set up the writer for a sizing pass */
+ NW_WBXML_Writer_SetToSizing(dom_tree->writer);
+ /* Call the writer to run the sizing pass */
+ status = NW_Encoder_writeAttributeByName(dom_tree->writer, name, value,
+ dom_tree->doc->charset);
+
+ if (status != NW_STAT_SUCCESS) {
+ return NULL;
+ }
+ /* Allocate a buffer of the correct size */
+ size = (CXML_Vector_Metric_t)NW_WBXML_Writer_GetSize(dom_tree->writer);
+ buffer = NW_TinyTree_GetWritableBlock(&(dom_tree->tree), size, &offset);
+ if (buffer == NULL)
+ {
+ return NULL;
+ }
+
+ /* Set up the writer for actual writing */
+ NW_WBXML_Writer_SetToWrite(dom_tree->writer, size, buffer);
+ /* Do the write */
+ status = NW_Encoder_writeAttributeByName(dom_tree->writer, name, value,
+ dom_tree->doc->charset);
+ if (status != NW_STAT_SUCCESS) {
+ return NULL;
+ }
+ /* Point the node source offset at the new block */
+ node->source_offset = offset;
+ /* Mark node as attribute node */
+ NW_TinyTree_Node_setUserFlags(node, T_DOM_NODE_ATTR);
+ return node;
+ }
+ return NULL;
+}
+
+NW_Status_t
+NW_TinyDom_AttributeHandle_initWithStartToken(NW_TinyDom_AttributeHandle_t* tinyHandle,
+ NW_TinyTree_Node_t** ppNode,
+ NW_TinyDom_Parser_t* parser,
+ NW_Uint16 fqToken)
+{
+ NW_Status_t status;
+ NW_TinyTree_Offset_t offset;
+ NW_Uint8* buffer;
+ CXML_Vector_Metric_t size;
+ NW_TinyDom_Tree_t* dom_tree = parser->dom_tree;
+
+ /* Set up the writer for a sizing pass */
+ NW_WBXML_Writer_SetToSizing(dom_tree->writer);
+ /* Call the writer to run the sizing pass */
+ status = NW_WBXML_Writer_AttributeToken(dom_tree->writer, fqToken);
+ if (status != NW_STAT_SUCCESS) {
+ return status;
+ }
+ status = NW_WBXML_Writer_End(dom_tree->writer);
+ if (status != NW_STAT_SUCCESS) {
+ return status;
+ }
+ /* Allocate a buffer of the correct size */
+ size = (CXML_Vector_Metric_t)NW_WBXML_Writer_GetSize(dom_tree->writer);
+ buffer = NW_TinyTree_GetWritableBlock(&(dom_tree->tree), size, &offset);
+ if (buffer == NULL)
+ {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ *ppNode = NW_TinyTree_createNode(&(dom_tree->tree), offset);
+ if (*ppNode == NULL) {
+ NW_Mem_Free(buffer);
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+ NW_TinyTree_Node_setUserFlags(*ppNode, T_DOM_NODE_ATTR);
+
+ /* Set up the writer for actual writing */
+ NW_WBXML_Writer_SetToWrite(dom_tree->writer, size, buffer);
+ /* Do the write */
+ status = NW_WBXML_Writer_AttributeToken(dom_tree->writer, fqToken);
+ if (status != NW_STAT_SUCCESS) {
+ return status;
+ }
+ status = NW_WBXML_Writer_End(dom_tree->writer);
+ if (status != NW_STAT_SUCCESS) {
+ return status;
+ }
+ /* initialize the attribute handle */
+ NW_TinyDom_AttributeHandle_init(tinyHandle, parser, offset);
+
+ return NW_STAT_SUCCESS;
+}
+
+NW_Status_t
+NW_TinyDom_AttributeHandle_addVal(NW_TinyDom_AttributeHandle_t* tinyHandle,
+ NW_TinyTree_Node_t* node,
+ NW_TinyDom_AttrVal_t* val)
+{
+ NW_TinyDom_AttrVal_t av;
+ NW_TinyTree_t* tinyTree = &(tinyHandle->tlit.tiny_parser->dom_tree->tree);
+ NW_TinyDom_Tree_t* tinyDomTree = tinyHandle->tlit.tiny_parser->dom_tree;
+ NW_Uint32 encoding;
+ void* existingBuffer;
+ NW_Uint8* buffer;
+ CXML_Vector_Metric_t start = 0;
+ CXML_Vector_Metric_t valSize;
+ CXML_Vector_Metric_t existingSize;
+ CXML_Vector_Metric_t offset;
+ NW_Status_t status = NW_STAT_FAILURE;
+
+ encoding = NW_TinyDom_getDocHeader(tinyTree)->charset;
+
+ switch (val->type) {
+ case NW_WBXML_ATTR_COMPONENT_TOKEN:
+ case NW_WBXML_ATTR_COMPONENT_STRING:
+ case NW_WBXML_ATTR_COMPONENT_EXT:
+ case NW_WBXML_ATTR_COMPONENT_ENTITY:
+ case NW_WBXML_ATTR_COMPONENT_OPAQUE:
+ NW_WBXML_Writer_SetToSizing(tinyDomTree->writer);
+ start
+ = (CXML_Vector_Metric_t)NW_WBXML_Writer_GetSize(tinyDomTree->writer);
+ status = NW_Encoder_writeAttrVal(tinyDomTree->writer, val,
+ encoding);
+ if (status != NW_STAT_SUCCESS) {
+ return status;
+ }
+ status = NW_WBXML_Writer_End(tinyDomTree->writer);
+ break;
+ }
+ if (status != NW_STAT_SUCCESS) {
+ return status;
+ }
+ valSize
+ = (CXML_Vector_Metric_t)(NW_WBXML_Writer_GetSize(tinyDomTree->writer)
+ - start);
+
+ /* existing content size */
+ start = node->source_offset;
+ NW_TinyDom_AttributeHandle_init(tinyHandle, tinyHandle->tlit.tiny_parser,
+ node->source_offset);
+ tinyHandle->value = &av; /* required to hold value results */
+ while (NW_TinyDom_AttributeHandle_valsIterate(&(tinyHandle->tlit)) != 0) {
+ /* empty loop body: we just want parser to advance */
+ }
+ existingSize = (CXML_Vector_Metric_t)(tinyHandle->tlit.offset - start);
+ existingBuffer = NW_TinyTree_Node_getSourceAddress(tinyTree, node);
+
+ buffer = NW_TinyTree_GetWritableBlock(tinyTree,
+ ((CXML_Vector_Metric_t)
+ (valSize + existingSize)),
+ &offset);
+ if (buffer == NULL) {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+ NW_Mem_memcpy(buffer, existingBuffer, existingSize);
+ NW_WBXML_Writer_SetToWrite(tinyDomTree->writer,
+ valSize,
+ buffer + existingSize);
+ (void)NW_Encoder_writeAttrVal(tinyDomTree->writer, val, encoding);
+ (void)NW_WBXML_Writer_End(tinyDomTree->writer);
+
+ /* TBD there is no way to "free" the old storage */
+ node->source_offset = offset;
+ return NW_STAT_SUCCESS;
+}
+
+
+NW_TinyTree_Node_t *
+NW_TinyDom_createElementByToken(NW_TinyDom_Tree_t *dom_tree, NW_Uint16 token) {
+
+ NW_Status_t status;
+ NW_TinyTree_Offset_t offset;
+
+ NW_TinyTree_Node_t * node = NW_TinyTree_createNode(&(dom_tree->tree),0);
+
+ if (node != NULL) {
+ NW_Uint8* buffer;
+ CXML_Vector_Metric_t size;
+
+ /* Set up the writer for a sizing pass */
+ NW_WBXML_Writer_SetToSizing(dom_tree->writer);
+ /* Call the writer to run the sizing pass */
+ status = NW_Encoder_writeElementByToken(dom_tree->writer, token);
+
+ if (status != NW_STAT_SUCCESS) {
+ return NULL;
+ }
+ /* Allocate a buffer of the correct size */
+ size = (CXML_Vector_Metric_t)NW_WBXML_Writer_GetSize(dom_tree->writer);
+ buffer = NW_TinyTree_GetWritableBlock(&(dom_tree->tree), size, &offset);
+ if (buffer == NULL)
+ {
+ return NULL;
+ }
+
+ /* Set up the writer for actual writing */
+ NW_WBXML_Writer_SetToWrite(dom_tree->writer, size, buffer);
+ /* Do the write */
+ status = NW_Encoder_writeElementByToken(dom_tree->writer, token);
+ if (status != NW_STAT_SUCCESS) {
+ return NULL;
+ }
+
+ /* Point the node source offset at the new block */
+ node->source_offset = offset;
+ /* Mark node as attribute node */
+ NW_TinyTree_Node_setUserFlags(node, T_DOM_NODE_TAG);
+ return node;
+ }
+ return NULL;
+}
+
+
+NW_TinyTree_Node_t *
+NW_TinyDom_createElementByName(NW_TinyDom_Tree_t *dom_tree, NW_String_t *name)
+{
+ NW_Status_t status;
+ NW_TinyTree_Offset_t offset;
+
+ NW_TinyTree_Node_t * node = NW_TinyTree_createNode(&(dom_tree->tree),0);
+
+ if (node != NULL) {
+ NW_Uint8* buffer;
+ CXML_Vector_Metric_t size;
+
+ /* Set up the writer for a sizing pass */
+ NW_WBXML_Writer_SetToSizing(dom_tree->writer);
+ /* Call the writer to run the sizing pass */
+ status = NW_Encoder_writeElementByName(dom_tree->writer, name,
+ dom_tree->doc->charset);
+ if (status != NW_STAT_SUCCESS) {
+ return NULL;
+ }
+ /* Allocate a buffer of the correct size */
+ size = (CXML_Vector_Metric_t)NW_WBXML_Writer_GetSize(dom_tree->writer);
+ buffer = NW_TinyTree_GetWritableBlock(&(dom_tree->tree), size, &offset);
+ if (buffer == NULL)
+ {
+ return NULL;
+ }
+
+ /* Set up the writer for actual writing */
+ NW_WBXML_Writer_SetToWrite(dom_tree->writer, size, buffer);
+ /* Do the write */
+ status = NW_Encoder_writeElementByName(dom_tree->writer, name,
+ dom_tree->doc->charset);
+ if (status != NW_STAT_SUCCESS) {
+ return NULL;
+ }
+
+ /* Point the node source offset at the new block */
+ node->source_offset = offset;
+ /* Mark node as attribute node */
+ NW_TinyTree_Node_setUserFlags(node, T_DOM_NODE_TAG);
+ return node;
+ }
+ return NULL;
+}
+
+NW_TinyTree_Node_t *
+NW_TinyDom_createTextNode(NW_TinyDom_Tree_t *dom_tree,
+ NW_TinyDom_Text_t *text)
+{
+ NW_Status_t status;
+ NW_TinyTree_Offset_t offset;
+
+ NW_TinyTree_Node_t * node = NW_TinyTree_createNode(&(dom_tree->tree),0);
+
+ if (node != NULL) {
+ NW_Uint8* buffer;
+ CXML_Vector_Metric_t size;
+
+ /* Set up the writer for a sizing pass */
+ NW_WBXML_Writer_SetToSizing(dom_tree->writer);
+ /* Call the writer to run the sizing pass */
+ status = NW_Encoder_writeText(dom_tree->writer, text,
+ dom_tree->doc->charset);
+ if (status != NW_STAT_SUCCESS) {
+ return NULL;
+ }
+ /* Allocate a buffer of the correct size */
+ size = (CXML_Vector_Metric_t)NW_WBXML_Writer_GetSize(dom_tree->writer);
+ buffer = NW_TinyTree_GetWritableBlock(&(dom_tree->tree), size, &offset);
+ if (buffer == NULL)
+ {
+ return NULL;
+ }
+
+ /* Set up the writer for actual writing */
+ NW_WBXML_Writer_SetToWrite(dom_tree->writer, size, buffer);
+ /* Do the write */
+ status = NW_Encoder_writeText(dom_tree->writer, text,
+ dom_tree->doc->charset);
+ if (status != NW_STAT_SUCCESS) {
+ return NULL;
+ }
+ /* Point the node source offset at the new block */
+ node->source_offset = offset;
+ /* Mark node as attribute node */
+ NW_TinyTree_Node_setUserFlags(node, T_DOM_NODE_TEXT);
+ return node;
+ }
+ return NULL;
+}
+
+NW_Status_t
+NW_TinyDom_addDataFromTextItem(NW_TinyTree_t* tinyTree,
+ NW_TinyDom_Tree_t* tinyDomTree,
+ NW_DOM_TextNode_t* node,
+ NW_TinyDom_AttrVal_t* val,
+ NW_Uint32 encoding)
+{
+ void* existingBuffer;
+ NW_Uint8* buffer;
+ NW_TinyDom_TextHandle_t iterator;
+ NW_TinyDom_Text_t textItem;
+ CXML_Vector_Metric_t start = 0;
+ CXML_Vector_Metric_t valSize;
+ CXML_Vector_Metric_t existingSize;
+ CXML_Vector_Metric_t offset;
+ NW_Status_t status = NW_STAT_FAILURE;
+
+ switch (val->type) {
+ case NW_WBXML_ATTR_COMPONENT_STRING:
+ case NW_WBXML_ATTR_COMPONENT_EXT:
+ case NW_WBXML_ATTR_COMPONENT_ENTITY:
+ case NW_WBXML_ATTR_COMPONENT_OPAQUE:
+ NW_WBXML_Writer_SetToSizing(tinyDomTree->writer);
+ start
+ = (CXML_Vector_Metric_t)NW_WBXML_Writer_GetSize(tinyDomTree->writer);
+ status = NW_Encoder_writeAttrVal(tinyDomTree->writer, val,
+ encoding);
+ if (status != NW_STAT_SUCCESS) {
+ return status;
+ }
+ status = NW_WBXML_Writer_End(tinyDomTree->writer);
+ break;
+ }
+ if (status != NW_STAT_SUCCESS) {
+ return status;
+ }
+ valSize
+ = (CXML_Vector_Metric_t)(NW_WBXML_Writer_GetSize(tinyDomTree->writer)
+ - start);
+
+ /* existing content size */
+ NW_TinyDom_TextHandle_init(&iterator,
+ NW_TinyDom_getParser(tinyTree),
+ NW_TinyTree_Node_getSourceOffset(node));
+ start = (CXML_Vector_Metric_t)iterator.tlit.offset;
+ while (NW_TinyDom_TextHandle_iterate(&iterator, &textItem) != 0) {
+ /* empty loop body: we just want parser to advance */
+ }
+ existingSize = (CXML_Vector_Metric_t)(iterator.tlit.offset - start);
+ existingBuffer = NW_TinyTree_Node_getSourceAddress(tinyTree, node);
+
+ buffer = NW_TinyTree_GetWritableBlock(tinyTree,
+ ((CXML_Vector_Metric_t)
+ (valSize + existingSize)),
+ &offset);
+ if (buffer == NULL) {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+ NW_Mem_memcpy(buffer, existingBuffer, existingSize);
+ NW_WBXML_Writer_SetToWrite(tinyDomTree->writer,
+ valSize,
+ buffer + existingSize);
+ (void)NW_Encoder_writeAttrVal(tinyDomTree->writer, val, encoding);
+ (void)NW_WBXML_Writer_End(tinyDomTree->writer);
+
+ /* TBD there is no way to "free" the old storage */
+ node->source_offset = offset;
+ return NW_STAT_SUCCESS;
+}
+
+NW_Status_t
+NW_TinyDom_removeAttrFromListNode(NW_TinyDom_AttrListHandle_t *it, NW_Uint32 length)
+{
+ NW_Uint16 len = 0;
+ NW_Byte* p = NULL;
+ NW_Byte *moveTo = NULL;
+ NW_Byte *moveFrom = NULL;
+
+ p = (NW_Byte*)((NW_Byte*)it->segment + it->offset);
+ moveTo = (NW_Byte*)(p - length);
+ moveFrom = p;
+ while (*p != 0x01)
+ {
+ len++;
+ p++;
+ }
+ NW_Mem_memset(moveTo, 0, length);
+ NW_Mem_memmove(moveTo, moveFrom, (len+1));
+ return NW_STAT_SUCCESS;
+}
+
+
+
+
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/tinytree/include/nw_tinytree_alloc.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,302 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_TinyTree
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef NW_TREE_ALLOC_H
+#define NW_TREE_ALLOC_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+#define MIN_SEGMENT_SIZE 64
+
+/* ----------------------------------------------------------------------- **
+ These methods are private to the tiny tree module.
+** ----------------------------------------------------------------------- **/
+
+
+/* ----------------------------------------------------------------------- **
+ Storage mananagement:
+
+ Header for a storage block. When the block is allocated by the
+ tree_alloc methods, the storage block will be contiguous with the
+ header. However, when the block was supplied externally (for
+ example, by the parser) the storage will be somewhere else.
+** ----------------------------------------------------------------------- **/
+
+
+/** ----------------------------------------------------------------------- **
+ @typedef: NW_TinyTree_RelativeOffset
+
+ @synopsis: Relative offset into structure.
+
+ @scope: public
+ @type: NW_Uint32
+
+ @description: Relative offset into structure.
+ ** ----------------------------------------------------------------------- **/
+typedef NW_Uint32 NW_TinyTree_RelativeOffset_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_TinyTree_SegHeader
+
+ @synopsis: Segment header.
+
+ @scope: public
+ @variables:
+ NW_TinyTree_RelativeOffset_t next
+ Offset into segment.
+
+ NW_TinyTree_Offset_t size
+ Offset.
+
+ NW_TinyTree_Offset_t free_offset
+ Free offset.
+
+ void* initializer NW_Byte__ptr__NW_TinyTree_Offset_t
+ Funcion pointer for initializer.
+
+ NW_Byte* storage
+ Storage.
+
+ @description: Segment header.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_TinyTree_SegHeader_s{
+ NW_TinyTree_RelativeOffset_t next;
+ NW_TinyTree_Offset_t size;
+ NW_TinyTree_Offset_t free_offset;
+ void (*initializer) (NW_Byte*, NW_TinyTree_Offset_t);
+ NW_Byte* storage;
+} NW_TinyTree_SegHeader_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_segmentGetFreeSpace
+
+ @synopsis: Get free space.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_SegHeader_t* segment
+ The segment header.
+
+ @description: Get free space.
+
+ @returns: NW_TinyTree_Offset_t
+ Free space pointer.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Offset_t
+NW_TinyTree_segmentGetFreeSpace(NW_TinyTree_SegHeader_t* segment);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_getFreeStorageSpace
+
+ @synopsis: Get free storage space.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_SegHeader_t* base
+ The segment header.
+
+ @description: Get free storage space.
+
+ @returns: NW_TinyTree_Offset_t
+ Free storage space pointer.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Offset_t
+NW_TinyTree_getFreeStorageSpace(NW_TinyTree_SegHeader_t* base);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_addSegment
+
+ @synopsis: Add segment.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_SegHeader_t* base
+ The segment header.
+
+ [in] NW_TinyTree_Offset_t size
+ Size of new segment.
+
+ @description: Add segment.
+
+ @returns: NW_TinyTree_SegHeader_t*
+ New header.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_SegHeader_t*
+NW_TinyTree_addSegment(NW_TinyTree_SegHeader_t* base, NW_TinyTree_Offset_t size);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_freeSegments
+
+ @synopsis: Free segments.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_SegHeader_t* base
+ The segment header.
+
+ @description: Free segments.
+ ** ----------------------------------------------------------------------- **/
+void
+NW_TinyTree_freeSegments(NW_TinyTree_SegHeader_t* base);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_offsetGetSegment
+
+ @synopsis: Get segment header.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_SegHeader_t* base
+ The segment header.
+
+ [out] NW_TinyTree_Offset_t* offset
+ Data offset.
+
+ @description: Get the segment header associated with an offset. This
+ allocates a new segment if the offset is beyond any
+ currently allocated segment. If a new segment is
+ allocated, the offset is readjusted to the beginning of
+ the new segment.
+
+ @returns: NW_TinyTree_SegHeader_t*
+ Segment header or NULL if error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_SegHeader_t*
+NW_TinyTree_offsetGetSegment(NW_TinyTree_SegHeader_t* base, NW_TinyTree_Offset_t* offset);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_offsetIncrement
+
+ @synopsis: Increment.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_SegHeader_t* base
+ The segment header.
+
+ [in] NW_TinyTree_Offset_t offset
+ Offset.
+
+ [in] NW_TinyTree_Offset_t delta
+ Delta.
+
+ @description: Increment.
+
+ @returns: NW_TinyTree_Offset_t
+ New offset.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Offset_t
+NW_TinyTree_offsetIncrement(NW_TinyTree_SegHeader_t* base,
+ NW_TinyTree_Offset_t offset,
+ NW_TinyTree_Offset_t delta);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_addressGetSegment
+
+ @synopsis: Get segment.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_SegHeader_t* base
+ The segment header.
+
+ [out] NW_Byte** address
+ Address of segment.
+
+ @description: Get the segment header associated with an offset.
+ This allocates a new segment if the offset is beyond
+ any currently allocated segment. If a new segment is
+ allocated, the offset is readjusted to the beginning
+ of the new segment.
+
+ @returns: NW_TinyTree_SegHeader_t*
+ The segment header.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_SegHeader_t*
+NW_TinyTree_addressGetSegment(NW_TinyTree_SegHeader_t* base,
+ NW_Byte** address);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_addressIncrement
+
+ @synopsis: Increment.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_SegHeader_t* base
+ The segment header.
+
+ [in] NW_Byte* address
+ Address to increment.
+
+ [in] NW_TinyTree_Offset_t delta
+ Delta.
+
+ @description: Increment.
+
+ @returns: NW_Byte*
+ New address.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Byte*
+NW_TinyTree_addressIncrement(NW_TinyTree_SegHeader_t* base,
+ NW_Byte* address,
+ NW_TinyTree_Offset_t delta);
+
+
+#ifdef __cplusplus
+} // extern "C" {
+#endif /* __cplusplus */
+
+#endif /* NW_TREE_ALLOC_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/tinytree/src/EBuffer.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,355 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_tinytree_ebuffer.h>
+
+/* ------------------------------------------------------------------------- *
+ private methods
+ * ------------------------------------------------------------------------- */
+
+/* Get the index corresponding to the first element in a segment.
+ * This can be added to an offset within the segment to get the
+ * index of any element
+ */
+
+static
+CXML_Vector_Metric_t
+NW_TinyTree_EBuffer_GetFirstIndex(NW_TinyTree_EBuffer_t* ebuffer,
+ CXML_Vector_Metric_t segNum)
+{
+ CXML_Vector_Metric_t currentSegment;
+ NW_TinyTree_Segment_t* segment;
+ CXML_Vector_Metric_t firstIndex = 0;
+
+ NW_ASSERT(segNum < ebuffer->numSegments);
+
+ for (currentSegment = 0; currentSegment < segNum; currentSegment++){
+ segment = &(ebuffer->segmentList[currentSegment]);
+ firstIndex = (CXML_Vector_Metric_t)(firstIndex + segment->segmentSize);
+ }
+
+ return firstIndex;
+}
+
+/* Find a free block of a given size. This duplicates a bit of code from
+ * GetFirstIndex in order to avoid repeated iteration over the buffer list.
+ */
+
+static
+NW_Uint8*
+NW_TinyTree_EBuffer_FindFreeBlock(NW_TinyTree_EBuffer_t* ebuffer,
+ CXML_Vector_Metric_t size,
+ CXML_Vector_Metric_t *index) /* OUT */
+{
+ CXML_Vector_Metric_t currentSegment;
+ NW_TinyTree_Segment_t* segment;
+ CXML_Vector_Metric_t firstIndex = 0;
+ NW_Uint8* storage;
+
+ *index = CXML_Vector_AtEnd;
+
+ for (currentSegment = 0; currentSegment < ebuffer->numSegments; currentSegment++){
+ segment = &(ebuffer->segmentList[currentSegment]);
+
+ if((segment->segmentSize - segment->freeOffset) >= size){
+ *index = (CXML_Vector_Metric_t)(firstIndex + segment->freeOffset);
+ storage = segment->storage + segment->freeOffset;
+ segment->freeOffset = (CXML_Vector_Metric_t)(segment->freeOffset + size);
+ return storage;
+ }
+ firstIndex = (CXML_Vector_Metric_t)(firstIndex + segment->segmentSize);
+ }
+ return 0;
+}
+
+static
+NW_Status_t
+NW_TinyTree_EBuffer_GrowSegmentList(NW_TinyTree_EBuffer_t* ebuffer){
+
+ CXML_Vector_Metric_t newSegmentListSize;
+ NW_TinyTree_Segment_t* newSegmentList;
+
+
+ /* Since any new allocation is a continuous block contained in a
+ * single segment, we grow the segment list by a constant amount
+ */
+
+ newSegmentListSize =
+ (NW_Uint8)(ebuffer->segmentListSize + CXML_SEGMENT_LIST_INCREMENT);
+
+ /* if(newSegmentListSize == 0) then it means that there is overflow in the
+ * newSegmentListSize so return with error here.
+ */
+
+ if(newSegmentListSize == 0)
+ {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+
+ newSegmentList =
+ (NW_TinyTree_Segment_t*) NW_Mem_Malloc (newSegmentListSize * sizeof (*newSegmentList));
+
+ if (newSegmentList == NULL) {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ /* Copy the old segment list */
+
+ (void) NW_Mem_memcpy (newSegmentList, ebuffer->segmentList,
+ ebuffer->numSegments * sizeof (*newSegmentList));
+
+ /* Free the old segment list and install the new */
+
+ NW_Mem_Free (ebuffer->segmentList);
+ ebuffer->segmentList = newSegmentList;
+ ebuffer->segmentListSize = newSegmentListSize;
+ return NW_STAT_SUCCESS;
+}
+
+
+/*
+ * Allocate a new segment that holds a block of a given size.
+ */
+
+static
+NW_Uint8*
+NW_TinyTree_EBuffer_AllocSegment(NW_TinyTree_EBuffer_t* ebuffer,
+ CXML_Vector_Metric_t size,
+ CXML_Vector_Metric_t *index) /* OUT */
+{
+ NW_TinyTree_Segment_t* segment;
+
+ *index = CXML_Vector_AtEnd;
+
+ /* Make sure the segment list is big enough to hold the new segment */
+
+ if(ebuffer->numSegments == ebuffer->segmentListSize){
+ NW_TinyTree_EBuffer_GrowSegmentList(ebuffer);
+ }
+
+ /* The new segment is the first unused segment in the list */
+ segment = &(ebuffer->segmentList[ebuffer->numSegments]);
+
+ /* Increment the segment count */
+ ebuffer->numSegments = (CXML_Vector_Metric_t)(ebuffer->numSegments + 1);
+
+ /* Allocate segment storage with enough contiguous blocks to hold the requested size */
+
+ segment->segmentSize =
+ (CXML_Vector_Metric_t)(((size - 1) / ebuffer->blockSize + 1) * ebuffer->blockSize);
+
+ segment->storage = (NW_Uint8*)(NW_Mem_Malloc(segment->segmentSize));
+
+ if(segment->storage == 0){
+ segment->segmentSize = 0;
+ return 0;
+ }
+
+ /* Free offset goes at end of allocated block */
+ segment->freeOffset = size;
+
+ /* Get the first index of the newly allocated segment */
+ *index = NW_TinyTree_EBuffer_GetFirstIndex(ebuffer, (CXML_Vector_Metric_t)(ebuffer->numSegments - 1));
+
+ return segment->storage;
+}
+
+
+
+/* ------------------------------------------------------------------------- *
+ virtual methods
+ * ------------------------------------------------------------------------- */
+
+/* ------------------------------------------------------------------------- */
+NW_TinyTree_EBuffer_t*
+NW_TinyTree_EBuffer_Construct (NW_Uint8* initialBuffer,
+ CXML_Vector_Metric_t initBuffSize,
+ CXML_Vector_Metric_t blockSize,
+ NW_Bool freeBuff)
+{
+ NW_TinyTree_EBuffer_t* thisObj = (NW_TinyTree_EBuffer_t*)
+ NW_Mem_Malloc(sizeof(NW_TinyTree_EBuffer_t));
+
+ if(thisObj)
+ {
+ /* initialize the object */
+ thisObj->blockSize = blockSize;
+ thisObj->ownFirstBlock = freeBuff;
+ thisObj->segmentListSize = CXML_SEGMENT_LIST_INCREMENT;
+ NW_ASSERT(thisObj->segmentListSize > 0);
+ thisObj->segmentList = (NW_TinyTree_Segment_t*)
+ NW_Mem_Malloc (thisObj->segmentListSize * sizeof (*thisObj->segmentList));
+ if (thisObj->segmentList == NULL)
+ {
+ NW_Mem_Free(thisObj);
+ return NULL;
+ }
+ if (initialBuffer != NULL)
+ {
+ NW_ASSERT(initBuffSize != 0);
+ thisObj->segmentList[0].storage = initialBuffer;
+ thisObj->segmentList[0].segmentSize = initBuffSize;
+ thisObj->segmentList[0].freeOffset = initBuffSize;
+ thisObj->numSegments = 1;
+ }
+ else
+ {
+ /* If there's no first block, then we ignore the free flag passed in
+ * since we will be allocating the first block and thus must free it
+ */
+ thisObj->ownFirstBlock = NW_TRUE;
+ thisObj->numSegments = 0;
+ }
+ }
+ return thisObj;
+}
+
+/* ------------------------------------------------------------------------- */
+void
+NW_TinyTree_EBuffer_Destruct (NW_TinyTree_EBuffer_t* thisObj)
+{
+ CXML_Vector_Metric_t index;
+
+ /* release our resources */
+ for (index = 0; index < thisObj->numSegments; index++) {
+ if((index == 0) && (thisObj->ownFirstBlock == NW_FALSE)){
+ continue;
+ }
+ NW_Mem_Free (thisObj->segmentList[index].storage);
+ }
+ NW_Mem_Free (thisObj->segmentList);
+ NW_Mem_Free (thisObj);
+}
+
+
+/* ------------------------------------------------------------------------- *
+ final methods
+ * ------------------------------------------------------------------------- */
+
+
+/* Get an unused block of a given size. Returns the address of the
+ * block. Also returns an index (via the index OUT parameter) that can
+ * be used for later lookups of the block.
+*/
+
+NW_Uint8*
+NW_TinyTree_EBuffer_GetWritableBlock(NW_TinyTree_EBuffer_t* ebuffer,
+ CXML_Vector_Metric_t size,
+ CXML_Vector_Metric_t *index) /* OUT */
+{
+ NW_Uint8* storage;
+
+ NW_ASSERT(ebuffer != NULL);
+
+ /* First try to get an existing free block that's big enough */
+
+ storage = NW_TinyTree_EBuffer_FindFreeBlock(ebuffer, size, index);
+ if(storage != 0){
+ return storage;
+ }
+
+ /* Otherwise, allocate a new segment that holds a block of the right size */
+
+ return NW_TinyTree_EBuffer_AllocSegment(ebuffer, size, index);
+}
+
+
+/* Get a segment address and an offset corresponding to a given
+ * index. Also returns the segment size.
+ */
+
+NW_Status_t
+NW_TinyTree_EBuffer_GetSegmentAndOffset(NW_TinyTree_EBuffer_t* ebuffer,
+ CXML_Vector_Metric_t index,
+ NW_Uint8 ** segmentAddr, /* OUT */
+ CXML_Vector_Metric_t* segSize, /* OUT */
+ CXML_Vector_Metric_t* offset){ /* OUT */
+
+ CXML_Vector_Metric_t currentSegment;
+ NW_TinyTree_Segment_t* segment;
+ CXML_Vector_Metric_t firstIndex = 0;
+
+ NW_ASSERT(ebuffer != NULL);
+ NW_ASSERT(segmentAddr != NULL);
+ NW_ASSERT(segSize != NULL);
+ NW_ASSERT(offset != NULL);
+
+ for (currentSegment = 0; currentSegment < ebuffer->numSegments; currentSegment++){
+ segment = &(ebuffer->segmentList[currentSegment]);
+ if(index < (firstIndex + segment->segmentSize)){
+ *segmentAddr = segment->storage;
+ *segSize = segment->segmentSize;
+ *offset = (CXML_Vector_Metric_t)(index - firstIndex);
+ return NW_STAT_SUCCESS;
+ }
+ firstIndex = (CXML_Vector_Metric_t)(firstIndex + segment->segmentSize);
+ }
+
+ return NW_STAT_FAILURE;
+}
+
+/* Get an index from a segment and offset */
+
+NW_Status_t
+NW_TinyTree_EBuffer_GetIndex(NW_TinyTree_EBuffer_t* ebuffer,
+ NW_Uint8* segmentAddr,
+ CXML_Vector_Metric_t offset,
+ CXML_Vector_Metric_t* index) /* OUT */
+
+{
+
+ CXML_Vector_Metric_t currentSegment;
+ NW_TinyTree_Segment_t* segment;
+ CXML_Vector_Metric_t firstIndex = 0;
+
+ NW_ASSERT(ebuffer != NULL);
+
+ for (currentSegment = 0; currentSegment < ebuffer->numSegments; currentSegment++){
+ segment = &(ebuffer->segmentList[currentSegment]);
+ if(segmentAddr == segment->storage){
+ *index = (CXML_Vector_Metric_t)(firstIndex + offset);
+ return NW_STAT_SUCCESS;
+ }
+ firstIndex = (CXML_Vector_Metric_t)(firstIndex + segment->segmentSize);
+ }
+
+ return NW_STAT_FAILURE;
+}
+
+
+/* Get the address corresponding to a given index */
+
+NW_Uint8*
+NW_TinyTree_EBuffer_AddressAt(NW_TinyTree_EBuffer_t* ebuffer,
+ CXML_Vector_Metric_t index){
+
+ NW_Uint8* segmentAddr;
+ CXML_Vector_Metric_t segSize;
+ CXML_Vector_Metric_t offset;
+ NW_Status_t status;
+
+ NW_ASSERT(ebuffer != NULL);
+
+ status = NW_TinyTree_EBuffer_GetSegmentAndOffset(ebuffer, index, &segmentAddr, &segSize, &offset);
+ if(status == NW_STAT_SUCCESS){
+ return segmentAddr + offset;
+ }
+ return 0;
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/tinytree/src/TreeVector.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_tinytree_treevector.h>
+#include <xml/cxml/nw_tinytree.h>
+/* ------------------------------------------------------------------------- */
+
+NW_TinyTree_TreeVector_t*
+NW_TinyTree_TreeVector_Construct (CXML_Vector_Metric_t elementSize,
+ CXML_Vector_Metric_t segmentSize,
+ NW_TinyTree_t *tree)
+{
+ NW_TinyTree_TreeVector_t* thisObj;
+
+
+ /* for convenience */
+ thisObj = (NW_TinyTree_TreeVector_t*) NW_Mem_Malloc (sizeof(NW_TinyTree_TreeVector_t));
+ if(thisObj == NULL)
+ {
+ return NULL;
+ }
+
+ thisObj->vector = CXML_Vector_Construct(elementSize, segmentSize);
+ if (thisObj->vector == NULL)
+ {
+ NW_Mem_Free (thisObj);
+ return NULL;
+ }
+
+ /* initialize the object */
+ thisObj->tree = tree;
+ thisObj->lastValid = -1;
+ /* successful completion */
+ return thisObj;
+}
+
+/* Override the base class to account for the sentinel at the beginning of each
+ * segment
+ */
+
+void
+NW_TinyTree_TreeVector_Destruct (NW_TinyTree_TreeVector_t* thisObj)
+{
+ if(thisObj->vector)
+ {
+ /* Adjest the sentinel in the vector */
+ CXML_Vector_AdjustSegment(thisObj->vector);
+
+ /* Destroy the vector */
+ CXML_Vector_Destruct(thisObj->vector);
+ }
+ NW_Mem_Free (thisObj);
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/tinytree/src/tree.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,730 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include <xml/cxml/nw_tinytree.h>
+#include "cxml_vector.h"
+
+NW_TinyTree_t*
+NW_TinyTree_new(){
+ NW_TinyTree_t* tree = (NW_TinyTree_t*) NW_Mem_Malloc (sizeof(NW_TinyTree_t));
+ if (tree != NULL){
+ tree->tree = NULL;
+ tree->root_index = 0;
+ tree->ebuffer = NULL;
+ tree->context = NULL;
+ }
+ return tree;
+}
+
+NW_Status_t
+NW_TinyTree_construct(NW_TinyTree_t *tree,
+ CXML_Vector_Metric_t initialNodeCount,
+ void *buffer,
+ NW_TinyTree_Offset_t buffsz,
+ void *context,
+ NW_Bool freeBuff){
+
+ NW_ASSERT(tree != NULL);
+
+ tree->tree =
+ NW_TinyTree_TreeVector_Construct (sizeof(NW_TinyTree_Node_t),
+ initialNodeCount,
+ tree);
+ if(tree->tree == NULL) {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ /* Make the supplied buffer the first ebuffer segment */
+ tree->ebuffer = NW_TinyTree_EBuffer_Construct((NW_Uint8*) buffer,
+ buffsz,
+ NW_TINY_TREE_BLOCK_SIZE_DEFAULT,
+ freeBuff);
+ if(tree->ebuffer == NULL){
+ NW_TinyTree_TreeVector_Destruct(tree->tree);
+ tree->tree = NULL;
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ /* Init the rest of the tree */
+ tree->root_index = 0;
+ tree->context = context;
+ return NW_STAT_SUCCESS;
+}
+
+void
+NW_TinyTree_destruct(NW_TinyTree_t *tree)
+{
+ if (tree != NULL){
+ if (tree->tree != NULL) {
+ NW_TinyTree_TreeVector_Destruct (tree->tree);
+ }
+ if (tree->ebuffer != NULL){
+ NW_TinyTree_EBuffer_Destruct (tree->ebuffer);
+ }
+ tree->tree = NULL;
+ tree->root_index = 0;
+ tree->ebuffer = NULL;
+ tree->context = NULL;
+ }
+}
+
+static
+NW_TinyTree_Node_t*
+NW_TinyTree_appendNodeAt(NW_TinyTree_t *tree,
+ NW_TinyTree_Node_t *node,
+ NW_TinyTree_Index_t index){
+ NW_TinyTree_TreeNode_t* sentinel;
+ NW_TinyTree_Node_t* retNode = NULL;
+
+
+ NW_ASSERT(tree != NULL);
+ NW_ASSERT(tree->tree != NULL);
+ NW_ASSERT(node != NULL);
+
+ sentinel = (NW_TinyTree_TreeNode_t*) NW_Mem_Malloc(sizeof(NW_TinyTree_TreeNode_t));
+ if(sentinel == NULL){
+ return NULL;
+ }
+ sentinel->flags = TNODE_FLAG_TREE;
+ sentinel->tree = tree;
+
+ /* Add the new element at the specified index */
+ retNode = (NW_TinyTree_Node_t*)
+ CXML_Vector_InsertAt(tree->tree->vector, (void*)node, index, sentinel);
+ NW_Mem_Free(sentinel);
+ return retNode;
+}
+
+/* Add a node, appending storage to the tree vector.
+ * The appended node is created as an orphan and needs to be attached
+ * to the tree somewhere.
+ */
+
+static
+NW_TinyTree_Node_t*
+NW_TinyTree_appendNode(NW_TinyTree_t *tree,
+ NW_TinyTree_Node_t *node){
+
+ NW_ASSERT(tree != NULL);
+ NW_ASSERT(node != NULL);
+
+ /* Add the new element */
+
+ return NW_TinyTree_appendNodeAt(tree, node, CXML_Vector_AtEnd);
+}
+
+
+/* Get the node at a given index */
+
+static
+NW_TinyTree_Node_t*
+NW_TinyTree_getNode(NW_TinyTree_t *tree,
+ NW_TinyTree_Index_t index){
+
+ NW_ASSERT(tree != NULL);
+ NW_ASSERT(tree->tree != NULL);
+ NW_ASSERT(tree->tree->vector != NULL);
+ NW_ASSERT(index > 0);
+
+ return (NW_TinyTree_Node_t*)
+ CXML_Vector_ElementAt(tree->tree->vector, (CXML_Vector_Metric_t)index);
+}
+
+/*
+* Create an unattached node which references the source buffer at offset.
+*/
+
+NW_TinyTree_Node_t*
+NW_TinyTree_createNode(NW_TinyTree_t* tree,
+ NW_TinyTree_Offset_t offset){
+
+ NW_TinyTree_Node_t node;
+
+ NW_ASSERT(tree != NULL);
+ NW_ASSERT(tree->tree != NULL);
+ /* The root must have been set before creating any new nodes */
+ NW_ASSERT(tree->root_index == 1);
+
+ /* Initialize a node on the stack */
+ node.source_offset = offset;
+ node.flags = 0;
+ node.first_child = 0;
+ node.next_sibling = 0;
+ node.tree = tree;
+ node.token = 0;
+ /* Copy this into the tree */
+ return NW_TinyTree_appendNode(tree, &node);
+}
+
+/*
+* Create a root node which references the source buffer at offset.
+* Returns a pointer to the root node.
+*/
+
+NW_TinyTree_Node_t*
+NW_TinyTree_setRoot(NW_TinyTree_t *tree,
+ NW_TinyTree_Offset_t offset){
+
+ NW_TinyTree_Node_t root_node;
+
+ NW_ASSERT(tree != NULL);
+ NW_ASSERT(tree->tree != NULL);
+ /* The root must not have set been already */
+ NW_ASSERT(tree->root_index == 0);
+
+ tree->root_index = 1;
+ root_node.source_offset = offset;
+ root_node.flags = TNODE_FLAG_ROOT;
+ root_node.first_child = 0;
+ root_node.next_sibling = 0;
+ root_node.tree = tree;
+ root_node.token = 0;
+ /* TODO: make this a dummy element! */
+ if (NW_TinyTree_appendNodeAt(tree, &root_node, 0) == NULL) {
+ return NULL;
+ }
+
+ return NW_TinyTree_appendNodeAt(tree, &root_node, tree->root_index);
+}
+
+/*
+* Get the root node of the tree.
+*/
+
+NW_TinyTree_Node_t*
+NW_TinyTree_getRoot(NW_TinyTree_t *tree){
+
+ NW_ASSERT(tree != NULL);
+ /* Return NULL if not set */
+ if(tree->root_index == 0)
+ return NULL;
+ return NW_TinyTree_getNode(tree, tree->root_index);
+}
+
+NW_TinyTree_Node_t*
+NW_TinyTree_findNextSibling(NW_TinyTree_Node_t *node){
+
+ NW_ASSERT(node != NULL);
+
+ if (((node->flags & TNODE_FLAG_LASTSIBLING) == TNODE_FLAG_LASTSIBLING)
+ || (node->next_sibling == 0)) {
+ return NULL;
+ }
+
+ return node->next_sibling;
+}
+
+/* Find last sibling address */
+
+NW_TinyTree_Node_t*
+NW_TinyTree_findLastSibling(NW_TinyTree_Node_t *node)
+{
+ NW_TinyTree_Node_t* sibling = node;
+
+ NW_ASSERT(node != NULL);
+
+ while (((sibling->flags & TNODE_FLAG_LASTSIBLING) != TNODE_FLAG_LASTSIBLING)
+ && (sibling->next_sibling != 0)) {
+ sibling = sibling->next_sibling;
+ }
+
+ /* Because the array always starts with the tree node, no node ever has index 0 */
+ if(sibling == node)
+ return NULL;
+
+ return sibling;
+}
+
+NW_TinyTree_Node_t*
+NW_TinyTree_findFirstChild(NW_TinyTree_Node_t *node)
+{
+ NW_ASSERT(node != NULL);
+ return node->first_child;
+}
+
+
+/*
+* Find a node's last child
+*/
+
+NW_TinyTree_Node_t*
+NW_TinyTree_findLastChild(NW_TinyTree_Node_t* node){
+
+ NW_TinyTree_Node_t* first;
+ NW_TinyTree_Node_t* last;
+
+ NW_ASSERT(node != NULL);
+
+ first = NW_TinyTree_findFirstChild(node);
+
+ if(first == NULL){
+ return NULL; /* No children */
+ }
+
+ last = NW_TinyTree_findLastSibling(first);
+
+ if(last == NULL){ /* No siblings, only child */
+ return first;
+ }
+
+ return last;
+}
+
+/*
+* Get a node's parent
+*/
+
+NW_TinyTree_Node_t*
+NW_TinyTree_findParent(NW_TinyTree_Node_t *node)
+{
+
+ NW_TinyTree_Node_t *last_sibling;
+
+ NW_ASSERT(node != NULL);
+
+ /* Is this the root node ? */
+ if((node->flags & TNODE_FLAG_ROOT) == TNODE_FLAG_ROOT)
+ return NULL;
+
+ /* Is next sibling zero ? */
+ if (node->next_sibling == 0)
+ return NULL;
+
+ /* The next sibling index of the last sibling points back to parent */
+
+ last_sibling = NW_TinyTree_findLastSibling(node);
+
+ if (last_sibling == NULL){
+ last_sibling = node; /* No siblings */
+ }
+
+ return last_sibling->next_sibling;
+}
+
+
+/*
+* Attach a node as a sibling after another node.
+*/
+
+NW_Status_t
+NW_TinyTree_attachAfter(NW_TinyTree_Node_t *node,
+ NW_TinyTree_Node_t *sibling)
+{
+ NW_ASSERT(node != NULL);
+ NW_ASSERT(sibling != NULL);
+
+ if((node->flags & TNODE_FLAG_LASTSIBLING) == TNODE_FLAG_LASTSIBLING){
+ node->flags &= ~TNODE_FLAG_LASTSIBLING;
+ sibling->flags |= TNODE_FLAG_LASTSIBLING;
+ }
+
+ sibling->next_sibling = node->next_sibling;
+ node->next_sibling = sibling;
+ return NW_STAT_SUCCESS;
+}
+
+NW_TinyTree_Node_t*
+NW_TinyTree_findPreviousSibling(NW_TinyTree_Node_t *node){
+
+ NW_TinyTree_Node_t *sibling;
+ NW_TinyTree_Node_t *parent;
+
+ NW_ASSERT(node != NULL);
+
+ /* First find the parent */
+ parent = NW_TinyTree_findParent(node);
+
+ if(parent == NULL)
+ return NULL;
+
+ /* Then get first child */
+ sibling = NW_TinyTree_findFirstChild(parent);
+ NW_ASSERT(sibling != NULL);
+ if(sibling == node)
+ return NULL; /* Only child */
+
+ /* Find a sibling whose next_sibling points to me */
+ while(sibling->next_sibling != node){
+ NW_ASSERT(sibling->next_sibling != NULL);
+ sibling = sibling->next_sibling;
+ }
+ return sibling;
+}
+
+/*
+* Attach a node as a sibling before another node.
+*/
+
+NW_Status_t
+NW_TinyTree_attachBefore(NW_TinyTree_Node_t *node,
+ NW_TinyTree_Node_t *sibling)
+{
+ NW_TinyTree_Node_t *previous = NW_TinyTree_findPreviousSibling(node);
+
+ NW_ASSERT(node != NULL);
+ NW_ASSERT(sibling != NULL);
+
+ /* Has a previous sibling, insert after */
+ if(previous != NULL){
+ NW_TinyTree_attachAfter(previous, sibling);
+ return NW_STAT_SUCCESS;
+ }
+
+ /*Otherwise, insert as first child */
+ previous = NW_TinyTree_findParent(node);
+ if(previous == NULL)
+ return NW_STAT_FAILURE; /* TODO: return a more descriptive error status */
+
+ previous->first_child = sibling;
+ /*lint -e{794} Conceivable use of null pointer */
+ sibling->next_sibling = node;
+
+ return NW_STAT_SUCCESS;
+}
+
+/*
+* Attach a child (as last child) to a node
+*/
+
+NW_Status_t
+NW_TinyTree_attachChild(NW_TinyTree_Node_t *node,
+ NW_TinyTree_Node_t *child)
+{
+ NW_TinyTree_Node_t *last_child = NW_TinyTree_findLastChild(node);
+
+ NW_ASSERT(node != NULL);
+ NW_ASSERT(child != NULL);
+
+ /* If there are no children, attach as first child */
+ if(last_child == NULL){
+ node->first_child = child;
+ /* Point child's next_sibling back to parent and set LASTSIBLING flag */
+ child->next_sibling = node;
+ child->flags |= TNODE_FLAG_LASTSIBLING;
+ return NW_STAT_SUCCESS;
+ }
+ /* Else attach as sibling to last child */
+ else{
+ return NW_TinyTree_attachAfter(last_child, child);
+ }
+}
+
+NW_Status_t
+NW_TinyTree_deleteNode(NW_TinyTree_Node_t *node)
+{
+ NW_ASSERT(node != NULL);
+
+ /* If not the root node, then adjust parent or sibling indexes */
+ if((node->flags & TNODE_FLAG_ROOT)!= TNODE_FLAG_ROOT){
+ NW_TinyTree_Node_t *previous_sibling;
+ previous_sibling = NW_TinyTree_findPreviousSibling(node);
+ /* If we are first child, modify parent's first_child index */
+ if(previous_sibling == NULL){
+ NW_TinyTree_Node_t *parent = NW_TinyTree_findParent(node);
+ NW_ASSERT(parent != NULL);
+ /* If also last child (i.e. only child) */
+ if((node->flags & TNODE_FLAG_LASTSIBLING) == TNODE_FLAG_LASTSIBLING){
+ /* Zero the parent's child index */
+ parent->first_child = 0;
+ }
+ /* Not only child */
+ else{
+ /* Move parent child offset to my next sibling */
+ parent->first_child = node->next_sibling;
+ }
+ }
+ /* Not the first child */
+ else {
+ /* Adjust previous sibling next_sibling index */
+ previous_sibling->next_sibling = node->next_sibling;
+ if((node->flags & TNODE_FLAG_LASTSIBLING) == TNODE_FLAG_LASTSIBLING){
+ previous_sibling->flags |= TNODE_FLAG_LASTSIBLING;
+ }
+ }
+ }
+
+ /* Note that we don't actually remove the node from the tree vector
+ * since this may cause other nodes to be moved, invalidating any
+ * references to them.
+ */
+
+ return NW_STAT_SUCCESS;
+}
+
+NW_Status_t
+NW_TinyTree_setContext(NW_TinyTree_t *tree,
+ void *context){
+ NW_ASSERT(tree != NULL);
+ tree->context = context;
+ return NW_STAT_SUCCESS;
+}
+
+void*
+NW_TinyTree_getContext(NW_TinyTree_t *tree){
+ NW_ASSERT(tree != NULL);
+ return tree->context;
+}
+
+NW_Uint16
+NW_TinyTree_Node_getFlags(NW_TinyTree_Node_t *node){
+ NW_ASSERT(node != NULL);
+ return node->flags;
+}
+
+NW_Status_t
+NW_TinyTree_Node_setUserFlags(NW_TinyTree_Node_t *node,
+ NW_Uint16 flags){
+ NW_ASSERT(node != NULL);
+ node->flags &= ~TNODE_USR_FLAGS; /*Zero user flags */
+ node->flags |= (flags & TNODE_USR_FLAGS);
+ return NW_STAT_SUCCESS;
+}
+
+NW_TinyTree_Offset_t
+NW_TinyTree_Node_getSourceOffset(NW_TinyTree_Node_t *node){
+ NW_ASSERT(node != NULL);
+
+ return node->source_offset;
+}
+
+void *
+NW_TinyTree_Node_getSourceAddress(NW_TinyTree_t *tree,
+ NW_TinyTree_Node_t* node){
+
+ NW_ASSERT(node != NULL);
+ NW_ASSERT(tree != NULL);
+
+ /*lint -e{794} Conceivable use of null pointer */
+ return (void *)(NW_TinyTree_EBuffer_AddressAt(tree->ebuffer,
+ node->source_offset));
+}
+
+
+NW_Status_t
+NW_TinyTree_Node_GetSegmentAndOffset(NW_TinyTree_t* tree,
+ NW_TinyTree_Node_t* node,
+ NW_Uint8** segment,
+ NW_TinyTree_Offset_t* segSize,
+ NW_TinyTree_Offset_t* offset) {
+ NW_ASSERT(tree != NULL);
+ NW_ASSERT(node != NULL);
+
+ return NW_TinyTree_EBuffer_GetSegmentAndOffset(tree->ebuffer,
+ node->source_offset,
+ segment,
+ segSize,
+ offset);
+}
+
+NW_Status_t
+NW_TinyTree_GetSourceOffset(NW_TinyTree_t* tree,
+ NW_Uint8* segmentAddr,
+ NW_TinyTree_Offset_t offset,
+ NW_TinyTree_Offset_t* index){
+ NW_ASSERT(tree != NULL);
+
+ return NW_TinyTree_EBuffer_GetIndex(tree->ebuffer, segmentAddr, offset, index);
+}
+
+
+
+NW_Uint8*
+NW_TinyTree_GetWritableBlock(NW_TinyTree_t* tree,
+ NW_TinyTree_Offset_t size,
+ NW_TinyTree_Offset_t * source_offset){ /* OUT */
+
+ return NW_TinyTree_EBuffer_GetWritableBlock(tree->ebuffer, size, source_offset);
+
+}
+
+NW_TinyTree_t*
+NW_TinyTree_Node_findTreeOld(NW_TinyTree_Node_t *node)
+{
+ NW_TinyTree_Node_t *parent = NW_TinyTree_findParent(node);
+ NW_ASSERT(node != NULL);
+
+ // find rootNode
+ while (parent != NULL)
+ {
+ node = parent;
+ parent = NW_TinyTree_findParent(parent);
+ }
+ // root node should be next to sentinal tree node
+ while(node != NULL){
+ if((node->flags & TNODE_FLAG_TREE) == TNODE_FLAG_TREE){
+ return ((NW_TinyTree_TreeNode_t*)node)->tree;
+ }
+ --node;
+ }
+ // Not reached
+ NW_ASSERT(0);
+ return NULL;
+}
+
+EXPORT_C NW_TinyTree_t*
+NW_TinyTree_Node_findTree(NW_TinyTree_Node_t *node)
+ {
+ if (!node->tree)
+ {
+ return NW_TinyTree_Node_findTreeOld(node);
+ }
+ else
+ {
+ return node->tree;
+ }
+
+ }
+
+/*
+* Create a new node as a child of an existing node. The child
+* references the source buffer at offset. The new child node is
+* returned.
+*/
+
+NW_TinyTree_Node_t*
+NW_TinyTree_createChild(NW_TinyTree_t *tree,
+ NW_TinyTree_Node_t *parent,
+ NW_TinyTree_Offset_t offset){
+
+ NW_TinyTree_Node_t *child = NW_TinyTree_createNode(tree, offset);
+
+ if (child != NULL){
+ NW_TinyTree_attachChild(parent, child);
+ }
+
+ return child;
+}
+
+/*
+* Create a new node as an immediate sibling to an existing node. The
+* child references the source buffer at offset. The new child node is
+* returned.
+*/
+NW_TinyTree_Node_t*
+NW_TinyTree_createSibling(NW_TinyTree_t *tree,
+ NW_TinyTree_Node_t *node,
+ NW_TinyTree_Offset_t offset)
+{
+ NW_TinyTree_Node_t *sibling = NW_TinyTree_createNode(tree, offset);
+ NW_TinyTree_attachAfter(node, sibling);
+ return sibling;
+}
+
+void
+NW_TinyTree_recurse(NW_TinyTree_t* tree,
+ NW_TinyTree_Node_t* start_node,
+ void (*Node_CB) (NW_TinyTree_t*, NW_TinyTree_Node_t *, void *),
+ void * context)
+{
+ NW_TinyTree_Node_t *child;
+
+ (*(Node_CB)) (tree, start_node, context);
+ if((child = NW_TinyTree_findFirstChild(start_node)) != 0){
+ NW_TinyTree_recurse(tree, child, Node_CB, context);
+ while((child = NW_TinyTree_findNextSibling(child)) != 0){
+ NW_TinyTree_recurse(tree, child, Node_CB, context);
+ }
+ }
+}
+
+/* Initialize a node iterator with a start node */
+
+void
+NW_TinyTree_NodeIterator_init(NW_TinyTree_Node_t* start_node,
+ NW_TinyTree_NodeIterator_t* iterator)
+{
+ iterator->start_node = start_node;
+ iterator->traversal_node = NULL;
+}
+
+/*
+* Iterate through a subtree returning each node exactly once.
+* The algorithm follows the toplogical ordering of the tree (if there is
+* an edge from v0 to v1, always visit v0 before v1). It's equivalent to
+* solving a labyrinth by keeping your right hand on the wall!
+*/
+
+NW_TinyTree_Node_t*
+NW_TinyTree_NodeIterator_iterate(NW_TinyTree_NodeIterator_t *iterator){
+
+ NW_TinyTree_Node_t* node;
+
+ if(iterator->start_node == NULL)
+ return NULL;
+
+ if(iterator->traversal_node == NULL){
+ node = iterator->start_node;
+ if(iterator->start_node->first_child != 0){
+ iterator->traversal_node = iterator->start_node->first_child;
+ }
+ else{
+ iterator->start_node = NULL;
+ }
+ return node;
+ }
+
+ node = iterator->traversal_node;
+
+ /* First try to move down */
+ if(iterator->traversal_node->first_child != 0){
+ iterator->traversal_node = iterator->traversal_node->first_child;
+ return node;
+ }
+
+ /* If you can't move down, move right */
+
+ if((iterator->traversal_node->flags & TNODE_FLAG_LASTSIBLING) != TNODE_FLAG_LASTSIBLING){
+ iterator->traversal_node = iterator->traversal_node->next_sibling;
+ return node;
+ }
+
+ /* If you can't move right, move back up */
+ /* TODO: some other expression here */
+ while(node != NULL){
+ iterator->traversal_node = iterator->traversal_node->next_sibling;
+ /* If you reached the start, quit */
+ if(iterator->traversal_node == iterator->start_node){
+ iterator->start_node = NULL;
+ return node;
+ }
+ /* Otherwise, try to move right */
+ if((iterator->traversal_node->flags & TNODE_FLAG_LASTSIBLING) != TNODE_FLAG_LASTSIBLING){
+ iterator->traversal_node = iterator->traversal_node->next_sibling;
+ return node;
+ }
+ /* Otherwise, continue to move up */
+ }
+ return NULL;
+}
+
+/* Iterate the siblings of a node */
+
+NW_TinyTree_Node_t*
+NW_TinyTree_NodeIterator_iterateSiblings(NW_TinyTree_NodeIterator_t *iterator){
+ if((iterator->start_node->flags & TNODE_FLAG_LASTSIBLING)== TNODE_FLAG_LASTSIBLING)
+ return NULL;
+ else{
+ iterator->start_node = iterator->start_node->next_sibling;
+ return iterator->start_node;
+ }
+}
+
+
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/tinytree/src/tree_alloc.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,291 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include "cxml_internal.h"
+#include <xml/cxml/nw_tinytree.h>
+#include "nw_tinytree_alloc.h"
+
+/*
+* This is not a generalized allocator. It is intended to support
+* dynamic extension of the node array or storage buffers associated
+* with a tiny tree. The goal of the design is to provide a kind of
+* virtual array whose storage can be allocated in several
+* non-contiguous segments located anywhere in memory. Since there
+* will be gaps between segments and segments may be allocated in
+* out-of-order locations (for example a second segment may be
+* allocated at an address lower than the first segment) simple
+* pointer arithmetic and array indexing cannot be used to address
+* array elements. However, rather than trying to provide a totally
+* general non-contiguous array package here, certain limitations have
+* been imposed. These simplify the implementation but mean that this
+* module can only be used with certain constraints. These constraints
+* are not currently a problem for the tiny dom parser, but any change
+* in the way the parser uses this module must be done with extreme
+* care. Eventually, we may want to generalize this package if this
+* can be done without adding too much to the footprint of computing
+* burden.
+*
+* The main constraint is that any code which writes to or reads from
+* a dynamically extended array must be sure that operations involving
+* ordinary pointer arithmetic and array indexing always occur within
+* the boudaries of a single segment. Operations that may result in
+* crossing a segment boundary must use the supplied address and
+* offset increment methods (which can be thought of as operator
+* overloads for the += operator). Furthermore, it needs to be
+* understood that any increment which results in crossing a segment
+* boundary may result in the allocation of a new segment if the
+* resulting address is not within an existing segment. When an
+* address or offset is incremented to a new segment the result will
+* be adjusted to the new segment and may have an unexpected value
+* (for example, incrementing address x by a positive increment may
+* result in an address that is less than x.). One important rule is
+* that the result of incrementing x by some value i is not guaranteed
+* to be idempotent if the increment crosses a segment boundary: i.e
+* addressIncrement(x,i) == addressIncrement(x,i) is not guaranteed to
+* be true. Future references to an address that results from an
+* increment operations must always use the result of the
+* operation. So, for example, (j = addressIncrement(x,i)) ==
+* addressIncrement(x,x+j) is guaranteed to be true.
+*
+* Segment storage addresses are always padded to align with the size
+* of the data object to be stored. This means that segments allocated
+* for a specific object type must be treated as as arrays of that
+* object type (or as arrays of bytes).
+*
+* The parser code always uses this module according to these rules.
+* Specifically, no tree node crosses a segment boundary and no
+* parsable fragment of wbxml (a fragment which the parser can
+* complete) every crosses a segment boundary. This latter condition
+* allows the parser to treat its current buffer as a simple array of
+* bytes. Another rule is that all of the offsets stored in tree
+* nodes are guaranteed to address an allocated segment. For example,
+* when writing a node, the storage offset is incremented using the
+* offset increment * operation. The resulting offsets (stored in
+* nodes) can then be safely used to address the written-to storage.
+*
+*/
+
+/*
+* Allocate segments for buffer and node array storage. The base
+* segment address is the one from which all relative offsets are
+* calculated. Segments are probably not contiguous, and, given that
+* new segments might be allocated anywhere relative to existing
+* segments, the offset must be a relative one. This limits the
+* maximum relative offset to the beginning of a new segment to be a
+* signed integer of the offset type.
+*/
+
+#include <limits.h>
+#define MAX_REL_OFFSET INT_MAX
+
+static
+NW_TinyTree_SegHeader_t*
+NW_TinyTree_findLastSegment(NW_TinyTree_SegHeader_t *base){
+ NW_TinyTree_SegHeader_t *last_seg = base;
+ while(last_seg->next != 0)
+ {
+ last_seg = (NW_TinyTree_SegHeader_t*)((NW_Byte*)base + last_seg->next);
+ }
+ return last_seg;
+}
+
+
+NW_TinyTree_Offset_t
+NW_TinyTree_segmentGetFreeSpace(NW_TinyTree_SegHeader_t *segment){
+ return (NW_TinyTree_Offset_t)(segment->size-segment->free_offset);
+}
+
+
+NW_TinyTree_Offset_t
+NW_TinyTree_getFreeStorageSpace(NW_TinyTree_SegHeader_t *base){
+ NW_TinyTree_SegHeader_t *last_seg = NW_TinyTree_findLastSegment(base);
+ return NW_TinyTree_segmentGetFreeSpace(last_seg);
+}
+
+NW_TinyTree_SegHeader_t*
+NW_TinyTree_addSegment(NW_TinyTree_SegHeader_t *base,
+ NW_TinyTree_Offset_t size){
+ NW_TinyTree_SegHeader_t *new_seg;
+ NW_TinyTree_SegHeader_t *last_seg = NW_TinyTree_findLastSegment(base);
+ NW_Int32 offset;
+
+ /* The extra node is added to make sure we have space to pad the segment storage to an even node boundary */
+ NW_Uint32 alloc_size = size + sizeof(NW_TinyTree_SegHeader_t) + sizeof(NW_TinyTree_Node_t);
+ new_seg = (NW_TinyTree_SegHeader_t*)NW_Mem_Malloc(alloc_size);
+
+ if(new_seg != 0){
+ offset = (NW_Byte*)new_seg - (NW_Byte*)base;
+ if(abs(offset) > MAX_REL_OFFSET){
+ NW_Mem_Free(new_seg);
+ return 0;
+ }
+ NW_Mem_memset(new_seg, 0, alloc_size);
+ /* Shift the storage pointer to an even boundary of a node so we can use this as an array of nodes */
+ new_seg->initializer = base->initializer;
+ last_seg->next = (NW_TinyTree_RelativeOffset_t)offset;
+ new_seg->size = size;
+ new_seg->free_offset = 0;
+ new_seg->storage = (NW_Uint8*)
+ (((((NW_Uint32) new_seg) + sizeof(NW_TinyTree_SegHeader_t) - 1)
+ / sizeof (NW_TinyTree_Node_t) + 1)
+ * sizeof (NW_TinyTree_Node_t));
+ if(new_seg->initializer)
+ (*(new_seg->initializer))(new_seg->storage, size);
+ }
+ return new_seg;
+}
+
+/*
+* Free segments allocated by addSegment only.
+*/
+
+void
+NW_TinyTree_freeSegments(NW_TinyTree_SegHeader_t *base){
+ NW_TinyTree_SegHeader_t *lastSegment = NULL;
+ NW_TinyTree_SegHeader_t *current = base;
+ NW_TinyTree_SegHeader_t *previous = NULL;
+
+ NW_Uint16 totalAdditionalSegments = 0;
+ NW_Uint16 index = 0;
+ NW_Uint16 i = 0;
+
+ while (current->next != 0)
+ {
+ totalAdditionalSegments++;
+ current = (NW_TinyTree_SegHeader_t*)((NW_Byte*)base + current->next);
+ }
+ lastSegment = current;
+
+ while(index< totalAdditionalSegments)
+ {
+ current = base;
+ i = 0;
+ while (i < (totalAdditionalSegments - index))
+ {
+ previous = current;
+ current = (NW_TinyTree_SegHeader_t*)((NW_Byte*)base + current->next);
+ i++;
+ }
+ NW_Mem_Free(lastSegment);
+ lastSegment = previous;
+ index++;
+ }
+
+}
+
+
+/*
+* Get the segment header associated with an offset. This allocates a new
+* segment if the offset is beyond any currently allocated segment. If a new
+* segment is allocated, the offset is readjusted to the beginning of the new
+* segment.
+*/
+
+NW_TinyTree_SegHeader_t*
+NW_TinyTree_addressGetSegment(NW_TinyTree_SegHeader_t *base,
+ NW_Byte **address){
+
+ NW_TinyTree_SegHeader_t *segment = base;
+ while(segment != 0){
+ if ((*address > segment->storage) && (*address < (segment->storage + segment->size)))
+ return segment;
+ if (segment->next == 0){ /* Add new segment */
+ segment = NW_TinyTree_addSegment(base, segment->size); /* Same size as last segment */
+ if(segment == 0){
+ break;
+ }
+ /*
+ * Reset address to beginning of new segment storage.
+ */
+ *address = segment->storage;
+ return segment;
+ }
+ segment = (NW_TinyTree_SegHeader_t*)((NW_Byte*)base + segment->next);
+ }
+ return 0;
+}
+
+
+NW_Byte*
+NW_TinyTree_addressIncrement(NW_TinyTree_SegHeader_t *base,
+ NW_Byte *address,
+ NW_TinyTree_Offset_t delta){
+ NW_Byte* new_address = address + delta;
+ NW_TinyTree_SegHeader_t *segment = NW_TinyTree_addressGetSegment(base, &new_address);
+ if(new_address >= (segment->storage + segment->free_offset)) /* Haven't touched this memory before */
+ {
+ segment->free_offset = (NW_TinyTree_Offset_t)(new_address - segment->storage);
+ }
+ return new_address;
+}
+
+/*
+* Get the segment header associated with an offset. This allocates a new
+* segment if the offset is beyond any currently allocated segment. If a new
+* segment is allocated, the offset is readjusted to the beginning of the new
+* segment.
+*/
+
+NW_TinyTree_SegHeader_t*
+NW_TinyTree_offsetGetSegment(NW_TinyTree_SegHeader_t *base,
+ NW_TinyTree_Offset_t *offset){
+
+ NW_TinyTree_SegHeader_t *segment = base;
+ while(segment != 0){
+ if (((base->storage + *offset) > segment->storage) && ((base->storage + *offset) < (segment->storage + segment->size)))
+ return segment;
+ if (segment->next == 0){ /* Add new segment */
+ if (segment->size > MIN_SEGMENT_SIZE)
+ segment = NW_TinyTree_addSegment(base, segment->size); /* Same size as last segment */
+ else
+ segment = NW_TinyTree_addSegment(base, MIN_SEGMENT_SIZE);
+ if(segment == 0){
+ break;
+ }
+ /*
+ * Reset offset to beginning of new segment storage.
+ */
+ *offset = (NW_TinyTree_Offset_t)(segment->storage - base->storage);
+ return segment;
+ }
+ segment = (NW_TinyTree_SegHeader_t*)((NW_Byte*)base + segment->next);
+ }
+ return 0;
+}
+
+NW_TinyTree_Offset_t
+NW_TinyTree_offsetIncrement(NW_TinyTree_SegHeader_t *base,
+ NW_TinyTree_Offset_t offset,
+ NW_TinyTree_Offset_t delta){
+ NW_TinyTree_Offset_t new_offset = (NW_TinyTree_Offset_t)(offset + delta);
+ NW_TinyTree_SegHeader_t *segment = NW_TinyTree_offsetGetSegment(base, &new_offset);
+ if(base->storage + new_offset >= (segment->storage + segment->free_offset)) /* Haven't touched this memory before */
+ {
+ segment->free_offset = (NW_TinyTree_Offset_t)(base->storage + new_offset - segment->storage);
+ }
+ return new_offset;
+}
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/utils/include/cxml_internal.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2003 - 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: cxml_internal.h
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+#ifndef CXML_INTERNAL_H
+#define CXML_INTERNAL_H
+
+#include <xml/cxml/nwx_status.h>
+
+#include <xml/cxml/cxml_type_def.h>
+#include "cxml_mem.h"
+#include <xml/cxml/cxml_str.h>
+#include "cxml_vector.h"
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+} // extern "C" {
+#endif /* __cplusplus */
+
+
+#endif /* CXML_INTERNAL_H */
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/utils/include/cxml_mem.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2003 - 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/*
+** Includes
+*/
+#include <xml/cxml/cxml_type_def.h>
+
+/***************************************************************************
+** File: cxml_mem.h
+** Purpose: Provides the interface to memory management
+**************************************************************************/
+
+#ifndef CXML_MEM_H
+#define CXML_MEM_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /*
+#ifdef _DEBUG
+#define FEATURE_MEMORY_PROFILE
+#endif
+*/
+
+#define NW_Mem_memset(x, y, z) CXML_Mem_memset(x, y, z)
+#define NW_Mem_memcpy(x, y, z) CXML_Mem_memcpy(x, y, z)
+#define NW_Mem_memmove(x, y, z) CXML_Mem_memmove(x, y, z)
+#define NW_Mem_memcmp(x, y, z) CXML_Mem_memcmp(x, y, z)
+
+#ifdef FEATURE_MEMORY_PROFILE
+#define NW_Mem_Malloc(x) CXML_Mem_Malloc_Pro(x,__FILE__,__LINE__)
+#define NW_Mem_Free(x) CXML_Mem_Free_Pro(x,__FILE__,__LINE__)
+
+void *CXML_Mem_Malloc_Pro(CXML_Uint32 nbytes, char *file, CXML_Uint32 line);
+void CXML_Mem_Free_Pro(void *buffer, char *file, CXML_Uint32 line);
+
+#define NW_CTX_MEM_PRO_LAST_PTR 26
+#define NW_CTX_MEM_PRO_SEQ_NO 27
+
+#else
+#define NW_Mem_Malloc(x) CXML_Mem_Malloc(x)
+#define NW_Mem_Free(x) CXML_Mem_Free(x)
+
+void *CXML_Mem_Malloc(CXML_Uint32 nbytes);
+void CXML_Mem_Free(void *buffer);
+#endif
+
+/*
+**-------------------------------------------------------------------------
+** External Public Functions
+**-------------------------------------------------------------------------
+*/
+
+void *CXML_Mem_memset(void *s, CXML_Uint32 c, CXML_Uint32 n);
+
+void *CXML_Mem_memcpy(void *s1, const void *s2, CXML_Uint32 n);
+
+void *CXML_Mem_memmove(void *s1, const void *s2, CXML_Uint32 n);
+
+CXML_Int32 CXML_Mem_memcmp(const void *s1, const void *s2, CXML_Uint32 n);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* CXML_MEM_H */
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/utils/include/cxml_vector.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2003 - 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+ /***************************************************************************
+** File: cxml_vector.h
+** Purpose: Provides the interface to vector utils
+**************************************************************************/
+
+#ifndef CXML_VECTOR_H
+#define CXML_VECTOR_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Includes
+*/
+#include "cxml_internal.h"
+
+struct CXML_Vector_s {
+ CXML_Vector_Metric_t elementSize;
+ CXML_Vector_Metric_t capacity;
+ CXML_Vector_Metric_t size;
+ CXML_Vector_Metric_t segmentSize;
+ CXML_Uint8** segmentList;
+ CXML_Vector_Metric_t segmentListSize;
+ CXML_Vector_Metric_t numSegments;
+};
+
+CXML_Vector_t*
+CXML_Vector_Construct(CXML_Vector_Metric_t elementSize,
+ CXML_Vector_Metric_t segmentSize);
+
+void CXML_Vector_Destruct(CXML_Vector_t* vector);
+
+CXML_Uint8*
+CXML_Vector_AddressAt(const CXML_Vector_t* thisObj,
+ CXML_Vector_Metric_t index);
+
+void**
+CXML_Vector_InsertAt(CXML_Vector_t* thisObj,
+ void* element,
+ CXML_Vector_Metric_t where,
+ void* sentinel);
+
+NW_Status_t
+CXML_Vector_RemoveAt(CXML_Vector_t* thisObj,
+ CXML_Vector_Metric_t index);
+
+void**
+CXML_Vector_ElementAt(const CXML_Vector_t* vector,
+ CXML_Vector_Metric_t index);
+
+CXML_Vector_Metric_t
+CXML_Vector_GetElementIndex(const CXML_Vector_t* vector,
+ void* target);
+
+void
+CXML_Vector_AdjustSegment(CXML_Vector_t* vector);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* CXML_VECTOR_H */
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/utils/src/E32XMLParserDllEntryPoint.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,20 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <e32std.h>
+#include <xml/cxml/nw_wbxml_dictionary.h>
+//#include "FeatMgr.h"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/utils/src/cxml_assert.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/*****************************************************************
+** File name: nwx_assert.c
+** Description: Provides re[placement for assert
+******************************************************************/
+
+/*
+**-------------------------------------------------------------------------
+** Include Files
+**-------------------------------------------------------------------------
+*/
+
+#include <xml/cxml/cxml_type_def.h>
+int kimono_assert ()
+{
+ #ifdef __WINS__
+ _asm int 0x3
+ #endif
+ return 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/utils/src/cxml_file_if.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,169 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+#include <f32file.h>
+#include <xml/cxml/cxml_file_if.h>
+#include <xml/cxml/nw_string_char.h>
+
+
+//
+//CXML_Read_From_File()
+//
+
+EXPORT_C
+NW_Status_t CXML_Read_From_File(
+ NW_Byte* input_file,NW_Uint8** buffer, NW_Int32* bufferLen)
+{
+ RFile file;
+ RFs aSession;
+ TInt fileErr;
+ CXML_Uint32 fileNameByteCnt;
+ TInt fileNameLen;
+ NW_Status_t retVal = NW_STAT_SUCCESS;
+ TUint16* fileName;
+ TInt i;
+ TInt err = KErrNone;
+ HBufC8* inBuf;
+ CXML_Uint8* bufPtr;
+ TPtr8 inBufDes(NULL,0);
+
+
+ if( (input_file == NULL) || (buffer == NULL) || (bufferLen == NULL) )
+ {
+ retVal = NW_STAT_FAILURE;
+ return retVal;
+ }
+
+ *bufferLen = -1; //Default value
+
+ err = aSession.Connect();
+ if(KErrNone != err)
+ {
+ retVal = NW_STAT_FAILURE;
+ return retVal;
+ }
+ fileNameLen = NW_String_charBuffGetLength(input_file,HTTP_us_ascii,&fileNameByteCnt);
+
+
+ //This is required for TPtrC
+
+ fileName = new TUint16[fileNameLen];
+
+ if(fileName == NULL)
+ {
+ retVal = NW_STAT_OUT_OF_MEMORY;
+ return retVal;
+ }
+
+
+ for(i=0; i < fileNameLen; i++)
+ {
+ fileName[i] = input_file[i];
+ }
+
+ TPtrC inFileN(fileName,fileNameLen);
+
+ fileErr = file.Open(aSession,inFileN,EFileRead);
+
+ if ( fileErr != KErrNone )
+ {
+ retVal = NW_STAT_FILE_NOT_OPEN;
+ delete[] fileName;
+ return retVal;
+ }
+
+
+ TInt fileSize;
+
+ //Get File Size
+
+ fileErr = file.Size( fileSize );
+
+ if(fileErr != KErrNone )
+ {
+ retVal = NW_STAT_UNEXPECTED_ERROR;
+ delete[] fileName;
+ file.Close();
+ return retVal;
+ }
+
+ *bufferLen = fileSize;
+
+ // Allocate buffer to read the cXML FILE contents
+
+ inBuf = HBufC8::New(fileSize);
+
+ //Get the pointer to heap object
+
+ inBufDes.Set(inBuf->Des()) ;
+
+ if(inBuf)
+ {
+
+ //Now read the file
+
+ fileErr = file.Read(inBufDes);
+
+
+ if(fileErr != KErrNone )
+ {
+ delete inBuf; //TODO: Change to more meaningful error
+ delete[] fileName;
+ file.Close();
+ *bufferLen = -1;
+ retVal = NW_STAT_FILE_READ_ERROR;
+ return retVal;
+ }
+ }
+ else
+ {
+ delete[] fileName;
+ file.Close();
+ *bufferLen = -1;
+ retVal = NW_STAT_FAILURE;
+ return retVal;
+ }
+
+
+ //Allocate the buffer and copy the contents to this
+
+ *buffer = new CXML_Byte[fileSize];
+
+
+ if(*buffer == NULL)
+ {
+ retVal = NW_STAT_OUT_OF_MEMORY;
+ return retVal;
+ }
+
+
+ bufPtr = (CXML_Byte*) inBuf->Ptr(); //Get pointer to the data
+
+ for(i=0; i < fileSize; i++)
+ {
+ (*buffer)[i] = bufPtr[i];
+ }
+
+ delete inBuf;
+ delete[] fileName;
+ file.Close();
+ aSession.Close();
+ return retVal;
+
+}//end CXMLTestParser::CXML_Read_From_File()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/utils/src/cxml_mem.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,296 @@
+/*
+* Copyright (c) 2003 - 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/***************************************************************************
+** File: cxml_mem.c
+** Purpose: Provides the implementation to memory management
+**************************************************************************/
+
+#include "cxml_internal.h"
+
+#ifdef FEATURE_MEMORY_PROFILE
+typedef struct _MemProfile
+{
+ struct _MemProfile *next; // ptr to next mem block
+ struct _MemProfile *prev; // ptr to previous mem block
+ char *file; // filename of memory allocator
+ CXML_Int32 line; // line # in filename of memory allocator
+ CXML_Int32 size; // size of requested memory
+ CXML_Int32 seq; // sequence number for allocation
+} MemProfile;
+#endif
+
+/*
+**-------------------------------------------------------------------------
+** External Public (Exported) Functions
+**-------------------------------------------------------------------------
+*/
+
+void *CXML_Mem_memset(void *s, CXML_Uint32 c, CXML_Uint32 n)
+{
+ unsigned char *myPtr = (unsigned char *)s;
+ unsigned char fill = (unsigned char)c;
+ while (n > 0) {
+ *myPtr = fill;
+ myPtr++;
+ n--;
+ }
+ return s;
+}
+
+
+void *CXML_Mem_memcpy(void *s1, const void *s2, CXML_Uint32 n)
+{
+ unsigned char *myDest = (unsigned char *)s1;
+ unsigned char *mySource = (unsigned char *)s2;
+
+ if (n==0) return NULL;
+
+ while (n > 0) {
+ *myDest = *mySource;
+ n--;
+ myDest++;
+ mySource++;
+ }
+ return s1;
+}
+
+
+void *CXML_Mem_memmove(void *s1, const void *s2, CXML_Uint32 n)
+{
+ unsigned char *myDest;
+ unsigned char *mySource;
+
+ if (n == 0) return NULL;
+
+ if (s1 <= s2) {
+ /* We can always copy from higher address to */
+ /* lower address, even if buffer overlaps */
+ myDest = (unsigned char *)s1;
+ mySource = (unsigned char *)s2;
+ while (n > 0) {
+ *myDest = *mySource;
+ myDest++;
+ mySource++;
+ n--;
+ }
+
+ } else {
+ /* We can always copy in reverse order from */
+ /* lower address to higher address, even if */
+ /* buffer overlaps */
+ myDest = (unsigned char *)s1 + n;
+ mySource = (unsigned char *)s2 + n;
+ while (n > 0) {
+ n--;
+ myDest--;
+ mySource--;
+ *myDest = *mySource;
+ }
+
+ }
+
+ return s1;
+}
+
+
+CXML_Int32 CXML_Mem_memcmp(const void *s1, const void *s2, CXML_Uint32 n)
+{
+ unsigned char *myDest = (unsigned char *)s1;
+ unsigned char *mySource = (unsigned char *)s2;
+
+ /* If s1 == s2, then immediately return 0. */
+ if ( s1 == s2 )
+ return 0 ;
+
+ while (n > 0) {
+ if (*myDest != *mySource) {
+ return (*myDest - *mySource);
+ }
+ myDest++;
+ mySource++;
+ n--;
+ }
+
+ return 0;
+}
+
+/*********************************************************
+** Name: CXML_Mem_Malloc
+** Description: Allocates memory.
+** Parameters: nbytes - number of bytes to allocate
+** Return Value: pointer to the allocated memory or NULL
+**********************************************************/
+void *CXML_Mem_Malloc(CXML_Uint32 nbytes)
+{
+ return malloc(nbytes);
+}
+
+/************************************************************************
+** Name: CXML_Mem_Free
+** Description: Frees allocated memory.
+** Parameters: mem - pointer to the memory to free
+** Return Value: void
+**************************************************************************/
+void CXML_Mem_Free(void *buffer)
+{
+ if (buffer != NULL) {
+ /* Note: os_block_dealloc() will free both heap and block-table memory */
+ free(buffer);
+ }
+ return;
+}
+
+
+#ifdef FEATURE_MEMORY_PROFILE
+CXML_Uint32 Asc_strlen(const char *s)
+{
+ CXML_Uint32 i = 0;
+ while (*s != '\0')
+ {
+ s++;
+ i++;
+ }
+ return i;
+}
+
+/*****************************************************************
+** Name: Asc_strcpy
+** Description: Copies ascii string
+** Parameters: s1 destination string
+** s2 source string
+** Return Value: pointer to s1
+******************************************************************/
+char *Asc_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *s1 = *s2;
+ s1++;
+ s2++;
+ }
+ *s1 = *s2;
+ return s1;
+}
+
+/*********************************************************
+** Name: CXML_Mem_Malloc
+** Description: Allocates memory.
+** Parameters: nbytes - number of bytes to allocate
+** Return Value: pointer to the allocated memory or NULL
+**********************************************************/
+void *CXML_Mem_Malloc_Pro(CXML_Uint32 nbytes, char *file, CXML_Uint32 line)
+{
+ void *buf;
+ MemProfile *pblock, *last;
+ CXML_Int32 len = nbytes + sizeof(MemProfile);
+ CXML_Int32 seqno;
+
+ pblock = malloc(len);
+
+ // Store profile block data
+
+ if ((CXML_Uint32) file > 0xf000)
+ {
+ pblock->file = (char*)malloc(Asc_strlen(file) + 1);
+ Asc_strcpy(pblock->file, file);
+ }
+ else
+ {
+ // no filename since this may be called via a function ptr
+ pblock->file = NULL;
+ }
+ pblock->line = line;
+ pblock->size = nbytes;
+
+ // Set List Pointers
+ // Get last ptr
+ last = (MemProfile *) NW_Ctx_Get(NW_CTX_MEM_PRO_LAST_PTR, 0);
+
+ if (last == NULL)
+ {
+ pblock->prev = NULL;
+ pblock->seq = 0;
+ }
+ else
+ {
+ pblock->prev = last;
+ last->next = pblock;
+ // can't use last-> because free my remove block (along with
+ // seq numbers, need a context
+ seqno = (CXML_Uint32) NW_Ctx_Get(NW_CTX_MEM_PRO_SEQ_NO, 0);
+ seqno += 1;
+ pblock->seq = seqno;
+ NW_Ctx_Set(NW_CTX_MEM_PRO_SEQ_NO, 0, seqno);
+ }
+ pblock->next = NULL;
+
+ // last = pblock
+ last = pblock;
+ NW_Ctx_Set(NW_CTX_MEM_PRO_LAST_PTR, 0, last);
+
+
+ // return mem block to caller
+ buf = (void *) ((CXML_Byte *) pblock + sizeof(MemProfile));
+ return (buf);
+}
+
+/************************************************************************
+** Name: CXML_Mem_Free
+** Description: Frees allocated memory.
+** Parameters: mem - pointer to the memory to free
+** Return Value: void
+**************************************************************************/
+void CXML_Mem_Free_Pro(void *buffer, char *file, CXML_Uint32 line)
+{
+ MemProfile *pblock, *last, *prevp, *nextp;
+
+ if (buffer == NULL)
+ {
+ return;
+ }
+
+ pblock = (MemProfile *) ((CXML_Byte *) buffer - sizeof(MemProfile));
+
+ // Get last ptr
+ last = (MemProfile *) NW_Ctx_Get(NW_CTX_MEM_PRO_LAST_PTR, 0);
+
+ if ( pblock == last )
+ {
+ last = last->prev;
+ NW_Ctx_Set(NW_CTX_MEM_PRO_LAST_PTR, 0, last);
+ }
+ else
+ {
+ prevp = pblock->prev;
+ nextp = pblock->next;
+ if (prevp)
+ {
+ prevp->next = nextp;
+ }
+ if (nextp)
+ {
+ nextp->prev = prevp;
+ }
+ }
+
+ // Free Filename pointer and memory block
+ free(pblock->file);
+ free(pblock);
+ return;
+}
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/utils/src/cxml_mem_epoc32.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,415 @@
+/*
+* Copyright (c) 1999 - 2000 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/***************************************************************************
+** File: nwx_mem.c
+** Purpose: Provides the implementation to memory management
+**************************************************************************/
+
+/*
+**-------------------------------------------------------------------------
+** Include Files
+**-------------------------------------------------------------------------
+*/
+#include "cxml_mem.h"
+
+//#ifdef FEATURE_MEMORY_PROFILE
+//#include "nwx_ctx.h"
+//#include "nwx_logger.h"
+//#endif // FEATURE_MEMORY_PROFILE
+
+/*
+**-------------------------------------------------------------------------
+** Constants
+**-------------------------------------------------------------------------
+*/
+
+/*
+**-------------------------------------------------------------------------
+** Internal Types
+**-------------------------------------------------------------------------
+*/
+#ifdef FEATURE_MEMORY_PROFILE
+typedef struct _MemProfile
+{
+ struct _MemProfile *next; // ptr to next mem block
+ struct _MemProfile *prev; // ptr to previous mem block
+ char *file; // filename of memory allocator
+ NW_Int32 line; // line # in filename of memory allocator
+ NW_Int32 size; // size of requested memory
+ NW_Int32 seq; // sequence number for allocation
+} MemProfile;
+#endif // FEATURE_MEMORY_PROFILE
+
+/*
+**-------------------------------------------------------------------------
+** Macros
+**-------------------------------------------------------------------------
+*/
+
+/*
+**-------------------------------------------------------------------------
+** Internal Prototypes
+**-------------------------------------------------------------------------
+*/
+
+/*
+**-------------------------------------------------------------------------
+** File Scoped Static Variables
+**-------------------------------------------------------------------------
+*/
+
+/*
+**-------------------------------------------------------------------------
+** Global Variable Definitions
+**-------------------------------------------------------------------------
+*/
+
+
+/*
+**-------------------------------------------------------------------------
+** Internal Functions
+**-------------------------------------------------------------------------
+*/
+
+
+/*
+**-------------------------------------------------------------------------
+** External Public (Exported) Functions
+**-------------------------------------------------------------------------
+*/
+
+void *NW_Mem_memset(void *s, NW_Uint32 c, NW_Uint32 n)
+{
+ unsigned char *myPtr = (unsigned char *)s;
+ unsigned char fill = (unsigned char)c;
+ while (n > 0) {
+ *myPtr = fill;
+ myPtr++;
+ n--;
+ }
+ return s;
+}
+
+EXPORT_C void *NW_Mem_memcpy(void *s1, const void *s2, NW_Uint32 n)
+{
+ unsigned char *myDest = (unsigned char *)s1;
+ unsigned char *mySource = (unsigned char *)s2;
+ if (n==0) return NULL;
+ while (n > 0) {
+ *myDest = *mySource;
+ n--;
+ myDest++;
+ mySource++;
+ }
+ return s1;
+}
+
+void *NW_Mem_memmove(void *s1, const void *s2, NW_Uint32 n)
+{
+ unsigned char *tempBuff;
+ if (n == 0) return NULL;
+ tempBuff = NW_Mem_Malloc(n);
+ if (tempBuff == NULL) {
+ return NULL;
+ }
+ NW_Mem_memcpy(tempBuff, s2, n);
+ NW_Mem_memcpy(s1, tempBuff, n);
+ NW_Mem_Free(tempBuff);
+ return s1;
+}
+
+NW_Int32 NW_Mem_memcmp(const void *s1, const void *s2, NW_Uint32 n)
+{
+ unsigned char *myDest = (unsigned char *)s1;
+ unsigned char *mySource = (unsigned char *)s2;
+
+ /* If s1 == s2, then immediately return 0. */
+ if ( s1 == s2 )
+ return 0 ;
+
+ while (n > 0) {
+ if (*myDest != *mySource) {
+ return (*myDest - *mySource);
+ }
+ myDest++;
+ mySource++;
+ n--;
+ }
+
+ return 0;
+}
+
+
+/*********************************************************
+** Name: NW_Mem_Malloc
+** Description: Allocates memory.
+** Parameters: nbytes - number of bytes to allocate
+** Return Value: pointer to the allocated memory or NULL
+**********************************************************/
+
+EXPORT_C void *NW_Mem_Malloc_No_Pro(NW_Uint32 nbytes)
+{
+ void *buf;
+ buf = malloc(nbytes);
+ return buf;
+}
+
+/************************************************************************
+** Name: NW_Mem_Free
+** Description: Frees allocated memory.
+** Parameters: mem - pointer to the memory to free
+** Return Value: void
+**************************************************************************/
+EXPORT_C void NW_Mem_Free_No_Pro(void *mem)
+{
+ /* Note: free() handles NULL pointers corretly */
+ free(mem);
+ return;
+}
+
+
+// --------------------------------------------------------
+// PROFILED MEMORY MANAGEMENT ROUTINES
+// --------------------------------------------------------
+
+#ifdef FEATURE_MEMORY_PROFILE
+
+/*****************************************************************
+** Name: Asc_strlen
+** Description: Returns string length of ascii string
+** Parameters: *string - Null-terminated ascii string
+** Return Value: string length
+******************************************************************/
+NW_Uint32 Asc_strlen(const char *s)
+{
+ NW_Uint32 i = 0;
+ while (*s != '\0')
+ {
+ s++;
+ i++;
+ }
+ return i;
+}
+
+/*****************************************************************
+** Name: Asc_strcpy
+** Description: Copies ascii string
+** Parameters: s1 destination string
+** s2 source string
+** Return Value: pointer to s1
+******************************************************************/
+char *Asc_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *s1 = *s2;
+ s1++;
+ s2++;
+ }
+ *s1 = *s2;
+ return s1;
+}
+
+/*****************************************************************
+** Name: Str_CvtFromAscii
+** Description: Convert null-terminated ascii string to new ucs2 string
+** Parameters: *string - Null-terminated ascii string
+** Return Value: pointer to new ucs2 string or NULL
+******************************************************************/
+NW_Ucs2 *Str_CvtFromAscii(const char *string)
+{
+ NW_Uint32 i, size;
+ NW_Ucs2* res = NULL;
+
+ NW_ASSERT(string);
+
+ size = Asc_strlen(string) + 1;
+ res = malloc(size * sizeof(NW_Ucs2));
+ /* this is a really naive conversion from ascii */
+ if (res != NULL) {
+ for (i=0; i < size; i++) {
+ res[i] = string[i];
+ }
+ }
+ return res;
+}
+
+
+/*********************************************************
+** Name: NW_Mem_Malloc_Pro
+** Description: Allocates "profiled" memory.
+** Parameters: nbytes - number of bytes to allocate
+** file - string of filename where this was called
+** line - line # of file where this was called
+** Return Value: pointer to the allocated memory or NULL
+**********************************************************/
+void *NW_Mem_Malloc_Pro(NW_Uint32 nbytes, char *file, NW_Uint32 line)
+{
+ void *buf;
+ MemProfile *pblock, *last;
+ NW_Int32 len = nbytes + sizeof(MemProfile);
+ NW_Int32 seqno;
+ NW_Status_t status;
+
+ pblock = malloc(len);
+
+ // Store profile block data
+
+ if ((NW_Uint32) file > 0xf000)
+ {
+ pblock->file = (char*)malloc(Asc_strlen(file) + 1);
+ Asc_strcpy(pblock->file, file);
+ }
+ else
+ {
+ // no filename since this may be called via a function ptr
+ pblock->file = NULL;
+ }
+ pblock->line = line;
+ pblock->size = nbytes;
+
+ // Set List Pointers
+ // Get last ptr
+ last = (MemProfile *) NW_Ctx_Get(NW_CTX_MEM_PRO_LAST_PTR, 0);
+
+ if (last == NULL)
+ {
+ pblock->prev = NULL;
+ pblock->seq = 0;
+ }
+ else
+ {
+ pblock->prev = last;
+ last->next = pblock;
+ // can't use last-> because free my remove block (along with
+ // seq numbers, need a context
+ seqno = (NW_Uint32) NW_Ctx_Get(NW_CTX_MEM_PRO_SEQ_NO, 0);
+ seqno += 1;
+ pblock->seq = seqno;
+ status = NW_Ctx_Set(NW_CTX_MEM_PRO_SEQ_NO, 0, seqno);
+ NW_ASSERT(status == NW_STAT_SUCCESS);
+ }
+ pblock->next = NULL;
+
+ // last = pblock
+ last = pblock;
+ status = NW_Ctx_Set(NW_CTX_MEM_PRO_LAST_PTR, 0, last);
+ NW_ASSERT(status == NW_STAT_SUCCESS);
+
+
+ // return mem block to caller
+ buf = (void *) ((NW_Byte *) pblock + sizeof(MemProfile));
+ return (buf);
+}
+
+/************************************************************************
+** Name: NW_Mem_Free_Pro
+** Description: Frees allocated "profiled" memory.
+** Parameters: mem - pointer to the memory to free
+** file - string of filename where this was called
+** line - line # of file where this was called
+** Return Value: void
+**************************************************************************/
+void NW_Mem_Free_Pro(void *buffer, char *file, NW_Uint32 line)
+{
+ MemProfile *pblock, *last, *prevp, *nextp;
+ NW_Status_t status;
+
+ if (buffer == NULL)
+ {
+ return;
+ }
+
+ pblock = (MemProfile *) ((NW_Byte *) buffer - sizeof(MemProfile));
+
+ // Get last ptr
+ last = (MemProfile *) NW_Ctx_Get(NW_CTX_MEM_PRO_LAST_PTR, 0);
+
+ if ( pblock == last )
+ {
+ last = last->prev;
+ status = NW_Ctx_Set(NW_CTX_MEM_PRO_LAST_PTR, 0, last);
+ NW_ASSERT(status == NW_STAT_SUCCESS);
+ }
+ else
+ {
+ prevp = pblock->prev;
+ nextp = pblock->next;
+ if (prevp)
+ {
+ prevp->next = nextp;
+ }
+ if (nextp)
+ {
+ nextp->prev = prevp;
+ }
+ }
+
+ // Free Filename pointer and memory block
+ free(pblock->file);
+ free(pblock);
+ return;
+}
+
+
+/************************************************************************
+** Name: SendStringToLogger1
+** Description: Output Memory Profile Data to Debug Log
+** Parameters: none
+** Return Value: void
+**************************************************************************/
+void SendStringToLogger1(char *strMsg)
+{
+ MemProfile *pblock, *last;
+ NW_Ucs2 *uStrFileName = NULL;
+
+ if (strMsg != NULL)
+ {
+ NW_Ucs2 *uStrMsg = Str_CvtFromAscii(strMsg);
+ NW_LOG1(NW_LOG_LEVEL1, "NW_Mem_Pro_Log: %s", uStrMsg);
+ free(uStrMsg);
+ return;
+ }
+
+ // Get last ptr
+ last = (MemProfile *) NW_Ctx_Get(NW_CTX_MEM_PRO_LAST_PTR, 0);
+
+ pblock = last;
+ while ( pblock )
+ {
+ if (pblock->file == NULL)
+ {
+ uStrFileName = Str_CvtFromAscii("??");
+ }
+ else
+ {
+ uStrFileName = Str_CvtFromAscii(pblock->file);
+ }
+ NW_LOG6(NW_LOG_LEVEL1, "NW_Mem_Pro_Log: memBlock:%X, data:%X, File: %s ; Line: %d ; Size: %d ; SEQ: %d",
+ pblock,
+ pblock + sizeof(MemProfile),
+ uStrFileName,
+ pblock->line,
+ pblock->size,
+ pblock->seq);
+ NW_LOG0(NW_LOG_LEVEL1, "NW_Mem_Pro_Log: ------------------------------");
+ pblock = pblock->prev;
+ free(uStrFileName);
+ }
+}
+#endif // FEATURE_MEMORY_PROFILE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/utils/src/cxml_str.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,374 @@
+/*
+* Copyright (c) 2003 - 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/***************************************************************************
+** File: cxml_str.c
+** Purpose: Provides the implementation to CXML string API
+**************************************************************************/
+
+/*
+**-------------------------------------------------------------------------
+** Include Files
+**-------------------------------------------------------------------------
+*/
+
+#include "cxml_internal.h"
+#include <xml/cxml/cxml_nw2cxmlTypes.h>
+
+
+static NW_Uint16 CXML_Str_Strlen(const CXML_Ucs2 *string)
+{
+ NW_Uint16 len = 0;
+ NW_ASSERT(string != NULL);
+
+ while (*string != NULL)
+ {
+ string++;
+ len++;
+ }
+ return len;
+}
+
+static NW_Uint32 NW_Asc_strlen(const char *s)
+{
+ NW_Uint32 i = 0;
+ while (*s != '\0')
+ {
+ s++;
+ i++;
+ }
+ return i;
+}
+
+/*****************************************************************
+** Name: CXML_Str_ToLower
+** Description: Converts a CXML_Ucs2 to lower case
+** Parameters: ch - the character to convert
+** Return Value: the converted character
+******************************************************************/
+CXML_Ucs2 CXML_Str_ToLower(const CXML_Ucs2 ch)
+{
+ if((ch >= CXML_ASCII_UPPER_A) && (ch <= CXML_ASCII_UPPER_Z)) {
+ return (CXML_Ucs2)(ch - CXML_ASCII_UPPER_A + CXML_ASCII_LOWER_A);
+ } else {
+ return ch;
+ }
+}
+
+/*****************************************************************
+** Name: CXML_Str_ToUpper
+** Description: Converts a NW_Ucs2 to upper case
+** Parameters: ch - the character to convert
+** Return Value: the converted character
+******************************************************************/
+CXML_Ucs2 CXML_Str_ToUpper(const NW_Ucs2 ch)
+{
+ if((ch >= CXML_ASCII_LOWER_A) && (ch <= CXML_ASCII_LOWER_Z)) {
+ return (NW_Ucs2)(ch - CXML_ASCII_LOWER_A + CXML_ASCII_UPPER_A);
+ } else {
+ return ch;
+ }
+}
+
+/*****************************************************************
+** Name: CXML_Str_Isspace
+** Description: Checks if the character is a particular
+** representation of a space character
+** Parameters: ch - character to test
+** Return Value: non-zero if c is a white-space character, else 0
+******************************************************************/
+CXML_Int32 CXML_Str_Isspace(const CXML_Ucs2 ch)
+{
+ return ((ch == CXML_ASCII_SPACE) || (ch == CXML_ASCII_CR) ||
+ (ch == CXML_ASCII_LF) || (ch == CXML_ASCII_FF) ||
+ (ch == CXML_ASCII_HT) || (ch == CXML_ASCII_VT));
+}
+
+
+/*****************************************************************
+** Name: CXML_Str_Isdigit
+** Description: Checks if the character is a particular
+** representation of a decimal-digit character.
+** Parameters: ch - character to test
+** Return Value: non-zero if c is a decimal-digit character, else 0
+******************************************************************/
+CXML_Int32 CXML_Str_Isdigit(const CXML_Ucs2 ch)
+{
+ return ( (ch >= CXML_ASCII_0) && (ch <= CXML_ASCII_9) );
+}
+
+
+/*****************************************************************
+** Name: CXML_Str_Isxdigit
+** Description: Checks if the character is a particular
+** representation of a hexadecimal-digit character.
+** Parameters: ch - character to test
+** Return Value: non-zero if c is a hexadecimal-digit character, else 0
+******************************************************************/
+CXML_Int32 CXML_Str_Isxdigit(const CXML_Ucs2 ch)
+{
+ return (CXML_Str_Isdigit(ch) ||
+ ( (ch >= CXML_ASCII_UPPER_A) && (ch <= CXML_ASCII_UPPER_F) ) ||
+ ( (ch >= CXML_ASCII_LOWER_A) && (ch <= CXML_ASCII_LOWER_F) ) );
+}
+
+/*****************************************************************
+** Name: CXML_Str_CvtToAscii
+** Description: Convert ucs2 string to new null-terminated ascii string
+** Parameters: *string - Null-terminated ucs2 string
+** Return Value: pointer to the new ascii string or NULL
+******************************************************************/
+CXML_Int8 *CXML_Str_CvtToAscii(const CXML_Ucs2 *string)
+{
+ NW_Int32 i, size;
+ CXML_Int8* res = NULL;
+
+ NW_ASSERT(string);
+
+ size = CXML_Str_Strlen(string) + 1;
+ res = (CXML_Int8*) NW_Mem_Malloc((NW_Uint32)size * sizeof(CXML_Int8));
+ /* this is a really naive conversion to ascii */
+ if (res != NULL) {
+ for (i=0; i < size; i++) {
+ res[i] = (CXML_Int8)(string[i] & 0xFF);
+ }
+ }
+ return res;
+}
+
+
+CXML_Uint32 CXML_Asc_strlen(const CXML_Int8 *s)
+{
+ NW_Uint32 i = 0;
+ while (*s != '\0')
+ {
+ s++;
+ i++;
+ }
+ return i;
+}
+
+
+/*****************************************************************
+** Name: NW_Str_CvtFromAscii
+** Description: Convert null-terminated ascii string to new ucs2 string
+** Parameters: *string - Null-terminated ascii string
+** Return Value: pointer to new ucs2 string or NULL
+******************************************************************/
+CXML_Ucs2 *CXML_Str_CvtFromAscii(const CXML_Int8 *string)
+{
+ NW_Uint32 i, size;
+ NW_Ucs2* res = NULL;
+
+ NW_ASSERT(string);
+
+ size = NW_Asc_strlen((const char*) string) + 1;
+ res = (NW_Ucs2*) NW_Mem_Malloc(size * sizeof(NW_Ucs2));
+ /* this is a really naive conversion from ascii */
+ if (res != NULL) {
+ for (i=0; i < size; i++) {
+ res[i] = string[i];
+ }
+ }
+ return res;
+}
+
+
+/*****************************************************************
+** Name: CXML_Str_Strsize
+** Description: Get the size of the string
+** Parameters: *string - Null-terminated string
+** Return Value: number of bytes in string including terminator
+******************************************************************/
+CXML_Uint16 CXML_Str_Strsize(const CXML_Ucs2 *string)
+{
+ NW_Uint16 len;
+
+ NW_ASSERT(string != NULL);
+
+ len = CXML_Str_Strlen(string);
+ return NW_UINT16_CAST((len + 1) * sizeof(NW_Ucs2));
+}
+
+/*****************************************************************
+** Name: CXML_Str_StrcmpConst
+** Description: Compare a string to an Ascii string constant
+** Parameters: *string1 - Null-terminated string to compare
+** *string2 - Null-terminated string to compare
+** Return Value: <0 if string1 < string2, 0 if equal, >0 if string1 > string2
+******************************************************************/
+
+CXML_Int32 CXML_Str_StrcmpConst(const CXML_Ucs2 *string1,const CXML_Ucs2 *string2)
+{
+ NW_Int32 i = 0;
+ NW_Int32 ch1;
+ NW_Int32 ch2;
+
+ NW_ASSERT(string1 != NULL);
+ NW_ASSERT(string2 != NULL);
+
+ do {
+ ch1 = string1[i];
+ ch2 = string2[i];
+ i++;
+ } while (((ch1 - ch2) == 0) && (ch1 != CXML_ASCII_NULL));
+
+ return (ch1 - ch2);
+}
+
+/*****************************************************************
+** Name: CXML_Str_Stricmp
+** Description: Compare two strings, case-insensitve
+** Parameters: *string1 - Null-terminated string to compare
+** *string2 - Null-terminated string to compare
+** Return Value: <0 if string1 < string2, 0 if equal, >0 if string1 > string2
+******************************************************************/
+CXML_Int32 CXML_Str_Stricmp(const CXML_Ucs2 *string1,
+ const CXML_Ucs2 *string2)
+{
+ NW_ASSERT(string1 != NULL);
+ NW_ASSERT(string2 != NULL);
+
+
+ while ((CXML_Str_ToUpper(*string1) == CXML_Str_ToUpper(*string2)) &&
+ (*string1 != CXML_ASCII_NULL) && (*string2 != CXML_ASCII_NULL))
+ {
+ string1++;
+ string2++;
+ }
+ return (CXML_Str_ToUpper(*string1) - CXML_Str_ToUpper(*string2));
+}
+
+/*****************************************************************
+** Name: CXML_Asc_strcpy
+** Description: Copy null terminated string
+** Parameters: *s2 - Null-terminated string to copy
+** *s1 - Resultant String
+** Return Value: Copied string
+******************************************************************/
+
+CXML_Int8 *CXML_Asc_strcpy(CXML_Int8 *s1, const CXML_Int8 *s2)
+{
+ while (*s2 != '\0') {
+ *s1 = *s2;
+ s1++;
+ s2++;
+ }
+ *s1 = *s2;
+ return s1;
+}
+
+/*****************************************************************
+** Name: CXML_Asc_strcat
+** Description: Concatenate null terminated string
+** Parameters: *s2 - Null-terminated string to copy
+** *s1 - Resultant String Null terminated
+** Return Value: Resultant string
+******************************************************************/
+
+CXML_Int8 *CXML_Asc_strcat(CXML_Int8 *s1, const CXML_Int8 *s2)
+{
+ CXML_Int8 *myDest = s1;
+ while (*myDest != '\0') {
+ myDest++;
+ }
+ CXML_Asc_strcpy(myDest, s2);
+ return s1;
+}
+
+/*****************************************************************
+** Name: CXML_Asc_Strncpy
+** Description: Copy characters of one string to another
+** Parameters: *destination - Destination string
+** *source - Source string
+** count - Maximum number of characters to be copied
+** Return Value: pointer to destination string
+******************************************************************/
+CXML_Int8 *CXML_Asc_strncpy(CXML_Int8 *destination,
+ const CXML_Int8 *source,
+ const CXML_Uint32 count )
+{
+ CXML_Uint32 nCopied = 0;
+
+ NW_ASSERT(destination != NULL);
+ NW_ASSERT(source != NULL);
+
+ while ( (nCopied < count) && (*source != CXML_ASCII_NULL ) ) {
+ *destination = *source;
+ destination++;
+ source++;
+ nCopied++;
+ }
+
+ /*
+ ** ANSI 7.11.2.4 says nulls are appended till count characters in all have
+ ** been copied
+ */
+ while (nCopied < count) {
+ *destination = CXML_ASCII_NULL;
+ destination++;
+ nCopied++;
+ }
+ return destination;
+}
+
+/*****************************************************************
+** Name: CXML_Asc_strncat
+** Description: Concatenate characters of one string to another
+** Parameters: *destination - Destination string
+** *source - Source string
+** count - Maximum number of characters to be copied
+** Return Value: pointer to destination string
+******************************************************************/
+CXML_Int8 *CXML_Asc_strncat(CXML_Int8 *destination,
+ const CXML_Int8 *source,
+ const NW_Uint32 count )
+{
+ CXML_Uint32 nCount = 0;
+
+ NW_ASSERT(destination != NULL);
+ NW_ASSERT(source != NULL);
+
+ while(*destination != '\0')
+ {
+ destination++;
+ }
+
+
+ while ( (nCount < count) && (*source != CXML_ASCII_NULL ) ) {
+ *destination = *source;
+ destination++;
+ source++;
+ nCount++;
+ }
+
+ /*
+ ** ANSI 7.11.2.4 says nulls are appended till count characters in all have
+ ** been copied
+ */
+ while (nCount < count) {
+ *destination = CXML_ASCII_NULL;
+ destination++;
+ nCount++;
+ }
+ return destination;
+}
+
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/utils/src/cxml_vector.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,341 @@
+/*
+* Copyright (c) 2003 - 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include <xml/cxml/nw_tinytree.h>
+#include "cxml_internal.h"
+
+/* ------------------------------------------------------------------------- */
+
+/* ------------------------------------------------------------------------- */
+static
+CXML_Uint8*
+CXML_Vector_AllocateSegment (CXML_Vector_t* thisObj, NW_TinyTree_TreeNode_t* sentinel)
+{
+ CXML_Uint8* buffer = NULL;
+ if(sentinel)
+ {
+ buffer = (NW_Uint8*) NW_Mem_Malloc ((thisObj->segmentSize + 1) * thisObj->elementSize);
+ if(buffer)
+ {
+ NW_Mem_memcpy(buffer, sentinel, sizeof(NW_TinyTree_TreeNode_t));
+ buffer += thisObj->elementSize;
+ }
+ }
+ else
+ {
+ buffer = (NW_Uint8*) NW_Mem_Malloc (thisObj->segmentSize * thisObj->elementSize);
+ }
+ return buffer;
+}
+
+/* ------------------------------------------------------------------------- */
+static
+NW_Status_t
+CXML_Vector_ResizeCapacity (CXML_Vector_t* thisObj,
+ CXML_Vector_Metric_t capacityNeeded,
+ NW_TinyTree_TreeNode_t* sentinel)
+{
+ CXML_Vector_Metric_t newNumSegments;
+ CXML_Vector_Metric_t newSegmentListSize;
+ NW_Uint8** newSegmentList;
+ // CXML_Vector_Metric_t index;
+
+ /* calculate the new segmentList size */
+ newNumSegments =
+ (CXML_Vector_Metric_t) ((capacityNeeded - 1) / thisObj->segmentSize + 1);
+ newSegmentListSize = (CXML_Vector_Metric_t)
+ (((newNumSegments - 1) / CXML_SEGMENT_LIST_INCREMENT + 1) * CXML_SEGMENT_LIST_INCREMENT);
+
+ /* if we are shrinking the array, we must first deallocate all the segments
+ that will be obsolete */
+ while (thisObj->numSegments > newNumSegments) {
+ NW_Mem_Free (thisObj->segmentList[--thisObj->numSegments]);
+ }
+ thisObj->capacity =
+ (CXML_Vector_Metric_t) (thisObj->numSegments * thisObj->segmentSize);
+
+ /* allocate the new segmentList and copy the old segmentList entries into the
+ new */
+ newSegmentList =
+ (NW_Uint8**) NW_Mem_Malloc (newSegmentListSize * sizeof (*newSegmentList));
+ if (newSegmentList == NULL) {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+ (void) NW_Mem_memcpy (newSegmentList, thisObj->segmentList,
+ thisObj->numSegments * sizeof (*newSegmentList));
+
+ /* free the old segmentList and install the new */
+ NW_Mem_Free (thisObj->segmentList);
+
+ thisObj->segmentList = newSegmentList;
+ thisObj->segmentListSize = newSegmentListSize;
+
+ /* if we are growing the array we need to allocate the new segments */
+ while (thisObj->numSegments < newNumSegments) {
+ thisObj->segmentList[thisObj->numSegments] =
+ CXML_Vector_AllocateSegment(thisObj, sentinel);
+ if (thisObj->segmentList[thisObj->numSegments++] == NULL) {
+ thisObj->numSegments -= 1;
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+ }
+ thisObj->capacity =
+ (CXML_Vector_Metric_t) (thisObj->numSegments * thisObj->segmentSize);
+
+ /* successful completion */
+ return NW_STAT_SUCCESS;
+}
+
+/* ------------------------------------------------------------------------- */
+static
+NW_Status_t
+CXML_Vector_MoveElements (CXML_Vector_t* thisObj,
+ CXML_Vector_Metric_t srcIndex,
+ CXML_Vector_Metric_t dstIndex,
+ NW_TinyTree_TreeNode_t* sentinel)
+{
+ NW_Int32 sizeDelta;
+ CXML_Vector_Metric_t numElements;
+ NW_Int32 index;
+
+ /* */
+ if (dstIndex > srcIndex) {
+ sizeDelta = dstIndex - srcIndex;
+ } else {
+ sizeDelta = - (NW_Int32) (srcIndex - dstIndex);
+ }
+
+ if (thisObj->size + sizeDelta > thisObj->capacity) {
+ NW_Status_t status;
+
+ status = CXML_Vector_ResizeCapacity (thisObj,
+ (CXML_Vector_Metric_t) (thisObj->size + sizeDelta), sentinel);
+ if (status != NW_STAT_SUCCESS) {
+ return status;
+ }
+ }
+
+ /* now do the actual move */
+ /* TODO: this is a very inefficient way of moving the data, we will probably
+ need to implement a block move capability */
+ numElements = (CXML_Vector_Metric_t) (thisObj->size - srcIndex);
+ if (srcIndex > dstIndex) {
+ for (index = 0; index < NW_INT32_CAST(numElements); index++) {
+ (void) NW_Mem_memcpy (CXML_Vector_AddressAt (thisObj,
+ (CXML_Vector_Metric_t) (dstIndex + index)), CXML_Vector_AddressAt (thisObj,
+ (CXML_Vector_Metric_t) (srcIndex + index)), thisObj->elementSize);
+ }
+ } else {
+ for (index = numElements - 1; index >= 0; index--) {
+ (void) NW_Mem_memcpy (CXML_Vector_AddressAt (thisObj,
+ (CXML_Vector_Metric_t) (dstIndex + index)), CXML_Vector_AddressAt (thisObj,
+ (CXML_Vector_Metric_t) (srcIndex + index)), thisObj->elementSize);
+ }
+ }
+
+ /* successful completion */
+ return NW_STAT_SUCCESS;
+}
+
+CXML_Vector_t*
+CXML_Vector_Construct(CXML_Vector_Metric_t elementSize,
+ CXML_Vector_Metric_t segmentSize)
+{
+ CXML_Vector_t* vector = (CXML_Vector_t*) NW_Mem_Malloc(sizeof(CXML_Vector_t));
+
+if(vector)
+ {
+ vector->elementSize = elementSize;
+ vector->capacity = 0;
+ vector->size = 0;
+
+ vector->segmentSize = segmentSize;
+ vector->segmentListSize = CXML_SEGMENT_LIST_INCREMENT;
+
+ //Allocate memory for one segment here. For more memory the
+ //function CXML_Vector_ResizeCapacity() will do the job.
+
+ vector->segmentList = (NW_Uint8**)
+ NW_Mem_Malloc (vector->segmentListSize * sizeof (*vector->segmentList));
+
+ if (vector->segmentList == NULL) {
+ NW_Mem_Free(vector);
+ return NULL;
+ }
+vector->numSegments = 0;
+ }
+ return vector;
+}
+
+void
+CXML_Vector_Destruct(CXML_Vector_t* vector)
+{
+ CXML_Vector_Metric_t index;
+ for (index = 0; index < vector->numSegments; index++) {
+ NW_Mem_Free (vector->segmentList[index]);
+ }
+ NW_Mem_Free (vector->segmentList);
+ NW_Mem_Free(vector);
+}
+
+void
+CXML_Vector_AdjustSegment(CXML_Vector_t* vector)
+{
+ CXML_Vector_Metric_t index;
+
+ /*
+ * Walk through segment list adjusting pointers to the
+ * sentinel element at the beginning of each segment
+ */
+
+ for (index = 0; index < vector->numSegments; index++) {
+ vector->segmentList[index] -= vector->elementSize;
+ }
+}
+
+NW_Uint8*
+CXML_Vector_AddressAt (const CXML_Vector_t* thisObj,
+ CXML_Vector_Metric_t index)
+{
+ CXML_Vector_Metric_t segmentIndex;
+
+ /* determine the segment index and return the offset into that segment */
+ segmentIndex =
+ (CXML_Vector_Metric_t) (index / thisObj->segmentSize);
+ return
+ (NW_Uint8*) thisObj->segmentList[segmentIndex]
+ + (index % thisObj->segmentSize) * thisObj->elementSize;
+}
+
+/* ------------------------------------------------------------------------- */
+void**
+CXML_Vector_InsertAt (CXML_Vector_t* thisObj,
+ void* element,
+ CXML_Vector_Metric_t where,
+ void* sentinel)
+{
+ NW_Status_t status;
+
+ /* convert the where if CXML_Vector_AtEnd is specified */
+ if (where == CXML_Vector_AtEnd) {
+ where = thisObj->size;
+ }
+
+ /* make sure that the where element is not out of bounds */
+ NW_ASSERT (where <= thisObj->size);
+
+ /* move all the elements up by one, if this fails we simply return
+ the error code passed to us */
+ status =
+ CXML_Vector_MoveElements (thisObj, where,
+ (CXML_Vector_Metric_t) (where + 1),
+ (NW_TinyTree_TreeNode_t*) sentinel);
+ if (status != NW_STAT_SUCCESS) {
+ return NULL;
+ }
+
+ /* copy the element into vector */
+ if (element != NULL) {
+ (void) NW_Mem_memcpy (CXML_Vector_AddressAt (thisObj, where),
+ element, thisObj->elementSize);
+ } else {
+ /*
+ * if element is NULL, then we need to zero out the memory block. This is necessary
+ * because later code which fills in the values for this newly allocated vector
+ * element may leave some bytes in the memory block un-assigned due to padding.
+ */
+ NW_Mem_memset ( CXML_Vector_AddressAt (thisObj, where),
+ 0, thisObj->elementSize);
+ }
+
+ /* increment the size count */
+ thisObj->size += 1;
+
+ /* successful completion */
+ return (void**)
+ CXML_Vector_AddressAt (thisObj, where);
+}
+
+/* ------------------------------------------------------------------------- */
+NW_Status_t
+CXML_Vector_RemoveAt (CXML_Vector_t* thisObj,
+ CXML_Vector_Metric_t index)
+{
+ NW_Status_t status;
+
+ /* convert the index if CXML_Vector_AtEnd is specified */
+ if (index == CXML_Vector_AtEnd) {
+ index = (CXML_Vector_Metric_t) (thisObj->size - 1);
+ }
+
+ /* make sure that the index element is not out of bounds */
+ if (index >= thisObj->size) {
+ return NW_STAT_FAILURE;
+ }
+
+ /* don't bother to move anything if the resultant size is zero */
+ if (thisObj->size > 1) {
+ /* move all the elements down by one, if this fails we simply return
+ the error code passed to us */
+ status =
+ CXML_Vector_MoveElements (thisObj, (CXML_Vector_Metric_t) (index + 1),
+ index, NULL);
+ if (status != NW_STAT_SUCCESS) {
+ return status;
+ }
+ }
+
+ /* increment the size count */
+ thisObj->size -= 1;
+
+ /* successful completion */
+ return NW_STAT_SUCCESS;
+}
+
+/* ------------------------------------------------------------------------- */
+void**
+CXML_Vector_ElementAt (const CXML_Vector_t* vector,
+ CXML_Vector_Metric_t index)
+{
+ if (index >= vector->size) {
+ return NULL;
+ }
+ return (void**) CXML_Vector_AddressAt (vector, index);
+}
+
+/* ------------------------------------------------------------------------- */
+CXML_Vector_Metric_t
+CXML_Vector_GetElementIndex (const CXML_Vector_t* vector,
+ void* target)
+{
+ CXML_Vector_Metric_t index;
+
+ for (index = 0; index < vector->size; index++) {
+ void* element;
+
+ /* get and compare the element */
+ element = CXML_Vector_ElementAt (vector, index);
+ if (NW_Mem_memcmp (target, element, vector->elementSize) == 0) {
+ return index;
+ }
+ }
+
+ /* no match found, return CXML_Vector_AtEnd */
+ return CXML_Vector_AtEnd;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/utils/src/nwx_buffer.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,228 @@
+/*
+* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/*****************************************************************
+** File name: NW_Buffer.c
+** Part of: Buffer
+** Version: 3/16/99 Initial version
+** Description: Provides the interface to a managerd buffer of bytes.
+** The buffer contains an allocated size and an in use
+** size (length) and also a pointer to a data array.
+******************************************************************/
+
+/*
+**-------------------------------------------------------------------------
+** Include Files
+**-------------------------------------------------------------------------
+*/
+#include "nwx_buffer.h"
+#include "nwx_mem.h"
+#include "nwx_assert.h"
+#include "nw_string_utils.h"
+
+/*
+**-------------------------------------------------------------------------
+** Constants
+**-------------------------------------------------------------------------
+*/
+
+/*
+**-------------------------------------------------------------------------
+** Internal Types
+**-------------------------------------------------------------------------
+*/
+
+/*
+**-------------------------------------------------------------------------
+** Macros
+**-------------------------------------------------------------------------
+*/
+
+/*
+**-------------------------------------------------------------------------
+** Internal Prototypes
+**-------------------------------------------------------------------------
+*/
+
+/*
+**-------------------------------------------------------------------------
+** File Scoped Static Variables
+**-------------------------------------------------------------------------
+*/
+
+/*
+**-------------------------------------------------------------------------
+** Global Variable Definitions
+**-------------------------------------------------------------------------
+*/
+
+/*
+**-------------------------------------------------------------------------
+** Internal Functions
+**-------------------------------------------------------------------------
+*/
+static NW_Status_t Resize_Data(NW_Buffer_t *buffer, const NW_Uint32 len)
+{
+ void *temp;
+
+ if (buffer->allocatedLength < len) {
+ temp = NW_Mem_Malloc(len);
+ if (temp == NULL)
+ return NW_STAT_OUT_OF_MEMORY;
+ NW_Mem_Free(buffer->data);
+ buffer->length = 0;
+ buffer->allocatedLength = len;
+ buffer->data = temp;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+
+/*
+**-------------------------------------------------------------------------
+** External Public (Exported) Functions
+**-------------------------------------------------------------------------
+*/
+
+/*****************************************************************
+** Name: NW_Buffer_New
+** Description: creates a new buffer
+** Parameters: size - size to allocate
+** Return Value: pointer to the new buffer
+******************************************************************/
+NW_Buffer_t *NW_Buffer_New(const NW_Uint32 size)
+{
+ NW_Buffer_t *buffer;
+
+ buffer = NW_Mem_Malloc(sizeof(NW_Buffer_t));
+ if (buffer != NULL) {
+ buffer->length = 0;
+ buffer->allocatedLength = size;
+ buffer->data = NULL;
+ if (size > 0) {
+ buffer->data = NW_Mem_Malloc(size);
+ if (buffer->data == NULL) {
+ NW_Mem_Free(buffer);
+ return NULL;
+ }
+ }
+ }
+ return buffer;
+}
+
+/*****************************************************************
+** Name: NW_Buffer_Free
+** Description: frees the space allocated for a buffer
+** Parameters: *buffer - the buffer to free
+** Return Value: void
+******************************************************************/
+EXPORT_C void NW_Buffer_Free(NW_Buffer_t *buffer)
+{
+ if (buffer != NULL) {
+ if (buffer->data != NULL) {
+ NW_Mem_Free(buffer->data);
+ buffer->data = NULL;
+ }
+ NW_Mem_Free(buffer);
+ }
+ return;
+}
+
+/*****************************************************************
+** Name: NW_Buffer_FreeNotData
+** Description: free the space allocated for a buffer.
+** Parameters: *buffer - the buffer to free
+** Return Value: void
+** Notes: This does not free the data
+******************************************************************/
+EXPORT_C void NW_Buffer_FreeNotData(NW_Buffer_t *buffer)
+{
+ if (buffer != NULL) {
+ buffer->data = NULL;
+ NW_Mem_Free(buffer);
+ }
+ return;
+}
+
+/*****************************************************************
+** Name: NW_Buffer_CopyStr
+** Description: Copy NULL terminated string into buffer and adjust
+** length. If necessary, reallocate space.
+** Parameters: *buffer - the buffer to copy to
+** *str - the string to copy from
+** Return Value: NW_STAT_SUCCESS if succeeds, else NW_STAT_OUT_OF_MEMORY
+******************************************************************/
+NW_Status_t NW_Buffer_CopyStr(NW_Buffer_t *buffer, const NW_Ucs2 *str)
+{
+ NW_Uint16 len;
+
+ NW_ASSERT(buffer != NULL);
+ NW_ASSERT(str != NULL);
+
+ len = (NW_Uint16)NW_Str_Strsize(str);
+ if (Resize_Data(buffer, len) == NW_STAT_OUT_OF_MEMORY)
+ return NW_STAT_OUT_OF_MEMORY;
+ NW_Mem_memcpy(buffer->data, str, len);
+ buffer->length = len;
+ return NW_STAT_SUCCESS;
+}
+
+/*****************************************************************
+** Name: NW_Buffer_CopyBuffers
+** Description: Copy NW_Buffer into buffer (NW_Buffer)
+** and adjust length. If necessary, reallocate space.
+** Parameters: *to - the buffer to copy to
+** *from - the buffer to copy from
+** Return Value: NW_STAT_SUCCESS if succeeds, else NW_STAT_OUT_OF_MEMORY
+******************************************************************/
+NW_Status_t NW_Buffer_CopyBuffers(NW_Buffer_t *to, const NW_Buffer_t *from)
+{
+ NW_ASSERT(to != NULL);
+ NW_ASSERT(from != NULL);
+
+ if (Resize_Data(to, from->length) == NW_STAT_OUT_OF_MEMORY)
+ return NW_STAT_OUT_OF_MEMORY;
+ NW_Mem_memcpy(to->data, from->data, from->length);
+ to->length = from->length;
+ return NW_STAT_SUCCESS;
+}
+
+/*****************************************************************
+** Name: NW_Buffer_SetData
+** Description: Set NULL terminated ascii string into buffer and
+** adjust length.
+** Parameters: *buffer - the buffer to copy to
+** *str - the string to set into buffer
+** Return Value: void
+******************************************************************/
+void NW_Buffer_SetData(NW_Buffer_t *buffer, char *str)
+{
+ NW_Uint32 len;
+
+ NW_ASSERT(buffer != NULL);
+ NW_ASSERT(str != NULL);
+
+ if(buffer->data != NULL) {
+ NW_Mem_Free(buffer->data);
+ }
+ len = (NW_Asc_strlen(str) + 1) * sizeof(char);
+ buffer->length = len;
+ buffer->allocatedLength = len;
+ buffer->data = (NW_Byte *)str;
+ return;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/utils/src/nwx_mem_epoc32.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,414 @@
+/*
+* Copyright (c) 1999 - 2000 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/***************************************************************************
+** File: nwx_mem.c
+** Purpose: Provides the implementation to memory management
+**************************************************************************/
+
+/*
+**-------------------------------------------------------------------------
+** Include Files
+**-------------------------------------------------------------------------
+*/
+#include "nwx_mem.h"
+#ifdef FEATURE_MEMORY_PROFILE
+#include "nwx_ctx.h"
+#include "nwx_logger.h"
+#endif // FEATURE_MEMORY_PROFILE
+
+/*
+**-------------------------------------------------------------------------
+** Constants
+**-------------------------------------------------------------------------
+*/
+
+/*
+**-------------------------------------------------------------------------
+** Internal Types
+**-------------------------------------------------------------------------
+*/
+#ifdef FEATURE_MEMORY_PROFILE
+typedef struct _MemProfile
+{
+ struct _MemProfile *next; // ptr to next mem block
+ struct _MemProfile *prev; // ptr to previous mem block
+ char *file; // filename of memory allocator
+ NW_Int32 line; // line # in filename of memory allocator
+ NW_Int32 size; // size of requested memory
+ NW_Int32 seq; // sequence number for allocation
+} MemProfile;
+#endif // FEATURE_MEMORY_PROFILE
+
+/*
+**-------------------------------------------------------------------------
+** Macros
+**-------------------------------------------------------------------------
+*/
+
+/*
+**-------------------------------------------------------------------------
+** Internal Prototypes
+**-------------------------------------------------------------------------
+*/
+
+/*
+**-------------------------------------------------------------------------
+** File Scoped Static Variables
+**-------------------------------------------------------------------------
+*/
+
+/*
+**-------------------------------------------------------------------------
+** Global Variable Definitions
+**-------------------------------------------------------------------------
+*/
+
+
+/*
+**-------------------------------------------------------------------------
+** Internal Functions
+**-------------------------------------------------------------------------
+*/
+
+
+/*
+**-------------------------------------------------------------------------
+** External Public (Exported) Functions
+**-------------------------------------------------------------------------
+*/
+
+void *NW_Mem_memset(void *s, NW_Uint32 c, NW_Uint32 n)
+{
+ unsigned char *myPtr = (unsigned char *)s;
+ unsigned char fill = (unsigned char)c;
+ while (n > 0) {
+ *myPtr = fill;
+ myPtr++;
+ n--;
+ }
+ return s;
+}
+
+EXPORT_C void *NW_Mem_memcpy(void *s1, const void *s2, NW_Uint32 n)
+{
+ unsigned char *myDest = (unsigned char *)s1;
+ unsigned char *mySource = (unsigned char *)s2;
+ if (n==0) return NULL;
+ while (n > 0) {
+ *myDest = *mySource;
+ n--;
+ myDest++;
+ mySource++;
+ }
+ return s1;
+}
+
+void *NW_Mem_memmove(void *s1, const void *s2, NW_Uint32 n)
+{
+ unsigned char *tempBuff;
+ if (n == 0) return NULL;
+ tempBuff = NW_Mem_Malloc(n);
+ if (tempBuff == NULL) {
+ return NULL;
+ }
+ NW_Mem_memcpy(tempBuff, s2, n);
+ NW_Mem_memcpy(s1, tempBuff, n);
+ NW_Mem_Free(tempBuff);
+ return s1;
+}
+
+NW_Int32 NW_Mem_memcmp(const void *s1, const void *s2, NW_Uint32 n)
+{
+ unsigned char *myDest = (unsigned char *)s1;
+ unsigned char *mySource = (unsigned char *)s2;
+
+ /* If s1 == s2, then immediately return 0. */
+ if ( s1 == s2 )
+ return 0 ;
+
+ while (n > 0) {
+ if (*myDest != *mySource) {
+ return (*myDest - *mySource);
+ }
+ myDest++;
+ mySource++;
+ n--;
+ }
+
+ return 0;
+}
+
+
+/*********************************************************
+** Name: NW_Mem_Malloc
+** Description: Allocates memory.
+** Parameters: nbytes - number of bytes to allocate
+** Return Value: pointer to the allocated memory or NULL
+**********************************************************/
+
+EXPORT_C void *NW_Mem_Malloc_No_Pro(NW_Uint32 nbytes)
+{
+ void *buf;
+ buf = malloc(nbytes);
+ return buf;
+}
+
+/************************************************************************
+** Name: NW_Mem_Free
+** Description: Frees allocated memory.
+** Parameters: mem - pointer to the memory to free
+** Return Value: void
+**************************************************************************/
+EXPORT_C void NW_Mem_Free_No_Pro(void *mem)
+{
+ /* Note: free() handles NULL pointers corretly */
+ free(mem);
+ return;
+}
+
+
+// --------------------------------------------------------
+// PROFILED MEMORY MANAGEMENT ROUTINES
+// --------------------------------------------------------
+
+#ifdef FEATURE_MEMORY_PROFILE
+
+/*****************************************************************
+** Name: Asc_strlen
+** Description: Returns string length of ascii string
+** Parameters: *string - Null-terminated ascii string
+** Return Value: string length
+******************************************************************/
+NW_Uint32 Asc_strlen(const char *s)
+{
+ NW_Uint32 i = 0;
+ while (*s != '\0')
+ {
+ s++;
+ i++;
+ }
+ return i;
+}
+
+/*****************************************************************
+** Name: Asc_strcpy
+** Description: Copies ascii string
+** Parameters: s1 destination string
+** s2 source string
+** Return Value: pointer to s1
+******************************************************************/
+char *Asc_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *s1 = *s2;
+ s1++;
+ s2++;
+ }
+ *s1 = *s2;
+ return s1;
+}
+
+/*****************************************************************
+** Name: Str_CvtFromAscii
+** Description: Convert null-terminated ascii string to new ucs2 string
+** Parameters: *string - Null-terminated ascii string
+** Return Value: pointer to new ucs2 string or NULL
+******************************************************************/
+NW_Ucs2 *Str_CvtFromAscii(const char *string)
+{
+ NW_Uint32 i, size;
+ NW_Ucs2* res = NULL;
+
+ NW_ASSERT(string);
+
+ size = Asc_strlen(string) + 1;
+ res = malloc(size * sizeof(NW_Ucs2));
+ /* this is a really naive conversion from ascii */
+ if (res != NULL) {
+ for (i=0; i < size; i++) {
+ res[i] = string[i];
+ }
+ }
+ return res;
+}
+
+
+/*********************************************************
+** Name: NW_Mem_Malloc_Pro
+** Description: Allocates "profiled" memory.
+** Parameters: nbytes - number of bytes to allocate
+** file - string of filename where this was called
+** line - line # of file where this was called
+** Return Value: pointer to the allocated memory or NULL
+**********************************************************/
+void *NW_Mem_Malloc_Pro(NW_Uint32 nbytes, char *file, NW_Uint32 line)
+{
+ void *buf;
+ MemProfile *pblock, *last;
+ NW_Int32 len = nbytes + sizeof(MemProfile);
+ NW_Int32 seqno;
+ NW_Status_t status;
+
+ pblock = malloc(len);
+
+ // Store profile block data
+
+ if ((NW_Uint32) file > 0xf000)
+ {
+ pblock->file = (char*)malloc(Asc_strlen(file) + 1);
+ Asc_strcpy(pblock->file, file);
+ }
+ else
+ {
+ // no filename since this may be called via a function ptr
+ pblock->file = NULL;
+ }
+ pblock->line = line;
+ pblock->size = nbytes;
+
+ // Set List Pointers
+ // Get last ptr
+ last = (MemProfile *) NW_Ctx_Get(NW_CTX_MEM_PRO_LAST_PTR, 0);
+
+ if (last == NULL)
+ {
+ pblock->prev = NULL;
+ pblock->seq = 0;
+ }
+ else
+ {
+ pblock->prev = last;
+ last->next = pblock;
+ // can't use last-> because free my remove block (along with
+ // seq numbers, need a context
+ seqno = (NW_Uint32) NW_Ctx_Get(NW_CTX_MEM_PRO_SEQ_NO, 0);
+ seqno += 1;
+ pblock->seq = seqno;
+ status = NW_Ctx_Set(NW_CTX_MEM_PRO_SEQ_NO, 0, seqno);
+ NW_ASSERT(status == NW_STAT_SUCCESS);
+ }
+ pblock->next = NULL;
+
+ // last = pblock
+ last = pblock;
+ status = NW_Ctx_Set(NW_CTX_MEM_PRO_LAST_PTR, 0, last);
+ NW_ASSERT(status == NW_STAT_SUCCESS);
+
+
+ // return mem block to caller
+ buf = (void *) ((NW_Byte *) pblock + sizeof(MemProfile));
+ return (buf);
+}
+
+/************************************************************************
+** Name: NW_Mem_Free_Pro
+** Description: Frees allocated "profiled" memory.
+** Parameters: mem - pointer to the memory to free
+** file - string of filename where this was called
+** line - line # of file where this was called
+** Return Value: void
+**************************************************************************/
+void NW_Mem_Free_Pro(void *buffer, char *file, NW_Uint32 line)
+{
+ MemProfile *pblock, *last, *prevp, *nextp;
+ NW_Status_t status;
+
+ if (buffer == NULL)
+ {
+ return;
+ }
+
+ pblock = (MemProfile *) ((NW_Byte *) buffer - sizeof(MemProfile));
+
+ // Get last ptr
+ last = (MemProfile *) NW_Ctx_Get(NW_CTX_MEM_PRO_LAST_PTR, 0);
+
+ if ( pblock == last )
+ {
+ last = last->prev;
+ status = NW_Ctx_Set(NW_CTX_MEM_PRO_LAST_PTR, 0, last);
+ NW_ASSERT(status == NW_STAT_SUCCESS);
+ }
+ else
+ {
+ prevp = pblock->prev;
+ nextp = pblock->next;
+ if (prevp)
+ {
+ prevp->next = nextp;
+ }
+ if (nextp)
+ {
+ nextp->prev = prevp;
+ }
+ }
+
+ // Free Filename pointer and memory block
+ free(pblock->file);
+ free(pblock);
+ return;
+}
+
+
+/************************************************************************
+** Name: SendStringToLogger1
+** Description: Output Memory Profile Data to Debug Log
+** Parameters: none
+** Return Value: void
+**************************************************************************/
+void SendStringToLogger1(char *strMsg)
+{
+ MemProfile *pblock, *last;
+ NW_Ucs2 *uStrFileName = NULL;
+
+ if (strMsg != NULL)
+ {
+ NW_Ucs2 *uStrMsg = Str_CvtFromAscii(strMsg);
+ NW_LOG1(NW_LOG_LEVEL1, "NW_Mem_Pro_Log: %s", uStrMsg);
+ free(uStrMsg);
+ return;
+ }
+
+ // Get last ptr
+ last = (MemProfile *) NW_Ctx_Get(NW_CTX_MEM_PRO_LAST_PTR, 0);
+
+ pblock = last;
+ while ( pblock )
+ {
+ if (pblock->file == NULL)
+ {
+ uStrFileName = Str_CvtFromAscii("??");
+ }
+ else
+ {
+ uStrFileName = Str_CvtFromAscii(pblock->file);
+ }
+ NW_LOG6(NW_LOG_LEVEL1, "NW_Mem_Pro_Log: memBlock:%X, data:%X, File: %s ; Line: %d ; Size: %d ; SEQ: %d",
+ pblock,
+ pblock + sizeof(MemProfile),
+ uStrFileName,
+ pblock->line,
+ pblock->size,
+ pblock->seq);
+ NW_LOG0(NW_LOG_LEVEL1, "NW_Mem_Pro_Log: ------------------------------");
+ pblock = pblock->prev;
+ free(uStrFileName);
+ }
+}
+#endif // FEATURE_MEMORY_PROFILE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/wbxmlp/include/DictionaryContext.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef NW_PARSER_WBXML_DICTIONARYCONTEXT_H
+#define NW_PARSER_WBXML_DICTIONARYCONTEXT_H
+
+/* TODO: Change dictionaries to be all static const. Currently
+ * they are stored inside the context.
+ */
+
+#define MAX_DICTIONARIES 9
+
+
+/* Temporary methods for storing dictionary & dictionary size inside the context.
+ */
+
+#include <xml/cxml/cxml_proj.h>
+#include <xml/cxml/nw_wbxml_dictionary.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+typedef enum {
+ NW_CONTEXT_REF_DICT_CNT_INR,
+ NW_CONTEXT_REF_DICT_CNT_DCR
+} CXML_DICT_REF_CNT;
+
+void StoreDictionaries(NW_WBXML_Dictionary_t** dictionaries);
+NW_WBXML_Dictionary_t** GetDictionaries();
+void StoreDictionaryCount(NW_Uint32 dictionary_count);
+NW_Uint32 GetDictionaryCount();
+void DestroyDictionaries();
+/*The following function takes parameter of type CXML_DICT_REF_CNT only */
+void UpdateDictRefCnt(CXML_DICT_REF_CNT updateVal);
+
+#ifdef __cplusplus
+} // extern "C" {
+#endif /* __cplusplus */
+
+
+#endif // NW_PARSER_WBXML_DICTIONARYCONTEXT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/wbxmlp/include/nw_wbxml_parsei.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,109 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/*****************************************************************
+** File: parseI.h
+**
+** Description: definitions internal to WBXML parser component
+*****************************************************************/
+
+#ifndef NW_PARSER_WBXML_PARSE_I_H
+#define NW_PARSER_WBXML_PARSE_I_H
+
+#include <xml/cxml/cxml_proj.h>
+#include <xml/cxml/nw_wbxml_parse.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*
+ * Parser states, shared by reader and parser
+ */
+
+#define NW_WBXML_PARSER_S_MASK 0x0F
+#define NW_WBXML_PARSER_S_START 0x00
+#define NW_WBXML_PARSER_S_HEADER 0x01
+#define NW_WBXML_REGISTRY_INIT 0x10
+
+
+/*
+ * Parser internal status codes, shared by reader and parser
+ */
+
+#define NW_WBXML_PARSER_OK 0x0
+#define NW_WBXML_PARSER_NOMEMORY 0x1
+#define NW_WBXML_PARSER_BYTECODEERROR 0x2
+#define NW_WBXML_PARSER_CHARSET_UNSUPPORTED 0x4
+#define NW_WBXML_PARSER_UNKNOWN_ERROR 0x8
+
+/* Parse exceptions */
+
+#define NW_WBXML_EXCEPTION_MEMORY 1
+#define NW_WBXML_EXCEPTION_BYTECODE 2
+
+/*
+* WBXML token components
+*
+* The wbxml parser stores tokens as 32 bits. The meaning
+* of each token is determined as a 4-tuple:
+* the token itself (8 bits), the code page (8 bits),
+* the dictionary in which it is defined (for which we
+* allocate 15 bits) and a state flag that indicates whether
+* the token is in attribute or tag code space.
+*
+* Within the lowest 8 bits (the token component) the
+* wbxml spec defines further subsets of bits for tags
+* and attributes. The parser itself only int32erprets
+* the lowest 8 bits. The remaining bits are used for
+* token value lookups in dictionaries.
+*/
+
+/* TODO: export some of these definitions? */
+
+#define NW_WBXML_MASK_TOKEN 0x000000FF
+#define NW_WBXML_MASK_CODEPAGE 0x0000FF00
+#define NW_WBXML_MASK_DICTIONARY 0x7FFF0000
+#define NW_WBXML_MASK_CPSTATE 0x80000000
+
+#define NW_WBXML_CP_STATE_TAG 0x00000000
+#define NW_WBXML_CP_STATE_ATTR 0x80000000
+
+void
+NW_WBXML_CPRegistry_getCodePages(NW_WBXML_CP_Registry_t* registry,
+ NW_Uint32 offset,
+ NW_Uint8 *tag_code_page,
+ NW_Uint8 *attribute_code_page);
+
+NW_Status_t
+NW_WBXML_Parser_docHeaderParse(NW_WBXML_Parser_t * parser,
+ NW_WBXML_Document_t * doc);
+
+NW_Status_t
+NW_WBXML_Parser_bodyParse(NW_WBXML_Parser_t * parser);
+
+void
+NW_WBXML_Parser_bytecodeError (NW_WBXML_Parser_t * parser);
+
+
+#ifdef __cplusplus
+} // extern "C" {
+#endif /* __cplusplus */
+
+#endif /* NW_PARSER_WBXML_PARSE_I_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/wbxmlp/src/DictionaryContext.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,296 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <e32std.h>
+#include "DictionaryContext.h"
+#include "cxml_internal.h"
+#include "featmgr.h"
+#include <xml/cxml/nw_wbxml_dictionary.h>
+
+/* There is possibility that dictionary initialize is called by the embedded
+ * application also. To make allocation/deallocation of dictionary possible.
+ * The NW_CONTEXT_REF_DICT_CNT variable is added. This variable of TLS context
+ * will keep the reference count of the number of times dictionary
+ * inialization/destroy is called.
+ *
+ * The dictionary is destroyed when NW_CONTEXT_REF_DICT_CNT is zero.
+ *
+ */
+
+typedef enum {
+ NW_CONTEXT_DICTIONARY = 0,
+ NW_CONTEXT_DICTIONARY_COUNT = 1,
+ NW_CONTEXT_REF_DICT_CNT = 2, /*Number of times dictionary rerferenced*/
+
+ NW_CONTEXT_NUM_ENTRIES = 3
+
+} NW_DictionaryContext_Id_t;
+
+
+typedef struct {
+ NW_Uint16 numContexts;
+ void *contexts[NW_CONTEXT_NUM_ENTRIES];
+} NW_DictionaryContext_Array_t;
+
+
+/*****************************************************************
+
+ Name: NW_Ctx_Init()
+
+ Description: Initialize the context manager
+
+ Parameters:
+
+ Return Value: NW_STAT_SUCCESS or NW_STAT_OUT_OF_MEMORY
+
+******************************************************************/
+static NW_Status_t DictContext_Init()
+{
+ NW_DictionaryContext_Array_t* contextArray;
+ NW_Uint32 i;
+
+ /*lint --e{429} Custodial pointer has not been freed or returned */
+
+ /* Initialize the context manager once, and only once! */
+ if (Dll::Tls() == NULL) {
+ /* Allocate and init array to hold context pointers */
+ contextArray = new NW_DictionaryContext_Array_t;
+
+ /*lint -e{774} Boolean within 'if' always evaluates to False */
+ if (contextArray == NULL) {
+ DestroyDictionaries();
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ contextArray->numContexts = NW_CONTEXT_NUM_ENTRIES;
+
+ for (i = 0; i < NW_CONTEXT_NUM_ENTRIES; i++) {
+ contextArray->contexts[i] = NULL;
+ }
+
+ /* Store the pointer to the context array */
+ if( Dll::SetTls( contextArray ) != KErrNone)
+ {
+ DestroyDictionaries();
+ }
+ }
+
+ return NW_STAT_SUCCESS;
+}
+
+
+/*****************************************************************
+
+ Name: NW_Ctx_Set()
+
+ Description: Set the context for the specified component
+
+ Parameters: component - which context
+ *ctx - pointer to the context to store
+
+ Return Value: NW_STAT_SUCCESS or NW_STAT_FAILURE
+
+******************************************************************/
+NW_Status_t DictContext_Set(const NW_DictionaryContext_Id_t aContextId,
+ void *ctx)
+{
+ NW_Status_t status = NW_STAT_SUCCESS;
+ NW_DictionaryContext_Array_t* contextArray;
+
+ NW_ASSERT(aContextId < NW_CONTEXT_NUM_ENTRIES);
+
+ /* Get the pointer to the context array */
+ contextArray = (NW_DictionaryContext_Array_t*)Dll::Tls();
+
+ if (contextArray == NULL) {
+ status = DictContext_Init();
+ if (status != NW_STAT_SUCCESS) {
+ return status;
+ }
+ contextArray = (NW_DictionaryContext_Array_t*)Dll::Tls();
+ }
+
+ /* Save the aContextId's context */
+ if (contextArray != NULL) {
+ /*lint -e{661} Possible access of out-of-bounds pointer */
+ contextArray->contexts[aContextId] = ctx;
+ return NW_STAT_SUCCESS;
+ }
+
+ return status;
+}
+
+
+/*****************************************************************
+
+ Name: DictContext_Get()
+
+ Description: Get the context for the specified component
+
+ Parameters: aContextId - which context
+
+ Return Value: pointer to the component's context or NULL
+
+******************************************************************/
+void *DictContext_Get(const NW_DictionaryContext_Id_t aContextId)
+{
+ NW_Status_t status;
+ NW_DictionaryContext_Array_t* contextArray;
+
+ /* Use "<=" rather than "<", as PushMtm tests last item for NULL */
+ NW_ASSERT(aContextId <= NW_CONTEXT_NUM_ENTRIES);
+
+ /* Get the pointer to the context array */
+ contextArray = (NW_DictionaryContext_Array_t*)Dll::Tls();
+
+ if (contextArray == NULL) {
+ status = DictContext_Init();
+ if (status != NW_STAT_SUCCESS) {
+ return NULL;
+ }
+ contextArray = (NW_DictionaryContext_Array_t*)Dll::Tls();
+ }
+
+ /* Return the component's context */
+ if (contextArray != NULL) {
+ /*lint --e{661} Possible access of out-of-bounds pointer */
+ /*lint --e{662} Possible creation of out-of-bounds pointer */
+ return contextArray->contexts[aContextId];
+ }
+
+ return NULL;
+}
+
+void DestroyDictionaries()
+{
+ NW_DictionaryContext_Array_t* contextArray = (NW_DictionaryContext_Array_t*)Dll::Tls();
+
+ if(contextArray)
+ {
+
+ /*Check the dictionary reference count. If it is zero
+ * then free the dictionary.
+ */
+ if(contextArray->contexts[NW_CONTEXT_REF_DICT_CNT] == 0)
+ {
+ NW_WBXML_Dictionary_t **dictionaries = GetDictionaries();
+
+ NW_Mem_Free(dictionaries);
+ StoreDictionaries(NULL);
+ StoreDictionaryCount(0);
+
+ // Get the TLS pointer
+
+ delete contextArray;
+ contextArray = NULL;
+ Dll::SetTls(contextArray);
+ }
+ }/*end if(contextArray)*/
+}
+
+/* Temporary methods for storing dictionary & dictionary size inside the context.
+ */
+void StoreDictionaries(NW_WBXML_Dictionary_t** dictionaries)
+{
+ DictContext_Set(NW_CONTEXT_DICTIONARY, (void*)dictionaries);
+
+}
+
+NW_WBXML_Dictionary_t** GetDictionaries()
+{
+ return (NW_WBXML_Dictionary_t**)DictContext_Get(NW_CONTEXT_DICTIONARY);
+}
+
+void StoreDictionaryCount(NW_Uint32 dictionary_count)
+{
+ DictContext_Set(NW_CONTEXT_DICTIONARY_COUNT, (void*)dictionary_count);
+
+}
+
+NW_Uint32 GetDictionaryCount()
+{
+ NW_Uint32 count = (NW_Uint32)DictContext_Get(NW_CONTEXT_DICTIONARY_COUNT);
+
+ return count;
+
+}
+
+
+void UpdateDictRefCnt(CXML_DICT_REF_CNT updateVal)
+{
+ NW_DictionaryContext_Array_t* contextArray;
+ NW_Uint32 refCount = 0;
+
+ /* Get the pointer to the context array */
+
+ contextArray = (NW_DictionaryContext_Array_t*)Dll::Tls();
+
+ if(contextArray != NULL)
+ {
+ refCount = (NW_Uint32) contextArray->contexts[NW_CONTEXT_REF_DICT_CNT];
+ if(updateVal == NW_CONTEXT_REF_DICT_CNT_INR)
+ {
+ contextArray->contexts[NW_CONTEXT_REF_DICT_CNT] =
+ (void*)++refCount;
+ }
+ else if(updateVal == NW_CONTEXT_REF_DICT_CNT_DCR)
+ {
+ contextArray->contexts[NW_CONTEXT_REF_DICT_CNT] =
+ (void*)--refCount;
+ }
+
+ }/*end if(contextArray != NULL)*/
+ return;
+}/*end UpdateDictRefCnt(CXML_DICT_REF_CNT updateVal)*/
+
+
+//
+//For Non DTD element support and checking for other features in the release
+//
+
+EXPORT_C
+CXML_Int32 CXML_Additional_Feature_Supprted()
+{
+
+CXML_Int32 featureFlag = 0;
+
+featureFlag |= CXML_DTD_SUPPORT_ON;
+
+ /* The feature manager not supported. May be hook up for future use.
+
+ CXML_Bool retVal = CXML_TRUE;
+
+ FeatureManager::InitializeLibL();
+
+ if(FeatureManager::FeatureSupported(KFeatureIdEcmaScript) )
+ {
+ retVal = CXML_TRUE;
+ }
+ else
+ {
+ retVal = CXML_FALSE;
+ }
+
+
+ retVal = CXML_TRUE;
+
+ return retVal;
+ */
+
+ return featureFlag;
+
+}//end CXML_Non_DTD_supprted()
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/wbxmlp/src/dictionary.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,776 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/*****************************************************************
+** File: dictionary.c
+** Description:
+*****************************************************************/
+#include "cxml_internal.h"
+#include "nw_wbxml_parsei.h"
+#include <xml/cxml/nw_string_char.h>
+#include <xml/cxml/nw_wbxml_dictionary.h>
+#include "DictionaryContext.h"
+
+/* HTTP_iso_8859_1 IANA MIBenum 4 */
+#define NW_WBXML_DICTIONARY_CHARSET 4
+
+/*
+ * The dictionaries ...
+ */
+
+
+static
+NW_Bool
+NW_WBXML_Dictionary_CmpDictDocType(NW_WBXML_Dictionary_t* dictionary,
+ NW_String_t* string,
+ NW_Uint32 encoding)
+{
+ NW_Ucs2* docType;
+
+ docType = dictionary->doc_type;
+ while (*docType != 0)
+ {
+ NW_Int32 bytesRead;
+ NW_Ucs2 c;
+
+ bytesRead = NW_String_readChar(string->storage, &c, encoding);
+ if (c != *docType){
+ return NW_FALSE;
+ }
+ NW_ASSERT(bytesRead > 0);
+ string->storage = string->storage + bytesRead;
+ string->length = string->length - (NW_Uint32)bytesRead;
+ docType++;
+ }
+ return NW_TRUE;
+}
+
+static
+NW_String_UCS2Buff_t *
+getTagByToken (NW_WBXML_Codepage_t * page,
+ NW_Byte token)
+{
+ NW_WBXML_DictEntry_t *e;
+ NW_Int32 r;
+ NW_Int32 l = 0;
+
+ if (page == NULL)
+ return NULL;
+
+ r = page->count - 1;
+ e = page->tokens;
+
+ /* Binary search (tokens must be stored in order) */
+
+ while (r >= l)
+ {
+ NW_Int32 m = (l + r) / 2;
+ if (token == e[m].token)
+ return e[m].name;
+ if (token < e[m].token)
+ r = m - 1;
+ else
+ l = m + 1;
+ }
+
+ return NULL;
+}
+
+/*
+ * Return -1 if tag is not found, page is 0 or tag is 0
+ */
+
+static
+NW_Int16
+getTokenByTag (NW_WBXML_Codepage_t * page,
+ NW_String_UCS2Buff_t * tag,
+ NW_Bool matchCase)
+{
+ NW_Byte *names;
+ NW_Int32 r;
+ NW_Int32 l = 0;
+
+ if (page == NULL || tag == NULL)
+ return -1;
+
+ names = page->names;
+ r = page->count - 1;
+
+ while (r >= l)
+ {
+ NW_Int32 m = (l + r) / 2;
+ NW_Int32 c = NW_String_UCS2BuffCmp (tag, (page->tokens)[names[m]].name, matchCase);
+ if (c == 0)
+ return (page->tokens)[names[m]].token;
+ if (c < 0)
+ r = m - 1;
+ else
+ l = m + 1;
+ }
+
+ return -1;
+}
+
+static
+NW_Status_t
+getTokenByTag2 (NW_WBXML_Codepage_t * page,
+ NW_Uint32 encoding,
+ NW_Uint32 charCount,
+ NW_Uint8 * name,
+ NW_Uint16 * pageToken)
+{
+ NW_Byte *names;
+ NW_Int32 r;
+ NW_Int32 l = 0;
+
+ if (page == NULL || name == NULL || pageToken == NULL) {
+ return NW_STAT_FAILURE;
+ }
+
+ names = page->names;
+ r = page->count - 1;
+
+ while (r >= l)
+ {
+ NW_Int32 m = (l + r) / 2;
+ NW_Int32 c;
+ NW_Status_t s;
+ s = NW_String_CmpToNativeAlignedUCS2 (encoding, charCount, name,
+ (NW_Uint16*)((page->tokens)[names[m]].name),
+ &c);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (c == 0) {
+ *pageToken = (page->tokens)[names[m]].token;
+ return NW_STAT_SUCCESS;
+ }
+ if (c < 0)
+ r = m - 1;
+ else
+ l = m + 1;
+ }
+ return NW_STAT_FAILURE;
+}
+
+static
+NW_Status_t
+getTokenByTag_HandleDuplicates (NW_WBXML_Codepage_t * page,
+ NW_Uint32 encoding,
+ NW_Uint32 charCount,
+ NW_Uint8 * name,
+ NW_Uint16 * pageToken,
+ NW_Bool isName)
+{
+ NW_Byte *names;
+ NW_Int32 i = 0;
+ NW_Uint16 tmpToken;
+
+ if (page == NULL || name == NULL || pageToken == NULL) {
+ return NW_STAT_FAILURE;
+ }
+
+ names = page->names;
+
+ while (i < page->count)
+ {
+ NW_Int32 c;
+ NW_Status_t s;
+ tmpToken = (page->tokens)[names[i]].token;
+ /* If the tag is AttributeTag, then MSB of lower order byte (token)
+ * should be unset. If the tag is AttributeValueTag, then MSB of
+ * lower order byte (token) should be set.
+ */
+ if((isName && !(tmpToken & 0x80)) || (!isName && (tmpToken & 0x80)))
+ {
+ s = NW_String_CmpToNativeAlignedUCS2 (encoding, charCount, name,
+ (NW_Uint16*)((page->tokens)[names[i]].name),
+ &c);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (c == 0) {
+ *pageToken = tmpToken;
+ return NW_STAT_SUCCESS;
+ }
+ }
+ i++;
+ }
+ return NW_STAT_FAILURE;
+}
+
+/*
+ * Dictionary ids are a 1-based index into the dictionary table
+ *
+ * Return NULL if id is < 1 or id is greater than dictionary_count
+ */
+
+static
+NW_WBXML_Dictionary_t *
+getDictionaryById (NW_Uint32 id)
+{
+ NW_WBXML_Dictionary_t *d;
+ NW_WBXML_Dictionary_t **dictionaries = GetDictionaries();
+
+ if (id < 1 || id > GetDictionaryCount())
+ return NULL;
+
+//#ifdef __WINS__
+ d = dictionaries[id - 1];
+//#endif
+
+ return d;
+}
+
+/*
+ * This function checks if the dictionary has already been added
+ * to the 'dictionaries' table. The comparison is based on
+ * puclic ids, and therefore it is important that each dictionary
+ * has unique public id.
+ *
+ */
+static NW_Bool ExistingDictionary(NW_WBXML_Dictionary_t *dictionary)
+{
+//#ifdef __WINS__
+ NW_Uint32 i;
+ NW_Uint32 dictionary_count = GetDictionaryCount();
+ NW_WBXML_Dictionary_t **dictionaries = GetDictionaries();
+
+ for (i=0; i<dictionary_count; i++) {
+ if (dictionaries[i]->public_id == dictionary->public_id) {
+ return NW_TRUE;
+ }
+ }
+//#endif
+ return NW_FALSE;
+}
+
+EXPORT_C NW_Status_t
+NW_WBXML_Dictionary_initialize (NW_Int32 n,
+ NW_WBXML_Dictionary_t * d[])
+{
+ NW_WBXML_Dictionary_t **dictionaries = GetDictionaries();
+
+ /* Make sure that adding dictionaries is done by calling NW_WBXML_Dictionary_add(). */
+ if (dictionaries == NULL)
+ {
+ dictionaries = (NW_WBXML_Dictionary_t **)NW_Mem_Malloc(sizeof(NW_WBXML_Dictionary_t*) * MAX_DICTIONARIES);
+ if (dictionaries == NULL) {
+ DestroyDictionaries();
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+ StoreDictionaries(dictionaries);
+ StoreDictionaryCount(0);
+ }
+ UpdateDictRefCnt(NW_CONTEXT_REF_DICT_CNT_INR);
+ return NW_WBXML_Dictionary_add(n, d);
+}
+
+NW_Status_t
+NW_WBXML_Dictionary_add(NW_Int32 n, NW_WBXML_Dictionary_t* d[])
+{
+ NW_Int32 i;
+ NW_WBXML_Dictionary_t **dictionaries = GetDictionaries();
+
+ if (dictionaries == NULL)
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ NW_ASSERT(n > 0);
+ NW_ASSERT(d != NULL);
+
+ /* This loop adds only the new dictionaries received in the
+ function call (the *d[] table) into the 'dictionaries' table. */
+ for (i=0; i<n; i++) {
+ if (!ExistingDictionary(d[i])) {
+ NW_Uint32 dictionary_count = GetDictionaryCount();
+
+ /* Return error if the table is full */
+ if ((NW_Uint32)GetDictionaryCount() >= MAX_DICTIONARIES) {
+ return NW_STAT_FAILURE;
+ }
+ dictionaries[dictionary_count++] = d[i];
+ StoreDictionaryCount(dictionary_count);
+ }
+ }
+
+ return NW_STAT_SUCCESS;
+}
+
+EXPORT_C NW_Status_t
+NW_WBXML_Dictionary_destroy ()
+{
+ UpdateDictRefCnt(NW_CONTEXT_REF_DICT_CNT_DCR);
+ DestroyDictionaries();
+ return NW_STAT_SUCCESS;
+}
+
+
+/*
+ * Return NULL if GetDictionaryById returns 0 or if GetTagByToken returns 0
+ */
+
+EXPORT_C NW_String_UCS2Buff_t *
+NW_WBXML_Dictionary_getTagByFqToken (NW_Uint32 fq_token)
+{
+ NW_WBXML_Dictionary_t *d;
+ NW_Byte cp_index = (NW_Byte) ((fq_token & NW_WBXML_MASK_CODEPAGE) >> 8);
+ NW_Byte token = (NW_Byte) (fq_token & NW_WBXML_MASK_TOKEN);
+ NW_WBXML_Codepage_t page;
+ NW_Uint16 dict_id = (NW_Uint16) ((fq_token & NW_WBXML_MASK_DICTIONARY) >> 16);
+
+ if ((d = getDictionaryById (dict_id)) == NULL)
+ return NULL;
+
+ if ((fq_token & NW_WBXML_MASK_CPSTATE) == NW_WBXML_CP_STATE_TAG)
+ {
+ if (cp_index > (d->tag_page_count - 1))
+ return NULL;
+ page = d->tag_pages[cp_index];
+ token &= NW_WBXML_MASK_TAG_ID; /* Only lowest 6 bits for tags */
+ }
+ else
+ {
+ if (cp_index > (d->attr_page_count - 1))
+ return NULL;
+ page = d->attr_pages[cp_index];
+ }
+
+
+ return getTagByToken (&page, token);
+}
+
+NW_String_UCS2Buff_t *
+NW_WBXML_Dictionary_getElementNameByToken (NW_WBXML_Dictionary_t *dictionary,
+ NW_Uint16 token)
+{
+ NW_Byte cp_index = (NW_Byte) ((token & NW_WBXML_MASK_CODEPAGE) >> 8);
+ NW_Byte tok = (NW_Byte) (token & NW_WBXML_MASK_TOKEN);
+ NW_WBXML_Codepage_t page;
+
+ if (dictionary == NULL)
+ return NULL;
+
+ if (cp_index > (dictionary->tag_page_count - 1))
+ return NULL;
+ page = dictionary->tag_pages[cp_index];
+ tok &= NW_WBXML_MASK_TAG_ID; /* Only lowest 6 bits for tags */
+ return getTagByToken (&page, tok);
+}
+
+EXPORT_C NW_String_UCS2Buff_t *
+NW_WBXML_Dictionary_getAttributeNameByToken (NW_WBXML_Dictionary_t *dictionary,
+ NW_Uint16 token)
+{
+ NW_Byte cp_index = (NW_Byte) ((token & NW_WBXML_MASK_CODEPAGE) >> 8);
+ NW_Byte tok = (NW_Byte) (token & NW_WBXML_MASK_TOKEN);
+ NW_WBXML_Codepage_t page;
+
+ if (dictionary == NULL)
+ return NULL;
+
+ if (cp_index > (dictionary->attr_page_count - 1))
+ return NULL;
+ page = dictionary->attr_pages[cp_index];
+ return getTagByToken (&page, tok);
+}
+
+/*
+ * These return the lower 16 bits of the fully qualified token
+ * i.e., the token and code page. The rest of the token can be
+ * constructed by the caller if needed. We don't use all 32 bits
+ * in order to be able to return a signed quantity to indicate
+ * failure.
+ */
+
+/*
+ * Return -1 if the token is not found for the given attribute name or if
+ * dictionary or name is 0
+ */
+
+EXPORT_C NW_Int16
+NW_WBXML_Dictionary_getAttributeToken (NW_WBXML_Dictionary_t * dictionary,
+ const NW_String_t* name,
+ NW_Uint32 encoding,
+ NW_Bool matchCase)
+{
+ NW_Int16 token = -1;
+ NW_WBXML_Codepage_t *page;
+ NW_Byte i;
+ NW_Ucs2* ucs2Name;
+ NW_Status_t status;
+
+ if (dictionary == NULL || name == NULL){
+ return -1;
+ }
+ if (encoding != HTTP_iso_10646_ucs_2){
+ status = NW_String_stringToUCS2Char(name, encoding, &ucs2Name);
+ NW_ASSERT(status == NW_STAT_SUCCESS);
+ /* To fix TI compiler warning */
+ (void) status;
+ }
+ else{
+ ucs2Name = (NW_Ucs2*)name->storage;
+ }
+
+ for (i = 0; i < dictionary->attr_page_count; i++)
+ {
+ page = dictionary->attr_pages + i;
+ /* this is a hack - ucs2buff types should be removed */
+ if ((token = getTokenByTag (page, (NW_String_UCS2Buff_t*) ucs2Name, matchCase)) >= 0){
+ token = (NW_Int16) (token | (i << 8));
+ break;
+ }
+ }
+ if (encoding != HTTP_iso_10646_ucs_2){
+ NW_Mem_Free(ucs2Name);
+ }
+ return token;
+}
+
+NW_Status_t
+NW_WBXML_Dictionary_getAttributeToken2 (NW_WBXML_Dictionary_t * dictionary,
+ NW_Uint32 encoding,
+ NW_Uint32 charCount,
+ NW_Uint8 * name,
+ NW_Uint16 * pageToken,
+ NW_Bool isName)
+{
+ NW_WBXML_Codepage_t *page;
+ NW_Byte i;
+ NW_Status_t s;
+
+ if (dictionary == NULL || name == NULL || pageToken == NULL) {
+ return NW_STAT_FAILURE;
+ }
+
+ for (i = 0; i < dictionary->attr_page_count; i++) {
+ page = dictionary->attr_pages + i;
+ s = getTokenByTag2 (page, encoding, charCount, name, pageToken);
+ if (NW_STAT_IS_FAILURE(s)) {
+ /* failure may mean "not found" so continue to next page */
+ continue;
+ }
+ if (isName) {
+ if (*pageToken >= 128) {
+ s = getTokenByTag_HandleDuplicates (page, encoding, charCount, name, pageToken, isName);
+ if (NW_STAT_IS_FAILURE(s)) {
+ /* failure may mean "not found" so continue to next page */
+ continue;
+ }
+ }
+ } else {
+ if (*pageToken < 128) {
+ s = getTokenByTag_HandleDuplicates (page, encoding, charCount, name, pageToken, isName);
+ if (NW_STAT_IS_FAILURE(s)) {
+ /* failure may mean "not found" so continue to next page */
+ continue;
+ }
+ }
+ }
+ *pageToken |= (i << 8);
+ return NW_STAT_SUCCESS;
+ }
+ return NW_STAT_FAILURE;
+}
+
+NW_Status_t
+NW_WBXML_Dictionary_getAttributeNameToken (NW_WBXML_Dictionary_t * dictionary,
+ NW_Uint32 encoding,
+ NW_Uint32 charCount,
+ NW_Uint8 * name,
+ NW_Uint16 * pageToken)
+{
+ return NW_WBXML_Dictionary_getAttributeToken2 (dictionary, encoding,
+ charCount, name, pageToken,
+ NW_TRUE);
+
+}
+
+NW_Status_t
+NW_WBXML_Dictionary_getAttributeValueToken (NW_WBXML_Dictionary_t * dictionary,
+ NW_Uint32 encoding,
+ NW_Uint32 charCount,
+ NW_Uint8 * name,
+ NW_Uint16 * pageToken)
+{
+ return NW_WBXML_Dictionary_getAttributeToken2 (dictionary, encoding,
+ charCount, name, pageToken,
+ NW_FALSE);
+
+}
+
+/*
+ * Return -1 if the token is not found for the given tag name or if
+ * dictionary or name is 0
+ */
+
+EXPORT_C NW_Int16
+NW_WBXML_Dictionary_getTagToken (NW_WBXML_Dictionary_t * dictionary,
+ NW_String_UCS2Buff_t * name,
+ NW_Bool matchCase)
+{
+ NW_Int16 token = 0;
+ NW_WBXML_Codepage_t *page;
+ NW_Byte i;
+
+ if (dictionary == NULL || name == NULL)
+ return -1;
+
+ for (i = 0; i < dictionary->tag_page_count; i++)
+ {
+ page = dictionary->tag_pages + i;
+ if ((token = getTokenByTag (page, name, matchCase)) >= 0)
+ return (NW_Int16)(token | (i << 8));
+ }
+
+ return -1;
+}
+
+NW_Status_t
+NW_WBXML_Dictionary_getTagToken2(NW_WBXML_Dictionary_t * dictionary,
+ NW_Uint32 encoding,
+ NW_Uint32 charCount,
+ NW_Uint8* name,
+ NW_Uint16* pageToken)
+{
+ NW_WBXML_Codepage_t *page;
+ NW_Byte i;
+ NW_Status_t s;
+
+ if (dictionary == NULL || name == NULL || pageToken == NULL) {
+ return NW_STAT_FAILURE;
+ }
+
+ for (i = 0; i < dictionary->tag_page_count; i++) {
+ page = dictionary->tag_pages + i;
+ s = getTokenByTag2 (page, encoding, charCount, name, pageToken);
+ if (NW_STAT_IS_FAILURE(s)) {
+ /* failure may mean "not found" so continue to next page */
+ continue;
+ }
+ *pageToken |= (i << 8);
+ return NW_STAT_SUCCESS;
+ }
+ return NW_STAT_FAILURE;
+}
+
+/* Linear searches are ok here since we only do these once */
+
+/*
+ * Return NULL if a dictionary is not found for the given public_id
+ */
+
+EXPORT_C
+NW_WBXML_Dictionary_t *
+NW_WBXML_Dictionary_getByPublicId (NW_Uint32 public_id)
+{
+//#ifdef __WINS__
+ NW_Uint32 i;
+ NW_Uint32 dictionary_count = GetDictionaryCount();
+ NW_WBXML_Dictionary_t **dictionaries = GetDictionaries();
+
+ for (i = 0; i < dictionary_count; i++)
+ {
+ if (dictionaries[i]->public_id == public_id)
+ return dictionaries[i];
+ }
+//#endif
+ return NULL;
+}
+
+/*
+ * Return NULL if a dictionary is not found for the given doc_type or if
+ * doc_type is 0
+ */
+
+NW_WBXML_Dictionary_t *
+NW_WBXML_Dictionary_getByDocType (NW_String_t * doc_type, NW_Uint32 encoding)
+{
+//#ifdef __WINS__
+ NW_Uint32 i;
+ NW_Uint32 dictionary_count = GetDictionaryCount();
+ NW_WBXML_Dictionary_t **dictionaries = GetDictionaries();
+
+ if (doc_type == NULL)
+ return NULL;
+
+ for (i = 0; i < dictionary_count; i++)
+ {
+ if (NW_WBXML_Dictionary_CmpDictDocType(dictionaries[i], doc_type, encoding)){
+ return dictionaries[i];
+ }
+ }
+//#endif
+ return NULL;
+}
+
+/* Get the 1-based index into the dictionary table */
+
+/*
+ * Return 0 if the dictionary is not found
+ */
+
+NW_Uint32
+NW_WBXML_Dictionary_getIndexByPublicId (NW_Uint32 public_id)
+{
+//#ifdef __WINS__
+ NW_Uint32 i;
+ NW_Uint32 dictionary_count = GetDictionaryCount();
+ NW_WBXML_Dictionary_t **dictionaries = GetDictionaries();
+
+ for (i = 0; i < dictionary_count; i++)
+ {
+ if (dictionaries[i]->public_id == public_id)
+ return i + 1;
+ }
+//#endif
+ return 0;
+}
+
+/*
+ * Return 0 if the dictionary is not found or doc_type is 0
+ */
+
+NW_Uint32
+NW_WBXML_Dictionary_getIndexByDocType (NW_String_t * doc_type, NW_Uint32 encoding)
+{
+//#ifdef __WINS__
+ NW_Uint32 i;
+ NW_Uint32 dictionary_count = GetDictionaryCount();
+ NW_WBXML_Dictionary_t **dictionaries = GetDictionaries();
+
+ if(doc_type == NULL){
+ return 0;
+ }
+
+ for (i = 0; i < dictionary_count; i++) {
+ if (NW_WBXML_Dictionary_CmpDictDocType(dictionaries[i], doc_type, encoding)){
+ return i + 1;
+ }
+ }
+//#endif
+ return 0;
+}
+
+NW_WBXML_Dictionary_t *
+NW_WBXML_Dictionary_getByIndex(NW_Uint32 dictIndex)
+{
+//#ifdef __WINS__
+ NW_WBXML_Dictionary_t **dictionaries = GetDictionaries();
+
+ if (dictIndex == 0){
+ return NULL;
+ }
+ return dictionaries[dictIndex -1];
+//#else
+// return NULL;
+//#endif
+}
+
+/*
+ * Given a tag or attribute token, if the token is a literal,
+ * use the given name to lookup the tag/attribute's "real" token
+ * and return that token.
+ *
+ *
+ * Returns NW_STAT_SUCCESS
+ * NW_STAT_FAILURE - if the token lookup fails (NOT fatal)
+ * NW_STAT_OUT_OF_MEMORY
+ */
+
+EXPORT_C NW_Status_t
+NW_WBXML_Dictionary_resolveLiteralToken(NW_Uint32 *token, /* In/Out */
+ NW_String_t *name, /* Ask Deepika why NULL is allowed */
+ NW_Bool is_tag, /* NW_TRUE == token is for tag;
+ NW_FALSE == attribute */
+ NW_Uint32 encoding, /* Used in the name conversion */
+ NW_Bool matchCase)
+{
+
+ NW_Ucs2 * buff;
+ NW_Uint32 dict_id = ((*token) & NW_WBXML_MASK_DICTIONARY) >> 16;
+ NW_Int16 tmp_token;
+
+ if (NW_WBXML_Dictionary_getTagByFqToken(*token) != NULL){
+ /* The token is NOT a literal, no need for further processing */
+ return NW_STAT_SUCCESS;
+ }
+
+ if(name == NULL){ /* TODO: Ask Deepika if this can be made an assert?? */
+ return NW_STAT_FAILURE;
+ }
+
+ /*
+ * Before looking up the name in the dictionary, must convert
+ * name to the type used in dictionary names.
+ */
+
+ if (NW_String_stringToUCS2Char(name, encoding, &buff) != NW_STAT_SUCCESS) {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ tmp_token = (NW_Int16) ((is_tag == NW_TRUE) ?
+ NW_WBXML_Dictionary_getTagToken(getDictionaryById(dict_id), (NW_String_UCS2Buff_t *) buff, matchCase) :
+ NW_WBXML_Dictionary_getAttributeToken(getDictionaryById(dict_id), name, encoding, matchCase));
+
+ NW_Mem_Free (buff);
+
+ if (tmp_token == -1)
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ *token = ((NW_Uint16) dict_id << 16)| (NW_Uint16) tmp_token;
+
+ return NW_STAT_SUCCESS;
+}
+
+
+/* 1. returns success, oom, or failure
+ 2. if oom or failure, no leaks and no residual memory allocations
+ 3. if oom or failure on return *ppDocType is NULL
+ 4 if success on return *ppDocType is a valid string or NULL if
+ no matching dictionary or dictionary did not have a doc_type string. */
+NW_Status_t
+NW_WBXML_Dictionary_publicId_to_doctypeString(NW_Uint32 publicId,
+ NW_String_t** ppDocType)
+{
+ NW_WBXML_Dictionary_t *pDictionary
+ = NW_WBXML_Dictionary_getByPublicId (publicId);
+ *ppDocType = NULL;
+ if (pDictionary != NULL) {
+ if (pDictionary->doc_type != NULL) {
+ *ppDocType = NW_String_new();
+ if (*ppDocType != NULL) {
+ if (NW_String_initialize(*ppDocType, pDictionary->doc_type,
+ NW_WBXML_DICTIONARY_CHARSET)
+ != NW_STAT_SUCCESS) {
+ NW_String_delete(*ppDocType);
+ *ppDocType = NULL;
+ return NW_STAT_FAILURE;
+ }
+ } else {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+ }
+ }
+ return NW_STAT_SUCCESS;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/wbxmlp/src/doc.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,213 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/*****************************************************************
+** File: wbxml_doc.c
+** Description:
+*****************************************************************/
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_wbxml_document.h>
+#include <xml/cxml/nw_string_char.h>
+#include <xml/cxml/nw_encoder_stringtable.h>
+
+
+EXPORT_C NW_Status_t
+NW_WBXML_Document_construct(NW_WBXML_Document_t * doc, NW_Uint32 default_public_id)
+{
+ doc->version = 0;
+ doc->publicid = 0;
+ doc->doc_type = NULL;
+ doc->default_public_id = default_public_id;
+ doc->charset = 0;
+ doc->strtbl.length = 0;
+ doc->strtbl.data = 0;
+ doc->body_len = 0;
+ doc->strtbl_extension = NW_Encoder_StringTable_new();
+ if (doc->strtbl_extension == NULL){
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/* There is no document construct, since initialization is done by
+ * the parser
+ */
+
+EXPORT_C void
+NW_WBXML_Document_destruct (NW_WBXML_Document_t * doc)
+{
+ if (doc == NULL) {
+ return;
+ }
+
+ if (doc->doc_type) {
+ NW_String_delete (doc->doc_type);
+ doc->doc_type = NULL;
+ }
+
+ NW_Encoder_StringTable_delete(doc->strtbl_extension);
+}
+
+/*
+ * Safely get a string from the string table
+ *
+ * RETURN NULL if an error occurs and sets parser->flags accordingly
+ */
+
+
+EXPORT_C NW_Status_t
+NW_WBXML_Document_getTableString (NW_WBXML_Document_t * doc,
+ NW_Uint32 index,
+ NW_String_t *string)
+{
+
+ NW_ASSERT(doc != NULL);
+ NW_ASSERT(string != NULL);
+
+ if (index >= doc->strtbl.length){
+ /* See if there are extended table members */
+ if(NW_Encoder_StringTable_GetSize(doc->strtbl_extension) != 0)
+ {
+ NW_Status_t status;
+ NW_Encoder_StringTableIterator_t extTblIter;
+ NW_Uint32 strTblItrByteCnt = 0;
+ NW_Uint32 startingExtTblByteCnt = 0;
+ NW_Uint8* indexBuf;
+ NW_Uint32 extensionTblInx = index - doc->strtbl.length;
+ NW_Bool found = NW_FALSE;
+
+ /* NW_Encoder_StringTable_get(..) requires the vector item
+ * index not the absolute extension string table index (as
+ * passed parameter [NW_Uint32 index]). So, itertor method
+ * is used to get the string.
+ *
+ */
+
+ /*The following function always return success so why bother to check? */
+
+ NW_Encoder_StringTable_StringTableIterateInit(doc->strtbl_extension,&extTblIter);
+
+ status = NW_Encoder_StringTable_StringTableIterateNext
+ (&extTblIter,&strTblItrByteCnt,&indexBuf);
+
+
+ while(status == NW_STAT_WBXML_ITERATE_MORE)
+ {
+
+ if(startingExtTblByteCnt == extensionTblInx)
+ {
+ found = NW_TRUE;
+ break;
+ }
+
+ startingExtTblByteCnt += strTblItrByteCnt;
+
+ status = NW_Encoder_StringTable_StringTableIterateNext
+ (&extTblIter,&strTblItrByteCnt,&indexBuf) ;
+ }//end while
+
+
+ if(found == NW_TRUE)
+ {
+ string->storage = indexBuf;
+ string->length = strTblItrByteCnt;
+ return NW_STAT_SUCCESS;
+ }
+ }
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+
+ /* Make sure string ends within string table */
+
+ if (!NW_String_valid(doc->strtbl.data + index, doc->strtbl.length - index,
+ doc->charset))
+ {
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+
+ return NW_String_initialize (string, doc->strtbl.data + index, doc->charset);
+}
+
+/* String table write method
+ *
+ * Writing a dom tree may require adding strings to the string table,
+ * if one exists, or creating a string table if none exists. We create
+ * an extended table using the encoder string table write methods if
+ * this is necessary. Unfortunately, there can be some duplication of
+ * strings between the two tables, because there is no efficient way to
+ * look up a string by name in the real string table. Therefore, any
+ * string that gets added to the table gets added to the extension
+ * table. The encoder takes care of rationalizing the two tables if
+ * the document gets rewritten as wbxml.
+ *
+ * If the string is not already in the table, this method adds it. The
+ * out parameter byteOffset returns the byte offset of the string in the
+ * extension table plus the size of the real string table so that
+ * extension table strings always have positions higher than real table
+ * strings.
+ */
+EXPORT_C NW_Status_t
+NW_WBXML_Document_putTableString(NW_WBXML_Document_t * doc,
+ NW_String_t *string,
+ NW_Uint32 *byteOffset)
+{
+ NW_Uint32 extensionOffset;
+ NW_Status_t retval =
+ NW_Encoder_StringTable_append(doc->strtbl_extension,
+ string,
+ NW_TRUE,
+ &extensionOffset);
+ *byteOffset = doc->strtbl.length + extensionOffset;
+ return retval;
+}
+
+NW_Uint8
+NW_WBXML_Document_getVersion(NW_WBXML_Document_t *document)
+{
+ NW_ASSERT(document != NULL);
+ return document->version;
+}
+
+NW_Uint32
+NW_WBXML_Document_getPublicID(NW_WBXML_Document_t *document)
+{
+ NW_ASSERT(document != NULL);
+ return document->publicid;
+}
+
+NW_String_t*
+NW_WBXML_Document_getDocType(NW_WBXML_Document_t *document)
+{
+ NW_ASSERT(document != NULL);
+ return document->doc_type;
+}
+
+NW_Uint32
+NW_WBXML_Document_getEncoding(NW_WBXML_Document_t *document)
+{
+ NW_ASSERT(document != NULL);
+ return document->charset;
+}
+
+
+
+
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/wbxmlp/src/opaque.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/*****************************************************************
+** File: opaque.c
+** Description: Methods on WBXML opaque data objects
+*****************************************************************/
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_wbxml_opaque.h>
+
+/*
+ * Initialize an opaque object
+ *
+ */
+
+NW_Status_t
+NW_WBXML_Opaque_construct(NW_WBXML_Opaque_t * opaque,
+ NW_Byte * data,
+ NW_Uint32 length)
+{
+
+ NW_ASSERT(opaque != NULL);
+
+ opaque->length = length;
+ opaque->data = (length ? data : NULL);
+
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Create a new opaque structure
+ */
+
+NW_WBXML_Opaque_t *
+NW_WBXML_Opaque_new (void)
+{
+ NW_WBXML_Opaque_t *opaque =
+ (NW_WBXML_Opaque_t *) NW_Mem_Malloc (sizeof (NW_WBXML_Opaque_t));
+
+ if(opaque != NULL){
+ NW_WBXML_Opaque_construct(opaque,0,0);
+ }
+
+ return opaque;
+}
+
+
+
+/*
+ * Delete an opaque structure
+ */
+
+NW_Status_t
+NW_WBXML_Opaque_delete (NW_WBXML_Opaque_t * opaque)
+{
+
+ NW_ASSERT(opaque != NULL);
+
+ /* The data member is a pointer to memory we
+ * don't own, so it is not freed here
+ */
+
+ NW_Mem_Free(opaque);
+
+ return NW_STAT_SUCCESS;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/wbxmlp/src/parse_buffer.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,457 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/*****************************************************************
+** File: wbxml_parse_buffer.c
+** Description:
+*
+* A buffer-based implementation of the "parser_reader interface".
+* To create a parser that gets wbxml from some other source (such
+* as reading from a stream), these are the only functions that should
+* have to be ported. wbxml_parse.c contains implementation of the
+* parsing logic, independent of how wbxml is read/stored (with a few
+* small exceptions).
+*
+* The parser reader is responsible for safely getting various primitive
+* data types and in-line strings from the wbxml NW_Byte code. The reader
+* also returns a pointer to the string table (which in this case is
+* just a pointer into the wbxml buffer.)
+*
+*****************************************************************/
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_wbxml_reader.h>
+#include <xml/cxml/nw_wbxml_dictionary.h>
+#include <xml/cxml/nw_wbxml_event.h>
+#include <xml/cxml/nw_wbxml_token.h>
+#include <xml/cxml/nw_wbxml_opaque.h>
+#include "nw_wbxml_parsei.h"
+#include <xml/cxml/nw_string_char.h>
+#include <xml/cxml/nw_tinydom.h>
+
+/*
+ * Initialize the parser
+ */
+
+EXPORT_C void
+NW_WBXML_Parser_newInPlace (NW_WBXML_Parser_t * parser)
+{
+ NW_ASSERT(parser != NULL);
+
+ parser->handler = NULL;
+ parser->flags = 0;
+ parser->state = NW_WBXML_PARSER_S_START;
+ parser->tag_code_page = 0;
+ parser->attribute_code_page = 0;
+ parser->cp_registry.storage = NULL;
+ parser->cp_registry.current = 0;
+ parser->cp_registry.count = 0;
+ parser->dictionary = 0;
+ parser->doc = NULL;
+ parser->p = NULL;
+ parser->offset = 0;
+ parser->left = 0;
+ parser->status = NW_STAT_SUCCESS;
+ parser->recursiveCallCnt = 0;
+ parser->ext_t_not_table_index = 0;
+}
+
+
+void
+NW_WBXML_Parser_reset (NW_WBXML_Parser_t * parser)
+{
+ NW_ASSERT(parser != NULL);
+
+ parser->handler = NULL;
+ parser->state = NW_WBXML_PARSER_S_START;
+ parser->tag_code_page = 0;
+ parser->attribute_code_page = 0;
+ parser->p = NULL;
+ parser->offset = 0;
+ parser->left = 0;
+ parser->status = NW_STAT_SUCCESS;
+ parser->recursiveCallCnt = 0;
+}
+
+void
+NW_WBXML_Parser_delete (NW_WBXML_Parser_t * parser)
+{
+ if (parser->cp_registry.storage != NULL) {
+ NW_Mem_Free(parser->cp_registry.storage);
+ }
+}
+
+
+/*
+* Safely advance the parser through bytecode.
+* The functions which read values from the parser don't advance
+* the parser since this may not be necessary or safe (e.g. when reading
+* the last data item.).
+*
+* "Count" may equal "left" so zero is a possible "left" value.
+*/
+
+NW_Int32
+NW_WBXML_Parser_advance (NW_WBXML_Parser_t * parser,
+ NW_Int32 count)
+{
+ NW_ASSERT(parser != NULL);
+
+ if ((count > (NW_Int32) parser->left)
+ || (((NW_Int32)parser->offset + count) < 0)){
+ return -1;
+ }
+ parser->p += count;
+ parser->offset = (NW_Uint32) ((NW_Int32)parser->offset + count);
+ parser->left = (NW_Uint32) ((NW_Int32) parser->left - count);
+ return count;
+}
+
+/* Get the current offset */
+
+NW_Uint32
+NW_WBXML_Parser_getOffset(NW_WBXML_Parser_t * parser)
+{
+ NW_ASSERT(parser != NULL);
+
+ return parser->offset;
+}
+
+/* Safely set the parser to a new offset */
+
+NW_Int32
+NW_WBXML_Parser_setOffset(NW_WBXML_Parser_t * parser,
+ NW_Uint32 offset)
+{
+ NW_Int32 count =
+ (NW_Int32)offset - (NW_Int32)NW_WBXML_Parser_getOffset(parser);
+
+ NW_ASSERT(parser != NULL);
+
+ /* If the code page registry exists and is inited, reset code pages */
+ if((parser->cp_registry.count > 0)
+ && ((parser->flags & NW_WBXML_REGISTRY_INIT) == NW_WBXML_REGISTRY_INIT)){
+ NW_WBXML_CPRegistry_getCodePages(&(parser->cp_registry),
+ offset,
+ &(parser->tag_code_page),
+ &(parser->attribute_code_page));
+ }
+
+ /*
+ * Try to "advance" the parser to the new position. This will fail
+ * if the offset is not in the parser's current buffer.
+ */
+
+ return NW_WBXML_Parser_advance(parser, count);
+}
+
+
+/* Check if there is more NW_Byte code to read */
+
+NW_Int32
+NW_WBXML_Parser_hasMoreBytecode (NW_WBXML_Parser_t * parser)
+{
+ NW_ASSERT(parser != NULL);
+
+ return (parser->left > 0);
+}
+
+
+/*
+ * Read one unsigned NW_Byte from the current parser position.
+ */
+
+NW_Uint8
+NW_WBXML_Parser_readUint8 (NW_WBXML_Parser_t * parser)
+{
+ NW_ASSERT(parser != NULL);
+
+ return (NW_Uint8) (*(parser->p));
+}
+
+
+/*
+ * Safely read an unsigned_32 from the current parser position
+ */
+
+NW_Int32
+NW_WBXML_Parser_readMbUint32 (NW_WBXML_Parser_t * parser,
+ NW_Uint32 * val)
+{
+ NW_Uint32 i, space, next;
+
+ NW_ASSERT(parser != NULL);
+
+ space = parser->left;
+
+ for (i = 0, *val = 0;; i++, *val <<= 7)
+ {
+ if (i > 4 || i == space)
+ {
+ return -1;
+ }
+ next = (parser->p)[i];
+ if (!(next & 0x80))
+ {
+ *val |= next;
+ break;
+ }
+ else
+ *val |= (next &= 0x7F);
+ }
+ return (NW_Int32)(i + 1);
+}
+
+/*
+ * Safely get the length of an inline string at current parser position
+ */
+
+NW_Int32 NW_WBXML_Parser_getInlineStrLen(NW_WBXML_Parser_t *parser,
+ NW_WBXML_Document_t *doc)
+{
+ NW_Uint32 len = 0;
+
+ NW_ASSERT(parser != NULL);
+
+ if (!NW_String_valid(parser->p, parser->left, doc->charset)) {
+ return -1;
+ }
+
+ if(NW_String_charBuffGetLength (parser->p, doc->charset, &len) < 0){
+ return -1;
+ }
+ return (NW_Int32)len;
+}
+
+/*
+ * Safely read an inline string at the current parser position
+ */
+
+EXPORT_C NW_Status_t
+NW_WBXML_Parser_getStringInline (NW_WBXML_Parser_t * parser,
+ NW_WBXML_Document_t * doc,
+ NW_String_t *string)
+{
+ NW_ASSERT(parser != NULL);
+ NW_ASSERT(doc != NULL);
+ NW_ASSERT(string != NULL);
+
+ if (!NW_String_valid (parser->p, parser->left, doc->charset))
+ {
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+
+ if (NW_String_initialize (string, parser->p, doc->charset)
+ != NW_STAT_SUCCESS){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+
+/*
+ * Safely get an opaque at the current parser position
+ */
+
+EXPORT_C NW_Status_t
+NW_WBXML_Parser_getOpaque (NW_WBXML_Parser_t * parser,
+ NW_Uint32 length,
+ NW_WBXML_Opaque_t *opaque)
+{
+ NW_ASSERT(parser != NULL);
+ NW_ASSERT(length != 0);
+ NW_ASSERT(opaque != NULL);
+
+ if (length > parser->left){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+
+ return NW_WBXML_Opaque_construct (opaque, parser->p, length);
+}
+
+/*
+ * Read in the string table
+ */
+
+NW_Status_t
+NW_WBXML_Parser_readStringTable (NW_WBXML_Parser_t * parser,
+ NW_WBXML_Document_t * doc,
+ NW_Byte **table)
+{
+ NW_Int32 skip;
+
+ NW_ASSERT(parser != NULL);
+ NW_ASSERT(doc != NULL);
+ NW_ASSERT(table != NULL);
+
+ *table = NULL;
+
+ /* Read the string table length into the document header */
+
+ skip = NW_WBXML_Parser_readMbUint32 (parser, &(doc->strtbl.length));
+ if (skip < 0) {
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+
+ /* Try to advance over the length bytes to beginning of table */
+
+ if (NW_WBXML_Parser_advance (parser, skip) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+
+ /* Set table to current parser location*/
+
+ *table = parser->p;
+
+ /* Try to advance to end of table */
+
+ if (NW_WBXML_Parser_advance (parser, (NW_Int32) doc->strtbl.length) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+
+ return NW_STAT_SUCCESS;
+}
+
+
+/* Reset the parser to the start of a buffer. The buffsize is
+ * critical here since it is used in all safety tests by the
+ * parser reader to make sure the parser doesn't read past the
+ * end of the buffer.
+ */
+
+NW_Status_t
+NW_WBXML_Parser_resetBuffer(NW_WBXML_Parser_t *parser,
+ NW_Byte *buff,
+ NW_Uint32 buffsize)
+{
+ NW_ASSERT(parser != NULL);
+
+ parser->offset = 0;
+ parser->p = buff;
+ if (buffsize == 0 || buff == NULL) {
+ parser->left = 0;
+ }
+ else {
+ parser->left = buffsize;
+ }
+ parser->tag_code_page = 0;
+ parser->attribute_code_page = 0;
+ parser->state = NW_WBXML_PARSER_S_HEADER;
+ parser->recursiveCallCnt = 0;
+ return NW_STAT_SUCCESS;
+}
+
+
+/*
+ * This method sets the parser to a buffer which may contain only
+ * wbxml fragments and no header. Used by writable DOM only.
+ *
+ */
+
+NW_Status_t
+NW_WBXML_Parser_setBuffer (NW_WBXML_Parser_t * parser,
+ NW_WBXML_Document_t * doc,
+ NW_Byte * buff,
+ NW_Uint32 buffsize)
+{
+ NW_ASSERT(parser != NULL);
+ NW_ASSERT(doc != NULL);
+ NW_ASSERT(buff != NULL);
+ NW_ASSERT(buffsize > 0);
+
+ /* Find dictionary from document */
+
+ if (doc->publicid > 0){
+ parser->dictionary =
+ NW_WBXML_Dictionary_getIndexByPublicId (doc->publicid);
+ }
+ else if (doc->doc_type){
+ parser->dictionary =
+ NW_WBXML_Dictionary_getIndexByDocType (doc->doc_type, doc->charset);
+ }
+ else{
+ NW_ASSERT(0); /* Doc not correctly initialized */
+ }
+
+ /* Set the buffer */
+
+ NW_WBXML_Parser_resetBuffer(parser, buff, buffsize);
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Parse a document from a buffer
+ */
+
+EXPORT_C NW_Status_t
+NW_WBXML_Parser_parseBuffer (NW_WBXML_Parser_t * parser,
+ NW_WBXML_Document_t * doc,
+ NW_Byte * buff,
+ NW_Uint32 buffsize)
+{
+ NW_Status_t status;
+
+ NW_ASSERT(parser != NULL);
+ NW_ASSERT(doc != NULL);
+ NW_ASSERT(buff != NULL);
+ NW_ASSERT(buffsize > 0);
+
+ if (parser->p == NULL)
+ {
+ parser->p = buff;
+ parser->left = buffsize;
+
+ /* First parser the document header */
+
+ if ((status = NW_WBXML_Parser_docHeaderParse (parser, doc))
+ != NW_STAT_SUCCESS)
+ return status;
+
+ /* Now get the dictionary from the document */
+
+ if (doc->publicid > 0){
+ parser->dictionary =
+ NW_WBXML_Dictionary_getIndexByPublicId (doc->publicid);
+ }
+
+ else if (doc->doc_type){
+ parser->dictionary =
+ NW_WBXML_Dictionary_getIndexByDocType (doc->doc_type, doc->charset);
+ }
+
+ /* If a dictionary could not be attained try using the default public id */
+ if (parser->dictionary == 0){
+ doc->publicid = doc->default_public_id;
+ parser->dictionary =
+ NW_WBXML_Dictionary_getIndexByPublicId (doc->publicid);
+ }
+
+ /* Make the StartDocument callback */
+ if (parser->handler && parser->handler->StartDocument_CB)
+ {
+ status = (*(parser->handler->StartDocument_CB)) (parser, doc,
+ parser->context);
+ if (status != NW_STAT_SUCCESS)
+ return status;
+ }
+ }
+
+ /* Parse the document body */
+
+ return NW_WBXML_Parser_bodyParse (parser);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/wbxmlp/src/parse_logic.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,1651 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/*****************************************************************
+** File: wbxml_parse_logic.c
+**
+** Description:
+*
+* Here is the main parser logic. None of these functions has
+* any knowlege of how wbxml is stored or read, so they should
+* work as well with a buffer, stream or file based parser. These
+* functions require some implementation of the "parser reader
+* interface" as defined in wbxml_reader.h.
+*
+*****************************************************************/
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_wbxml_token.h>
+#include <xml/cxml/nw_wbxml_dictionary.h>
+#include <xml/cxml/nw_wbxml_document.h>
+#include <xml/cxml/nw_wbxml_event.h>
+#include <xml/cxml/nw_wbxml_reader.h>
+#include "nw_wbxml_parsei.h"
+#include <xml/cxml/nw_string_char.h>
+
+#ifndef HTTP_utf_8
+#define HTTP_utf_8 0x6A
+#endif
+
+#define TOKEN_STATE_TAG 0
+#define TOKEN_STATE_ATTR 1
+
+#define WBXML_MAX_RECURSIVE_CALL_DEPTH 120 /* For parse element only */
+
+/* The parser tries to be very strict about errors caused by bad NW_Byte
+ * code, lack of memory, etc. For example, the parser will not read
+ * past the end of the buffer. Callbacks can also set error status to
+ * stop parsing. These will be detected as soon as possible after the
+ * callback returns. The following method is called with the return
+ * value (NW_Status_t) from the callback functions. The status is
+ * saved and if it is not NW_STAT_SUCCESS, then the parser's flags
+ * field is updated so that the parser will know that a callback has
+ * raised an exception/error condition. The parser will quit as soon
+ * as it checks the flags.
+ */
+
+static void
+NW_WBXML_Parser_setStatus (NW_WBXML_Parser_t * parser,
+ NW_Status_t status)
+{
+ parser->status = status;
+
+ switch (status)
+ {
+ case NW_STAT_SUCCESS:
+ break;
+ case NW_STAT_OUT_OF_MEMORY:
+ parser->flags |= NW_WBXML_PARSER_NOMEMORY;
+ break;
+ case NW_STAT_WBXML_ERROR_BYTECODE:
+ parser->flags |= NW_WBXML_PARSER_BYTECODEERROR;
+ break;
+ case NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED:
+ parser->flags |= NW_WBXML_PARSER_CHARSET_UNSUPPORTED;
+ break;
+ default:
+ parser->flags |= NW_WBXML_PARSER_UNKNOWN_ERROR;
+ break;
+ }
+ return;
+}
+
+/*
+ * Convert the parser's flag status code to a NW_Status_t constant
+ */
+
+static NW_Status_t
+NW_WBXML_Parser_flagToStatus (NW_WBXML_Parser_t * parser)
+{
+ if (parser->flags & NW_WBXML_PARSER_NOMEMORY)
+ return NW_STAT_OUT_OF_MEMORY;
+
+ if (parser->flags & NW_WBXML_PARSER_BYTECODEERROR)
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+
+ if (parser->flags & NW_WBXML_PARSER_CHARSET_UNSUPPORTED)
+ return NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED;
+
+ return parser->status;
+}
+
+
+#define GET_STATE(parser) ((parser)->state & NW_WBXML_PARSER_S_MASK)
+#define SET_STATE(parser, st) \
+ ((parser)->state = (~NW_WBXML_PARSER_S_MASK & parser->state) | (st))
+
+#define CHECK_PARSER_STATUS \
+ if((parser->flags & NW_WBXML_PARSER_S_MASK) != NW_WBXML_PARSER_OK) \
+ return NW_WBXML_Parser_flagToStatus(parser)
+
+
+/*
+* Create an uninitialized code page registry. As long as the registry is not
+* created, it will be ignored. Once it has been created, the parser will check
+* the REGISTRY_INIT flag. If this is not set, the registry will be initialized
+* as the parser runs. If this is set, then the registry will be consulted when
+* updating the offset.
+*/
+
+NW_Status_t
+NW_WBXML_Parser_addCPRegistry(NW_WBXML_Parser_t* parser,
+ NW_WBXML_CP_Registry_Entry_t* storage,
+ NW_Int32 count)
+{
+ NW_ASSERT(parser != NULL);
+ NW_ASSERT(storage != NULL);
+
+ parser->cp_registry.storage = storage;
+ parser->cp_registry.current = storage;
+ parser->cp_registry.count = count;
+ // WLIU_DEBUG: parser->cp_registry.realcount = 0;
+ parser->state &= ~NW_WBXML_REGISTRY_INIT; /* Make sure flag is not set */
+ return NW_STAT_SUCCESS;
+}
+
+static void
+NW_WBXML_CPRegistry_addEntry(NW_WBXML_CP_Registry_t *registry ,
+ NW_Uint8 code_page,
+ NW_Uint32 offset, /* must point to switch_page token */
+ NW_Uint8 token_state)
+{
+ NW_ASSERT(registry != NULL);
+ NW_ASSERT(registry->current < (registry->storage + registry->count));
+
+ /* ignoring page type (tag or attribute) check that registry is in
+ increasing order of offset so that the algorith in
+ NW_WBXML_CPRegistry_getCodePages() works */
+ NW_ASSERT((registry->current > registry->storage) ?
+ (offset > (registry->current - 1)->start_offset)
+ : 1);
+ /* Each entry must record if it is for tokens or attributes. A
+ trick to encode this without extra memory relies on the use of two
+ bytes in WBXML to encode a page switch. With two bytes one has an
+ even offset and one an odd offset. We pick the even if it is a tag
+ page and the odd offset if it is an attribute page. */
+ if (token_state == TOKEN_STATE_TAG) {
+ if (offset & 1) { /* if it is odd, advance one to make it even */
+ offset++;
+ }
+ } else {
+ NW_ASSERT(token_state == TOKEN_STATE_ATTR);
+ if ((offset & 1) == 0) { /* if it is even, advance one to make it odd */
+ offset++;
+ }
+ }
+ registry->current->start_offset = offset;
+ registry->current->code_page = code_page;
+
+ //if(registry->current < (registry->storage + registry->count - 1)){
+ registry->current++;
+ // WLIU_DEBUG: registry->realcount++;
+ //
+}
+
+void
+NW_WBXML_CPRegistry_getCodePages(NW_WBXML_CP_Registry_t* registry,
+ NW_Uint32 offset,
+ NW_Uint8 *tag_code_page,
+ NW_Uint8 *attribute_code_page)
+{
+ NW_WBXML_CP_Registry_Entry_t* entry;
+
+ NW_ASSERT(registry != NULL);
+
+ *tag_code_page = 0;
+ *attribute_code_page = 0;
+ for (entry = registry->storage;
+ entry < (registry->storage + registry->count);
+ entry++){
+ /* assume that the entries are in increasing offset order */
+ NW_ASSERT((entry > registry->storage) ?
+ (entry->start_offset > (entry - 1)->start_offset)
+ : 1);
+
+ if(offset > entry->start_offset) {
+ if(entry->start_offset & 1) {
+ /* odd offset indicates attributes */
+ *attribute_code_page = entry->code_page;
+ } else {
+ /* even offset indicates tokens */
+ *tag_code_page = entry->code_page;
+ }
+ } else {
+ break; /* early out */
+ }
+ }
+}
+
+
+/*
+ This function parses "version publicid charset strtbl" which is a
+ sequence that comprises the "header" of a WBXML document.
+
+ From specification WAP-192-WBXML-20010725-a, Version 1.3, 25 July 2001,
+ section 5.3 BNF for Document Structure:
+
+ start = version publicid charset strtbl body
+ version = u_int8 // WBXML version number
+ publicid = mb_u_int32 | ( zero index )
+ charset = mb_u_int32
+ strtbl = length *byte
+ length = mb_u_int32
+
+ The "version" specifies the WBXML specification version. The
+ version byte contains the major version minus one in the upper
+ four bits and the minor version in the lower four bits. For
+ example, the version number 1.3 would be encoded as 0x03.
+
+ The first form of publicid is a multi-byte positive integer value,
+ greater than zero, representing a well-known XML document type given
+ an assigned value. See table at section 7.2.1 or try
+ http://www.wapforum.org/wina/wbxml-public-docid.htm
+ Note that 0x01 is used for "unknown or missing public identifier."
+
+ The second form of publicid begins with a 0 byte followed by a
+ string table index (note that these "index" values are all 0-based
+ byte offsets from the start of the string table). The entry in the
+ string table encodes the XML document type string.
+
+ The charset is the multi-byte encoding of the IANA charset MIBenum
+ http://www.iana.org/assignments/character-sets
+
+ The string table either has length 0, if empty, or the length is the
+ byte count of the string table block not counting the length byte
+ itself.
+
+ This is what the specification says about "index" as an index into
+ the string table:
+
+ "Various tokens encode references to the contents of the string
+ table. These references are encoded as scalar byte offsets from the
+ first byte of the first string in the string table. For example, the
+ offset of the first string is zero (0)."
+
+ So, "index" is a 0-based byte offset from the first byte of the
+ string table. The first byte of the string table is the one after
+ the multi-byte encoding of the string table length.
+
+ This function returns one of:
+
+ NW_STAT_SUCCESS
+ NW_STAT_OUT_OF_MEMORY
+ NW_STAT_WBXML_ERROR_BYTECODE
+*/
+NW_Status_t
+NW_WBXML_Parser_docHeaderParse(NW_WBXML_Parser_t* pParser,
+ NW_WBXML_Document_t* pDoc)
+{
+ NW_Int32 bytesRead;
+ NW_Uint32 docTypeByteOffset = 0;
+ NW_Status_t substatus;
+ NW_Status_t status = NW_STAT_WBXML_ERROR_BYTECODE;
+
+ /* this is an internal function where caller should guarantee these */
+ NW_ASSERT(pParser != NULL);
+ NW_ASSERT(pDoc != NULL);
+ NW_ASSERT(GET_STATE(pParser) == NW_WBXML_PARSER_S_START);
+
+ /* version */
+ pDoc->version = NW_WBXML_Parser_readUint8(pParser);
+ if (NW_WBXML_Parser_advance(pParser, 1) < 0) {
+ goto errorExitHeaderParse;
+ }
+ /* publicid */
+ bytesRead = NW_WBXML_Parser_readMbUint32(pParser, &(pDoc->publicid));
+ if ((bytesRead < 0)
+ || (NW_WBXML_Parser_advance(pParser, bytesRead) < 0)) {
+ goto errorExitHeaderParse;
+ }
+ /* check for publicid second form referencing string table */
+ if (pDoc->publicid == 0) {
+ /* save doctype string table index for after string table is read */
+ bytesRead = NW_WBXML_Parser_readMbUint32(pParser, &docTypeByteOffset);
+ if ((bytesRead < 0)
+ || (NW_WBXML_Parser_advance(pParser, bytesRead) < 0)) {
+ goto errorExitHeaderParse;
+ }
+ }
+
+ if(pDoc->publicid == 1) //As per WBXML spec, invalid public identifier
+ {
+ return NW_STAT_WMLBROWSER_BAD_CONTENT;
+ }
+
+ /* charset */
+ if (pDoc->version != 0) {
+ bytesRead = NW_WBXML_Parser_readMbUint32(pParser, &(pDoc->charset));
+ if ((bytesRead < 0)
+ || (NW_WBXML_Parser_advance(pParser, bytesRead) < 0)) {
+ goto errorExitHeaderParse;
+ }
+ } else {
+ /* For WBXML version 1.0, which did not have a charset field in
+ the document header, we hardwire the charset to UTF-8. This is
+ against the spec which says that the charset should come as
+ side info with the doc (e.g., get charset from the load
+ response), but the API needs to change to support this so
+ rather than reject all version 1.0 docs we accept the UTF-8
+ (includes ASCII but not Latin-1) encoded ones. */
+ pDoc->charset = HTTP_utf_8;
+ }
+ substatus = NW_String_charsetValid(pDoc->charset);
+ if (substatus != NW_STAT_SUCCESS) {
+ status = substatus;
+ goto errorExitHeaderParse;
+ }
+ /* strtbl */
+ substatus = NW_WBXML_Parser_readStringTable(pParser, pDoc,
+ &(pDoc->strtbl.data));
+ if (substatus != NW_STAT_SUCCESS) {
+ status = substatus;
+ goto errorExitHeaderParse;
+ }
+
+ /* record remainder of doc as the body length */
+ pDoc->body_len = pParser->left;
+
+ /* deal with doctype string, maybe from string table */
+
+ if(pDoc->doc_type)
+ {
+ NW_String_delete(pDoc->doc_type);
+ }
+
+ pDoc->doc_type = NULL;
+ if (pDoc->publicid == 0) {
+ /* now that we have the string table, get the doctype string */
+ if ((docTypeByteOffset >= pDoc->strtbl.length)
+ || (!NW_String_valid(pDoc->strtbl.data + docTypeByteOffset,
+ pDoc->strtbl.length - docTypeByteOffset,
+ pDoc->charset))) {
+ goto errorExitHeaderParse;
+ }
+ pDoc->doc_type = NW_String_new();
+ if (pDoc->doc_type != NULL) {
+ if (NW_String_initialize(pDoc->doc_type,
+ pDoc->strtbl.data + docTypeByteOffset,
+ pDoc->charset) != NW_STAT_SUCCESS) {
+ NW_String_delete(pDoc->doc_type);
+ pDoc->doc_type = NULL;
+ goto errorExitHeaderParse;
+ }
+ /* TBD should now go back and try to fill in the internal "publicId"
+ from the WBXML dictionary to match the docType. */
+ } else {
+ status = NW_STAT_OUT_OF_MEMORY;
+ goto errorExitHeaderParse;
+ }
+ } else {
+ /* doc came with publicid so now fill in the type string. */
+ substatus
+ = NW_WBXML_Dictionary_publicId_to_doctypeString(pDoc->publicid,
+ &(pDoc->doc_type));
+ /* ignore any error other than OOM */
+ if (substatus == NW_STAT_OUT_OF_MEMORY) {
+ status = NW_STAT_OUT_OF_MEMORY;
+ goto errorExitHeaderParse;
+ }
+ }
+ SET_STATE(pParser, NW_WBXML_PARSER_S_HEADER);
+ pParser->doc = pDoc;
+ status = NW_STAT_SUCCESS;
+ errorExitHeaderParse:
+ return status;
+}
+
+/*
+ * Save/restore context can be used if the parser is to be invoked
+ * reentrantly (in a callback). Normally this should be avoided since
+ * the only really safe way to do this is to save the whole parser
+ * object on the stack. This uses a lot of space!
+ */
+
+NW_Status_t
+NW_WBXML_Parser_saveContext(NW_WBXML_Parser_t *parser,
+ NW_WBXML_Parser_t *context)
+{
+ NW_ASSERT(parser != NULL);
+ NW_ASSERT(context != NULL);
+
+ NW_Mem_memcpy(context, parser, sizeof(*parser));
+ return NW_STAT_SUCCESS;
+}
+
+NW_Status_t
+NW_WBXML_Parser_restoreContext(NW_WBXML_Parser_t *parser,
+ NW_WBXML_Parser_t *context)
+{
+ NW_ASSERT(parser != NULL);
+ NW_ASSERT(context != NULL);
+
+ NW_Mem_memcpy(parser, context, sizeof(*parser));
+ return NW_STAT_SUCCESS;
+}
+
+NW_Status_t
+NW_WBXML_Parser_setTagCodepage(NW_WBXML_Parser_t *parser,
+ NW_Uint8 page)
+{
+ NW_ASSERT(parser != NULL);
+
+ parser->tag_code_page = page;
+ return NW_STAT_SUCCESS;
+}
+
+NW_Uint8
+NW_WBXML_Parser_getTagCodepage(NW_WBXML_Parser_t *parser)
+{
+ NW_ASSERT(parser != NULL);
+
+ return parser->tag_code_page;
+}
+
+NW_Status_t
+NW_WBXML_Parser_setAttrCodepage(NW_WBXML_Parser_t *parser,
+ NW_Uint8 page)
+{
+ NW_ASSERT(parser != NULL);
+
+ parser->attribute_code_page = page;
+ return NW_STAT_SUCCESS;
+}
+
+NW_Uint8
+NW_WBXML_Parser_getAttrCodepage(NW_WBXML_Parser_t *parser)
+{
+ NW_ASSERT(parser != NULL);
+
+ return parser->attribute_code_page;
+}
+
+/*
+* Turn an eight bit token into a fully qualified 32 bit token depending
+* on the parser state.
+*/
+
+static
+NW_Uint32
+FqToken (NW_WBXML_Parser_t * parser,
+ NW_Uint8 token,
+ NW_Int32 token_state)
+{
+ NW_Uint32 fq_token = token;
+
+ NW_ASSERT(parser != NULL);
+
+ fq_token |= (parser->dictionary << 16);
+ if (token_state == TOKEN_STATE_ATTR) {
+ fq_token |=
+ ((parser->attribute_code_page << 8) | NW_WBXML_CP_STATE_ATTR);
+ } else {
+ fq_token |= ((parser->tag_code_page << 8) | NW_WBXML_CP_STATE_TAG);
+ }
+ return fq_token;
+}
+
+
+/* Invoke callbacks */
+
+/* The callback wrappers use the parser flags to implement an
+ * "exception" mechanism. If a callback returns a non-OK status, the
+ * parser will detect this as soon as possible and stop what
+ * it is doing.
+ */
+
+/* Handle state callbacks */
+
+static
+void
+Handle_Pi(NW_WBXML_Parser_t *parser)
+{
+ NW_Status_t status;
+ if ((parser->handler) && (parser->handler->Pi_CB)){
+ status = (*(parser->handler->Pi_CB)) (parser, parser->context);
+ NW_WBXML_Parser_setStatus (parser, status);
+ }
+}
+
+static
+void
+Handle_Pi_End(NW_WBXML_Parser_t *parser)
+{
+ NW_Status_t status;
+ if ((parser->handler) && (parser->handler->Pi_End_CB)){
+ status = (*(parser->handler->Pi_End_CB)) (parser, parser->context);
+ NW_WBXML_Parser_setStatus (parser, status);
+ }
+}
+
+static
+void
+Handle_Tag_Start(NW_WBXML_Parser_t *parser)
+{
+ NW_Status_t status;
+ if ((parser->handler) && (parser->handler->Tag_Start_CB)){
+ status = (*(parser->handler->Tag_Start_CB)) (parser, parser->context);
+ NW_WBXML_Parser_setStatus (parser, status);
+ }
+}
+
+static
+void
+Handle_Tag_End(NW_WBXML_Parser_t *parser)
+{
+ NW_Status_t status;
+ if ((parser->handler) && (parser->handler->Tag_End_CB)){
+ status = (*(parser->handler->Tag_End_CB)) (parser, parser->context);
+ NW_WBXML_Parser_setStatus (parser, status);
+ }
+}
+
+static
+void
+Handle_Attr_Start(NW_WBXML_Parser_t *parser)
+{
+ NW_Status_t status;
+ if ((parser->handler) && (parser->handler->Attr_Start_CB)){
+ status = (*(parser->handler->Attr_Start_CB)) (parser, parser->context);
+ NW_WBXML_Parser_setStatus (parser, status);
+ }
+}
+
+static
+void
+Handle_Attr_Val(NW_WBXML_Parser_t *parser)
+{
+ NW_Status_t status;
+ if ((parser->handler) && (parser->handler->Attr_Val_CB)){
+ status = (*(parser->handler->Attr_Val_CB)) (parser, parser->context);
+ NW_WBXML_Parser_setStatus (parser, status);
+ }
+}
+
+static
+void
+Handle_Content(NW_WBXML_Parser_t *parser)
+{
+ NW_Status_t status;
+ if ((parser->handler) && (parser->handler->Content_CB)){
+ status = (*(parser->handler->Content_CB)) (parser, parser->context);
+ NW_WBXML_Parser_setStatus (parser, status);
+ }
+}
+
+static
+void
+Handle_Codepage(NW_WBXML_Parser_t *parser)
+{
+ NW_Status_t status;
+ if ((parser->handler) && (parser->handler->CodePage_CB)){
+ status = (*(parser->handler->CodePage_CB)) (parser, parser->context);
+ NW_WBXML_Parser_setStatus (parser, status);
+ }
+}
+
+static
+void
+Handle_Extension(NW_WBXML_Parser_t *parser)
+{
+ NW_Status_t status;
+ if ((parser->handler) && (parser->handler->Extension_CB)){
+ status = (*(parser->handler->Extension_CB)) (parser, parser->context);
+ NW_WBXML_Parser_setStatus (parser, status);
+ }
+}
+
+/* Handle data type callbacks */
+
+static
+void
+Handle_Fq_Token(NW_WBXML_Parser_t *parser,
+ NW_Uint32 token)
+{
+ NW_Status_t status;
+ if ((parser->handler) && (parser->handler->FQToken_CB)){
+ status = (*(parser->handler->FQToken_CB)) (parser, token, parser->context);
+ NW_WBXML_Parser_setStatus (parser, status);
+ }
+}
+
+static
+void
+Handle_Inline_String(NW_WBXML_Parser_t *parser,
+ NW_Uint32 len)
+{
+ NW_Status_t status;
+ if ((parser->handler) && (parser->handler->InlineString_CB)){
+ status = (*(parser->handler->InlineString_CB)) (parser, len,
+ parser->context);
+
+ NW_WBXML_Parser_setStatus (parser, status);
+ }
+}
+
+static
+void
+Handle_Table_String(NW_WBXML_Parser_t *parser,
+ NW_Uint32 index)
+{
+ NW_Status_t status;
+ if ((parser->handler) && (parser->handler->TableString_CB)){
+ status = (*(parser->handler->TableString_CB)) (parser, index,
+ parser->context);
+ NW_WBXML_Parser_setStatus (parser, status);
+ }
+}
+
+static
+void
+Handle_Binary(NW_WBXML_Parser_t *parser,
+ NW_Uint32 value)
+{
+ NW_Status_t status;
+ if ((parser->handler) && (parser->handler->Binary_CB)){
+ status = (*(parser->handler->Binary_CB)) (parser, value, parser->context);
+ NW_WBXML_Parser_setStatus (parser, status);
+ }
+}
+
+static
+void
+Handle_Opaque(NW_WBXML_Parser_t *parser,
+ NW_Uint32 len)
+{
+ NW_Status_t status;
+ if ((parser->handler) && (parser->handler->Opaque_CB)){
+ status = (*(parser->handler->Opaque_CB)) (parser, len, parser->context);
+ NW_WBXML_Parser_setStatus (parser, status);
+ }
+}
+
+static
+void
+Handle_Entity(NW_WBXML_Parser_t *parser,
+ NW_Uint32 e)
+{
+ NW_Status_t status;
+ if ((parser->handler) && (parser->handler->Entity_CB)){
+ status = (*(parser->handler->Entity_CB)) (parser, e, parser->context);
+ NW_WBXML_Parser_setStatus (parser, status);
+ }
+}
+
+/*
+* Safely get the next token, checking for switch pages along the way.
+* While this does advance past any switch pages, it DOES NOT advance
+* past the returned token.
+*/
+
+static
+NW_Status_t
+NW_WBXML_Parser_getNextToken (NW_WBXML_Parser_t * parser,
+ NW_Uint8 * token,
+ NW_Int32 token_state)
+{
+
+ NW_ASSERT(parser != NULL);
+
+ if (!NW_WBXML_Parser_hasMoreBytecode (parser)) {
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+
+ while ((*token = NW_WBXML_Parser_readUint8 (parser)) ==
+ NW_WBXML_SWITCH_PAGE)
+ {
+ if (NW_WBXML_Parser_advance (parser, 1) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ if (!NW_WBXML_Parser_hasMoreBytecode (parser)) {
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+
+ if (token_state == TOKEN_STATE_TAG){
+ parser->tag_code_page = NW_WBXML_Parser_readUint8 (parser);
+ } else {
+ parser->attribute_code_page = NW_WBXML_Parser_readUint8 (parser);
+ }
+
+ if((parser->cp_registry.count > 0)
+ && ((parser->flags & NW_WBXML_REGISTRY_INIT) != NW_WBXML_REGISTRY_INIT)){
+ NW_ASSERT(parser->offset > 0);
+ /* We have a registry but we haven't finished initing it yet */
+ // WLIU_DEBUG: RFileLogger::WriteFormat(_L("Browser"), _L("cp_count.txt"), EFileLoggingModeAppend, _L("=== cp_count: %x, pW->index: %x \n"), parser->cp_registry.realcount +1, parser->offset - parser->lastValid);
+ NW_WBXML_CPRegistry_addEntry(&(parser->cp_registry),
+ NW_WBXML_Parser_readUint8(parser),
+ /* must use switch page token position */
+ parser->offset - 1,
+ (NW_Uint8)token_state);
+ }
+
+ Handle_Codepage(parser);
+
+ if (NW_WBXML_Parser_advance (parser, 1) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ if (!NW_WBXML_Parser_hasMoreBytecode (parser)) {
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/*
+ * Element parsing methods: The parser is made up of a set of methods
+ * that know how to parse individual elements of the wbxml source. For
+ * elements that repeat, these are implemented in iterators. Building
+ * the parser from a set of element parsers and iterators makes it
+ * simple to use the parser as a deserializer for wbxml elements.
+ */
+
+#define HAS_CONTENT(t) ((t)&NW_WBXML_FLAGS_CONTENT)
+#define HAS_ATTRIBUTES(t) ((t)&NW_WBXML_FLAGS_ATTRIBUTES)
+
+/*
+* Parse the token and name part of a tag. This generates a fully
+* qualified token.
+*/
+
+NW_Status_t
+NW_WBXML_Parser_tagNameParse(NW_WBXML_Parser_t *parser)
+{
+ NW_Uint8 token;
+ NW_Int32 ilen;
+ NW_Uint32 index;
+ NW_Uint32 fq_token;
+ NW_Status_t status;
+
+ NW_ASSERT(parser != NULL);
+
+ Handle_Tag_Start(parser);
+
+ CHECK_PARSER_STATUS;
+
+ status = NW_WBXML_Parser_getNextToken (parser, &token, TOKEN_STATE_TAG);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ fq_token = FqToken (parser, token, TOKEN_STATE_TAG);
+ Handle_Fq_Token(parser, fq_token);
+
+ if (HAS_CONTENT(fq_token) || HAS_ATTRIBUTES(fq_token) ||
+ (NW_WBXML_Parser_hasMoreBytecode (parser)))
+ {
+ if (NW_WBXML_Parser_advance (parser, 1) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ }
+
+ /*
+ * Note that while the spec defines tokens for literal tags with
+ * and without attributes and content, they are just
+ * NW_WBXML_LITERAL with the content and/or attributes flags
+ * set. So ...
+ */
+
+ if ((token & NW_WBXML_MASK_TAG_ID) == NW_WBXML_LITERAL){
+
+ /*
+ * TODO: Should check for another global token
+ * and return an error?
+ */
+
+ ilen = NW_WBXML_Parser_readMbUint32 (parser, &index);
+ if(ilen < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+
+ Handle_Table_String(parser, index);
+
+ if(NW_WBXML_Parser_advance(parser, ilen) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ }
+
+ if (HAS_ATTRIBUTES (fq_token)){ /* Has attributes, possibly content */
+ status = NW_STAT_WBXML_HAS_ATTRIBUTES;
+ if (HAS_CONTENT (fq_token)){
+ status = NW_STAT_WBXML_HAS_ATTR_CONTENT;
+ }
+ }
+
+ else if (HAS_CONTENT (fq_token)){ /* Has content, no attributes */
+ status = NW_STAT_WBXML_HAS_CONTENT;
+ }
+
+ else{ /* No attributes, no content */
+ status = NW_STAT_SUCCESS;
+ Handle_Tag_End(parser);
+ }
+
+ return status;
+}
+
+/* Parse an attribute list */
+
+NW_Status_t
+NW_WBXML_Parser_attributeListIterate(NW_WBXML_Parser_t *parser)
+{
+ NW_Uint8 token;
+ NW_Status_t status;
+
+ NW_ASSERT(parser != NULL);
+
+ status = NW_WBXML_Parser_attributeParse (parser);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ status = NW_WBXML_Parser_getNextToken (parser, &token, TOKEN_STATE_ATTR);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ if (token == NW_WBXML_END){
+ return NW_STAT_WBXML_ITERATE_DONE;
+ }
+ return NW_STAT_WBXML_ITERATE_MORE;
+}
+
+static
+NW_Status_t
+NW_WBXML_Parser_attributeListParse(NW_WBXML_Parser_t *parser)
+{
+ NW_Status_t status;
+
+ /* Run the attribute list iterator till it completes */
+
+ while ((parser->flags & NW_WBXML_PARSER_S_MASK) == NW_WBXML_PARSER_OK){
+ status = NW_WBXML_Parser_attributeListIterate(parser);
+ if(status == NW_STAT_WBXML_ITERATE_DONE){
+ return NW_STAT_SUCCESS;
+ }
+ if(status != NW_STAT_WBXML_ITERATE_MORE){
+ return status;
+ }
+ }
+ return NW_WBXML_Parser_flagToStatus(parser);
+}
+
+/*
+* Parse a processing instruction
+*/
+static
+NW_Status_t
+NW_WBXML_Parser_piParse (NW_WBXML_Parser_t * parser,
+ NW_Int32 token_state)
+{
+
+ NW_Uint8 token;
+ NW_Status_t status;
+
+ status = NW_WBXML_Parser_getNextToken (parser, &token, token_state);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ switch (token){
+ case NW_WBXML_PI:
+ Handle_Pi(parser);
+ /*
+ * Advance past the PI token and then get the PI's
+ * target and value
+ */
+ if(NW_WBXML_Parser_advance (parser, 1) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ status = NW_WBXML_Parser_attributeParse (parser);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+ /* Advance past the PI's end token */
+ status = NW_WBXML_Parser_getNextToken (parser, &token, TOKEN_STATE_ATTR);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+ if (token == NW_WBXML_END){
+ Handle_Pi_End(parser);
+ /*
+ * Must advance the reader past the end token but since this
+ * PI may be the last NW_Byte in the bytecode, first check to see
+ * if there is any bytecode left.
+ */
+ if (NW_WBXML_Parser_hasMoreBytecode (parser)){
+ NW_WBXML_Parser_advance (parser, 1);
+ }
+ }
+ else
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ break;
+ default:
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/* Parse an element, recursively parsing content */
+
+static
+NW_Status_t
+NW_WBXML_Parser_elementParse (NW_WBXML_Parser_t * parser)
+{
+ NW_Status_t tag_status = NW_STAT_SUCCESS;
+ NW_Status_t status = NW_STAT_WBXML_ERROR_BYTECODE;
+
+ if (++(parser->recursiveCallCnt) >= WBXML_MAX_RECURSIVE_CALL_DEPTH) {
+ goto FuncExit;
+ }
+
+ /* The while loop checks parser status after each case. */
+ while ((parser->flags & NW_WBXML_PARSER_S_MASK) == NW_WBXML_PARSER_OK){
+ if (tag_status == NW_STAT_SUCCESS){
+ tag_status = NW_WBXML_Parser_tagNameParse(parser);
+ if(tag_status == NW_STAT_SUCCESS){
+ status = NW_STAT_SUCCESS; /* Normal return */
+ goto FuncExit;
+ }
+ }
+
+ else if((tag_status == NW_STAT_WBXML_HAS_ATTRIBUTES) ||
+ (tag_status == NW_STAT_WBXML_HAS_ATTR_CONTENT)) {
+
+ status = NW_WBXML_Parser_attributeListParse (parser);
+ if(status != NW_STAT_SUCCESS){
+ goto FuncExit;
+ }
+
+ if (NW_WBXML_Parser_hasMoreBytecode (parser)){
+ if(NW_WBXML_Parser_advance (parser, 1) < 0){
+ status = NW_STAT_WBXML_ERROR_BYTECODE;
+ goto FuncExit;
+ }
+ }
+
+ if(tag_status == NW_STAT_WBXML_HAS_ATTR_CONTENT) {
+ tag_status = NW_STAT_WBXML_HAS_CONTENT;
+ }
+ else {
+ Handle_Tag_End(parser);
+ status = NW_STAT_SUCCESS; /* Normal return */
+ goto FuncExit;
+ }
+
+ /* TODO: else check for error (token >= 128) */
+ }
+
+ else if((tag_status == NW_STAT_WBXML_HAS_CONTENT) ||
+ (tag_status == NW_STAT_WBXML_HAS_ATTR_CONTENT)) {
+
+ status = NW_WBXML_Parser_contentParse(parser);
+ if(status != NW_STAT_SUCCESS){
+ goto FuncExit;
+ }
+
+ Handle_Tag_End(parser);
+ status = NW_STAT_SUCCESS; /* Normal return */
+ goto FuncExit;
+ }
+ else{
+ /* Unexpected NW_Byte code */
+ status = NW_STAT_WBXML_ERROR_BYTECODE;
+ goto FuncExit;
+ }
+ }
+ status = NW_STAT_WBXML_ERROR_BYTECODE; /* Bad parser status */
+
+ FuncExit:
+ --(parser->recursiveCallCnt);
+ return status;
+}
+
+
+/* Parse a sequence of text components until a non-text component is reached */
+
+
+static
+NW_Uint32
+isTextToken(NW_Uint8 token){
+ if((token == NW_WBXML_STR_I)
+ ||(token == NW_WBXML_STR_T)
+ ||(token == NW_WBXML_OPAQUE)
+ ||(token == NW_WBXML_ENTITY)
+ ||(token == NW_WBXML_EXT_I_0)
+ || (token == NW_WBXML_EXT_I_1)
+ || (token == NW_WBXML_EXT_I_2)
+ || (token == NW_WBXML_EXT_T_0)
+ || (token == NW_WBXML_EXT_T_1)
+ || (token == NW_WBXML_EXT_T_2)
+ || (token == NW_WBXML_EXT_0)
+ || (token == NW_WBXML_EXT_1)
+ || (token == NW_WBXML_EXT_2)){
+ return 1;
+ }
+ return 0;
+}
+
+
+NW_Status_t
+NW_WBXML_Parser_textIterate(NW_WBXML_Parser_t * parser){
+
+ NW_Uint8 token;
+ NW_Int32 ilen = 0;
+ NW_Uint32 index;
+ NW_Uint32 e;
+ NW_Status_t status;
+
+ status = NW_WBXML_Parser_getNextToken (parser, &token, TOKEN_STATE_TAG);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ switch (token){
+ case NW_WBXML_STR_I:
+ Handle_Content(parser);
+ if(NW_WBXML_Parser_advance (parser, 1) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ ilen = NW_WBXML_Parser_getInlineStrLen(parser, parser->doc);
+ if(ilen < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ Handle_Inline_String(parser, (NW_Uint32)ilen);
+ if(NW_WBXML_Parser_advance(parser, ilen) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ break;
+ case NW_WBXML_STR_T:
+ Handle_Content(parser);
+ if(NW_WBXML_Parser_advance (parser, 1) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ ilen = NW_WBXML_Parser_readMbUint32 (parser, &index);
+ if ((ilen < 0) || (index >= parser->doc->strtbl.length)) {
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ if (!NW_String_valid(parser->doc->strtbl.data + index,
+ parser->doc->strtbl.length - index,
+ parser->doc->charset)) {
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ Handle_Table_String(parser, index);
+ if(NW_WBXML_Parser_advance(parser, ilen)< 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ break;
+ case NW_WBXML_ENTITY:
+ Handle_Content(parser);
+ if(NW_WBXML_Parser_advance (parser, 1) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ ilen = NW_WBXML_Parser_readMbUint32 (parser, &e);
+ if(ilen < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ if(NW_WBXML_Parser_advance (parser, ilen) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ Handle_Entity(parser, e);
+ break;
+ case NW_WBXML_EXT_I_0:
+ case NW_WBXML_EXT_I_1:
+ case NW_WBXML_EXT_I_2:
+ case NW_WBXML_EXT_T_0:
+ case NW_WBXML_EXT_T_1:
+ case NW_WBXML_EXT_T_2:
+ case NW_WBXML_EXT_0:
+ case NW_WBXML_EXT_1:
+ case NW_WBXML_EXT_2:
+ Handle_Content(parser);
+ status = NW_WBXML_Parser_extensionParse (parser, TOKEN_STATE_TAG);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+ break;
+ case NW_WBXML_OPAQUE:
+ Handle_Content(parser);
+ status = NW_WBXML_Parser_opaqueParse (parser, TOKEN_STATE_TAG);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+ break;
+ case NW_WBXML_PI:
+ status = NW_WBXML_Parser_piParse (parser, TOKEN_STATE_TAG);
+ if (status != NW_STAT_SUCCESS){
+ return status;
+ }
+ break;
+ default:
+ return NW_STAT_FAILURE;
+ }
+ if (NW_WBXML_Parser_hasMoreBytecode (parser)) {
+ status = NW_WBXML_Parser_getNextToken(parser, &token, TOKEN_STATE_TAG);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+ if(isTextToken(token))
+ return NW_STAT_WBXML_ITERATE_MORE;
+ }
+ return NW_STAT_WBXML_ITERATE_DONE;
+}
+
+static
+NW_Status_t
+NW_WBXML_Parser_textParse(NW_WBXML_Parser_t * parser){
+
+ NW_Status_t status;
+
+ /* Run the text iterator till it completes */
+
+ while ((parser->flags & NW_WBXML_PARSER_S_MASK) == NW_WBXML_PARSER_OK){
+ status = NW_WBXML_Parser_textIterate(parser);
+ if(status == NW_STAT_WBXML_ITERATE_DONE){
+ return NW_STAT_SUCCESS;
+ }
+ if(status != NW_STAT_WBXML_ITERATE_MORE){
+ return status;
+ }
+ }
+ return NW_WBXML_Parser_flagToStatus(parser);
+}
+
+
+/* Parse tag content */
+
+NW_Status_t
+NW_WBXML_Parser_contentParse (NW_WBXML_Parser_t * parser){
+
+ NW_Uint8 token;
+ NW_Status_t status;
+
+ while ((parser->flags & NW_WBXML_PARSER_S_MASK) == NW_WBXML_PARSER_OK){
+
+ status = NW_WBXML_Parser_getNextToken (parser, &token, TOKEN_STATE_TAG);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ switch (token){
+ case NW_WBXML_END:
+ if (NW_WBXML_Parser_hasMoreBytecode (parser)){
+ NW_WBXML_Parser_advance (parser, 1);
+ }
+ return NW_STAT_SUCCESS; /* Normal return */
+
+ case NW_WBXML_STR_I:
+ case NW_WBXML_STR_T:
+ case NW_WBXML_ENTITY:
+ case NW_WBXML_PI:
+ case NW_WBXML_EXT_I_0:
+ case NW_WBXML_EXT_I_1:
+ case NW_WBXML_EXT_I_2:
+ case NW_WBXML_EXT_T_0:
+ case NW_WBXML_EXT_T_1:
+ case NW_WBXML_EXT_T_2:
+ case NW_WBXML_EXT_0:
+ case NW_WBXML_EXT_1:
+ case NW_WBXML_EXT_2:
+ case NW_WBXML_OPAQUE:
+ status = NW_WBXML_Parser_textParse(parser);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+ break;
+ case NW_WBXML_LITERAL:
+ case NW_WBXML_LITERAL_A:
+ case NW_WBXML_LITERAL_C:
+ case NW_WBXML_LITERAL_AC:
+ default:
+ Handle_Content(parser);
+ status = NW_WBXML_Parser_elementParse (parser);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+ break;
+ }
+ }
+ return NW_WBXML_Parser_flagToStatus(parser);
+}
+
+/* Parse an extension */
+
+NW_Status_t
+NW_WBXML_Parser_extensionParse (NW_WBXML_Parser_t * parser,
+ NW_Int32 token_state)
+{
+ NW_Uint8 token = 0;
+ NW_Uint32 fq_token;
+ int ilen;
+ NW_Uint32 value;
+ NW_Status_t status;
+
+ /* if (token_state == TOKEN_STATE_TAG)
+ * handler = parser->handler; TODO: deal with this
+ */
+
+ Handle_Extension(parser);
+
+ status = NW_WBXML_Parser_getNextToken (parser, &token, token_state);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ fq_token = FqToken (parser, token, token_state);
+ Handle_Fq_Token(parser, fq_token);
+
+ switch (token){
+ case NW_WBXML_EXT_I_0:
+ case NW_WBXML_EXT_I_1:
+ case NW_WBXML_EXT_I_2:
+ if(NW_WBXML_Parser_advance (parser, 1) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+
+ ilen = NW_WBXML_Parser_getInlineStrLen(parser, parser->doc);
+ if(ilen < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+
+ Handle_Inline_String(parser, (NW_Uint32)ilen);
+
+ if(NW_WBXML_Parser_advance(parser, ilen)<0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ break;
+ case NW_WBXML_EXT_T_0:
+ case NW_WBXML_EXT_T_1:
+ case NW_WBXML_EXT_T_2:
+
+ if(NW_WBXML_Parser_advance (parser, 1) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+
+ ilen = NW_WBXML_Parser_readMbUint32 (parser, &value);
+
+ if(ilen < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+
+ if (parser->ext_t_not_table_index == 0) {
+ Handle_Table_String(parser, value);
+ } else {
+ Handle_Binary(parser, value); /* handle ext_t anonymous int */
+ }
+ if(NW_WBXML_Parser_advance (parser, ilen) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ break;
+ case NW_WBXML_EXT_0:
+ case NW_WBXML_EXT_1:
+ case NW_WBXML_EXT_2:
+ if(NW_WBXML_Parser_advance (parser, 1) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ /* Note - For an extension token without other parameters the
+ second parameter to Handle_Binary is bogus. The callback is here
+ so that the parser client can manage its internal state. */
+ Handle_Binary(parser, 0);
+ break;
+ default:
+ NW_ASSERT(NW_FALSE);
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+
+/*
+* Parse an attribute
+*/
+
+
+
+NW_Status_t
+NW_WBXML_Parser_attributeNameParse (NW_WBXML_Parser_t * parser){
+
+ NW_Uint8 token;
+ NW_Uint32 fq_token;
+ NW_Uint32 index;
+ NW_Int32 ilen;
+ NW_Status_t status;
+
+ if (!NW_WBXML_Parser_hasMoreBytecode(parser)) {
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+
+ status = NW_WBXML_Parser_getNextToken (parser, &token, TOKEN_STATE_ATTR);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ if (token < 128){
+ Handle_Attr_Start(parser);
+ if (parser->status == NW_STAT_OUT_OF_MEMORY) {
+ return parser->status;
+ }
+ if(NW_WBXML_Parser_advance (parser, 1)<0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+
+ fq_token = FqToken (parser, token, TOKEN_STATE_ATTR);
+
+ Handle_Fq_Token(parser, fq_token);
+ }
+
+ else{
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+
+ if (token == NW_WBXML_LITERAL){
+ /* TODO: Should check for another global token and return an error? */
+ ilen = NW_WBXML_Parser_readMbUint32 (parser, &index);
+ if(ilen < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ Handle_Table_String(parser, index);
+ if(NW_WBXML_Parser_advance(parser, ilen) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ }
+ return NW_STAT_SUCCESS;
+}
+
+
+NW_Status_t
+NW_WBXML_Parser_attributeValsIterate (NW_WBXML_Parser_t * parser)
+{
+ NW_Uint8 token;
+ NW_Uint32 fq_token;
+ NW_Uint32 index;
+ NW_Uint32 e;
+ NW_Int32 ilen;
+ NW_Status_t status;
+
+ status = NW_WBXML_Parser_getNextToken (parser, &token, TOKEN_STATE_ATTR);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ if (token == NW_WBXML_STR_I){
+ /* NW_WBXML_ATTR_COMPONENT_STRING; */
+ if(NW_WBXML_Parser_advance (parser, 1) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ ilen = NW_WBXML_Parser_getInlineStrLen(parser, parser->doc);
+ if(ilen < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ Handle_Attr_Val(parser);
+ Handle_Inline_String(parser, (NW_Uint32) ilen);
+ if(NW_WBXML_Parser_advance(parser, ilen) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ }
+ else if (token == NW_WBXML_STR_T){
+ /* NW_WBXML_ATTR_COMPONENT_STRING; */
+ if(NW_WBXML_Parser_advance (parser, 1) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ ilen = NW_WBXML_Parser_readMbUint32 (parser, &index);
+ if(ilen < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ Handle_Attr_Val(parser);
+ Handle_Table_String(parser, index);
+ if(NW_WBXML_Parser_advance(parser, ilen)<0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ }
+ else if (token == NW_WBXML_OPAQUE){
+ /* NW_WBXML_ATTR_COMPONENT_OPAQUE; */
+ if(NW_WBXML_Parser_advance (parser, 1) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ ilen = NW_WBXML_Parser_readMbUint32 (parser, &index);
+ if(ilen < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ /* Move past the length NW_Byte(s) */
+ if(NW_WBXML_Parser_advance (parser, ilen) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ Handle_Attr_Val(parser);
+ Handle_Opaque(parser, index);
+ if(NW_WBXML_Parser_advance (parser, (NW_Int32)index) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ }
+ else if (token == NW_WBXML_ENTITY){
+ /*NW_WBXML_ATTR_COMPONENT_ENTITY; */
+ if(NW_WBXML_Parser_advance (parser, 1) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ ilen = NW_WBXML_Parser_readMbUint32 (parser,&e);
+ if(ilen < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ Handle_Entity(parser, e);
+ if(NW_WBXML_Parser_advance (parser, ilen) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ }
+ else if ((token == NW_WBXML_EXT_I_0)
+ || (token == NW_WBXML_EXT_I_1)
+ || (token == NW_WBXML_EXT_I_2)
+ || (token == NW_WBXML_EXT_T_0)
+ || (token == NW_WBXML_EXT_T_1)
+ || (token == NW_WBXML_EXT_T_2)
+ || (token == NW_WBXML_EXT_0)
+ || (token == NW_WBXML_EXT_1)
+ || (token == NW_WBXML_EXT_2)){
+
+ /* NW_WBXML_ATTR_COMPONENT_EXT; */
+ Handle_Attr_Val(parser);
+ status = NW_WBXML_Parser_extensionParse (parser, TOKEN_STATE_ATTR);
+ if(status != NW_STAT_SUCCESS){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ }
+ else if (token >= 128){
+ /*NW_WBXML_ATTR_COMPONENT_TOKEN; */
+ fq_token = FqToken(parser, token, TOKEN_STATE_ATTR);
+ Handle_Attr_Val(parser);
+ Handle_Fq_Token(parser, fq_token);
+ if(NW_WBXML_Parser_advance (parser, 1) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ }
+
+ status = NW_WBXML_Parser_getNextToken (parser, &token, TOKEN_STATE_ATTR);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ /*
+ * Attribute tokens are either text tokens or
+ * dictionary-defined tokens > 128
+ */
+ if(isTextToken(token) || (token >=128)){
+
+ return NW_STAT_WBXML_ITERATE_MORE; /* Normal exit */
+ }
+ else /*if ((token < 128) || (token == NW_WBXML_END)
+ || (token == NW_WBXML_LITERAL))*/{
+ /*parser->state &= ~NW_WBXML_PARSER_S_ATTR_VAL; */
+ /* Don't advance parser */
+ return NW_STAT_WBXML_ITERATE_DONE; /* Normal exit */
+ }
+}
+
+NW_Status_t
+NW_WBXML_Parser_attributeParse(NW_WBXML_Parser_t *parser)
+{
+ NW_Status_t status;
+
+ status = NW_WBXML_Parser_attributeNameParse(parser);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+ while ((parser->flags & NW_WBXML_PARSER_S_MASK) == NW_WBXML_PARSER_OK){
+ status = NW_WBXML_Parser_attributeValsIterate(parser);
+ if(status == NW_STAT_WBXML_ITERATE_DONE){
+ return NW_STAT_SUCCESS;
+ }
+ if(status != NW_STAT_WBXML_ITERATE_MORE){
+ return status;
+ }
+ }
+ return NW_WBXML_Parser_flagToStatus(parser);
+}
+
+
+/*
+* Parse opaque data
+*/
+
+NW_Status_t
+NW_WBXML_Parser_opaqueParse (NW_WBXML_Parser_t * parser,
+ NW_Int32 token_state)
+{
+
+ NW_Uint32 index;
+ NW_Int32 ilen = 0;
+ NW_Uint8 token;
+ NW_Status_t status;
+
+ status = NW_WBXML_Parser_getNextToken (parser, &token, token_state);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ switch (token){
+ case NW_WBXML_OPAQUE:
+ if(NW_WBXML_Parser_advance (parser, 1) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ ilen = NW_WBXML_Parser_readMbUint32 (parser, &index);
+ if(ilen < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ if(NW_WBXML_Parser_advance (parser, ilen) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ Handle_Opaque(parser,index);
+ if(NW_WBXML_Parser_advance (parser, (NW_Int32)index) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ break;
+ default:
+ /* return NW_STAT_WBXML_ERROR_BYTECODE;*/
+ NW_ASSERT(NW_FALSE); /* Never reached */
+ }
+ return NW_STAT_SUCCESS;
+}
+
+
+/*
+* Parse the body of a document
+*
+* RETURN NW_STAT_SUCCESS
+* NW_STAT_OUT_OF_MEMORY
+* NW_STAT_BAD_INPUT_PARAM
+* NW_STAT_WBXML_ERROR_BYTECODE
+* NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED
+*/
+
+NW_Status_t
+NW_WBXML_Parser_bodyParse (NW_WBXML_Parser_t * parser)
+{
+ NW_Status_t status;
+ NW_Uint8 token;
+
+ NW_ASSERT(parser != NULL);
+ // WLIU_DEBUG: RFileLogger::WriteFormat(_L("Browser"), _L("cp_count.txt"), EFileLoggingModeAppend, _L("====== body parse starts =====\n"));
+
+ /* This is not quite the WBXML grammar because we want to permit
+ loose HTML docs where there is no one document node. */
+ while (((parser->flags & NW_WBXML_PARSER_S_MASK) == NW_WBXML_PARSER_OK)
+ && NW_WBXML_Parser_hasMoreBytecode (parser)) {
+
+ status = NW_WBXML_Parser_getNextToken (parser, &token, TOKEN_STATE_TAG);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+
+ switch (token){
+ case NW_WBXML_END:
+ if (NW_WBXML_Parser_hasMoreBytecode (parser)) {
+ if(NW_WBXML_Parser_advance (parser, 1) < 0){
+ return NW_STAT_WBXML_ERROR_BYTECODE;
+ }
+ Handle_Tag_End(parser);
+ }
+ break;
+
+ case NW_WBXML_STR_I:
+ case NW_WBXML_STR_T:
+ case NW_WBXML_ENTITY:
+ case NW_WBXML_PI:
+ case NW_WBXML_EXT_I_0:
+ case NW_WBXML_EXT_I_1:
+ case NW_WBXML_EXT_I_2:
+ case NW_WBXML_EXT_T_0:
+ case NW_WBXML_EXT_T_1:
+ case NW_WBXML_EXT_T_2:
+ case NW_WBXML_EXT_0:
+ case NW_WBXML_EXT_1:
+ case NW_WBXML_EXT_2:
+ case NW_WBXML_OPAQUE:
+ status = NW_WBXML_Parser_textParse(parser);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+ break;
+
+ case NW_WBXML_LITERAL:
+ case NW_WBXML_LITERAL_A:
+ case NW_WBXML_LITERAL_C:
+ case NW_WBXML_LITERAL_AC:
+ default:
+ status = NW_WBXML_Parser_elementParse (parser);
+ if(status != NW_STAT_SUCCESS){
+ return status;
+ }
+ break;
+ }
+ }
+ CHECK_PARSER_STATUS;
+
+ /*
+ * If we have a registry then it must be inited at this point, so
+ * set the init flag.
+ */
+
+ if((parser->cp_registry.count > 0)
+ && ((parser->flags & NW_WBXML_REGISTRY_INIT) != NW_WBXML_REGISTRY_INIT)){
+ parser->flags |= NW_WBXML_REGISTRY_INIT;
+ }
+
+ // WLIU_DEBUG: RFileLogger::WriteFormat(_L("Browser"), _L("cp_count.txt"), EFileLoggingModeAppend, _L("====== body parse ends =====\n"));
+
+ if (parser->handler && parser->handler->EndDocument_CB){
+ return (*(parser->handler->EndDocument_CB)) (parser, parser->context);
+ }
+ return NW_STAT_SUCCESS;
+}
+
+
+/*
+* Cache the parser's event handler and context
+*
+* RETURN: NW_STAT_SUCCESS
+*/
+
+EXPORT_C NW_Status_t
+NW_WBXML_Parser_registerHandler (NW_WBXML_Parser_t * parser,
+ const struct NW_WBXML_EventHandler_s * handler,
+ void *context)
+{
+
+ NW_ASSERT(parser != NULL);
+
+ parser->handler = handler;
+ parser->context = context;
+
+ return NW_STAT_SUCCESS;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/xmlp/include/cxml_xmlp_entity.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Provides a single header for the cXML Parser
+*
+*/
+
+
+
+#ifndef _CXML_ENTITY_H_
+#define _CXML_ENTITY_H_
+
+#include <xml/cxml/cxml_proj.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* As per WBXML Format Specification (WAP-192-WBXML-20010725-a),
+ * section 5.8.4.3, the entities in WBXML can be represented either
+ * as String token (STR_I) or the ENTITY Token. The numeric character
+ * entities are reprented as ENTITY token and all other as STR_I.
+ *
+ * In our implementation, all XML/HTML is represented as the numeric
+ * character entities. The numeric character entities is allocated four
+ * bytes (NW_Uint32). The highest order byte will distinguish between the
+ * different types of entities e.g. between predefined or character numeric
+ * entities.
+ *
+ */
+
+
+// The maximum length of the entities can't exceed than
+// 9 bytes in current implementation. Provides safty
+// for the infinite loop.
+
+enum { CXML_ATTR_VAL_STR = 512,
+ CXML_ENTITY_VAL_LEN =4
+};
+
+typedef struct CXML_EntitySet_Entry_s {
+ CXML_Uint8* name;
+ CXML_Ucs2 value;
+}CXML_EntitySet_Entry_t;
+
+
+
+
+/** ----------------------------------------------------------------------- **
+ @function: CXML_XML_Handle_entity
+ @synopsis: Resolve the entities.
+ @scope: public
+
+ @parameters:
+ [in] NW_XML_Reader_t* pT
+
+
+ [in] NW_XML_Reader_Interval_t* pI_entityData
+ Entity name
+
+
+ [out] NW_Uint32* entityVal
+ If it is Character hex entry, Character decimal entry or
+ Prefined entry then it contains the hex value of entity.
+ In case of Internal entities it is zero.
+
+ [out] CXML_Uint8** entityStr
+ In case of Internal Entities, it is string corresponding
+ to the entity name defined in
+ NW_XML_Reader_Interval_t* pI_entityData.
+
+ [out] NW_Bool* entityFound
+ NW_TRUE: If valid type of entity is defined.
+ [in] RPointerArray <CXML_Internal_Entity_t> internalEntityList
+ List of Internal Entities for search. This is
+ casted to (void*) to avoid c++ related error in
+ <e32std.h>
+
+ @description: * The following type of entities are handled
+ * 1) Character hex entry
+ * 2) Character decimal entry
+ * 3) Prefined entry
+ * 4) Internal Entities defined in the DTD.
+ *
+ *
+
+
+
+ @returns:
+ In case of file related failures: Error codes is returned defined in
+ nwx_status.h
+ NW_STAT_FAILURE : For any general error and entity is not predefined
+ entity.
+ NW_STAT_SUCCESS: For success
+ -----------------------------------------------------------------------------------**/
+
+NW_Status_t CXML_XML_Handle_entity(NW_XML_Reader_t* pT,
+ NW_XML_Reader_Interval_t* pI_entityData,
+ NW_Uint32* entityVal,
+ CXML_Uint8** entityStr,
+ NW_Bool* entityFound,
+ void* internalEntityList);
+
+
+
+
+NW_Status_t CXML_XML_Parser_Entity(NW_XML_Reader_t* pT,
+ NW_XML_Reader_Interval_t* I_entityData,
+ NW_Bool* entityFound);
+
+/** ----------------------------------------------------------------------- **
+ @function: CXML_XML_Get_Entity
+ @synopsis: Converts the entity value from CXML_Uint32 to CXML_Byte string.
+ @scope: public
+
+ @parameters:
+ [in] entityVal
+
+
+ [out] CXML_Byte* entityStr
+ Entity value in the string.
+
+
+ [out] CXML_Uint32* strLen
+ Length of the entity string.
+ 0: In case of error.
+
+ @description: Converts the entity value from CXML_Uint32 to CXML_Byte string.
+
+ @returns:
+ In case of file related failures: Error codes is returned defined in
+ nwx_status.h
+ NW_STAT_FAILURE : For any general error and entity is not predefined
+ entity.
+ NW_STAT_SUCCESS: For success
+ -----------------------------------------------------------------------------------**/
+
+IMPORT_C
+NW_Status_t CXML_XML_Get_Entity(CXML_Uint32 entityVal,
+ CXML_Byte* entityStr,
+ CXML_Uint32* strLen);
+
+#ifdef __cplusplus
+} // extern "C" {
+#endif /* __cplusplus */
+
+#endif //_CXML_ENTITY_H_
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/xmlp/include/cxml_xmlp_int_entity.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,131 @@
+/*
+* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Provides a single header for the cXML Parser
+*
+*/
+
+
+
+#ifndef _CXML_XMLP_INT_ENTITY_H_
+#define _CXML_XMLP_INT_ENTITY_H_
+#include <e32std.h>
+#include <xml/cxml/cxml_proj.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+typedef struct CXML_Internal_Entity_s {
+ NW_Ucs2 * name;
+ NW_Ucs2 * value;
+ NW_Uint32 nameLen;
+}CXML_Internal_Entity_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @function: CXML_XML_Parser_Store_I_Entity
+ @synopsis: Function to store the internal entity.
+ @scope: public
+
+ @parameters:
+ [in] entityVal
+
+
+ [in] NW_XML_Reader_Interval_t* I_entityName
+ Internal Entity Name
+
+
+ [in] NW_XML_Reader_Interval_t* I_entityValue
+ Internal Entity Value
+
+ @description: This extracts the Internal Entity name from the XML buffer
+ and stores in the Link list.
+
+ @returns:
+ In case of file related failures: Error codes is returned defined in
+ nwx_status.h
+ NW_STAT_FAILURE : For any general error and entity is not predefined
+ entity.
+ NW_STAT_SUCCESS: For success
+ -----------------------------------------------------------------------------------**/
+
+ NW_Status_t CXML_XML_Parser_Store_I_Entity(NW_XML_Reader_t* pT,
+ NW_XML_Reader_Interval_t* I_entityName,
+ NW_XML_Reader_Interval_t* I_entityValue,
+ RPointerArray <CXML_Internal_Entity_t>* internalEntityList);
+
+ /** ----------------------------------------------------------------------- **
+ @function: CXML_XML_Parser_Free_I_Entity_List
+ @synopsis: Function to free the internal entity list.
+ @scope: public
+
+ @parameters: void
+
+
+ @description: Function to free the internal entity list.
+
+ @returns:
+ void
+ -----------------------------------------------------------------------------------**/
+
+ void CXML_XML_Parser_Free_I_Entity_List(RPointerArray <CXML_Internal_Entity_t> internalEntityList);
+
+ /** ----------------------------------------------------------------------- **
+ @function: CXML_XML_Resolve_Internal_Entity
+ @synopsis: Function to resolve the internal entity.
+ @scope: public
+
+ @parameters:
+ [in] NW_Ucs2* entityName: Name of Entity
+
+
+ [out] CXML_Uint8** entityValStr
+ If the entity name is the internal entity then this
+ contains the entiy value string otherwise NULL.
+
+
+
+ [out] NW_Bool* entityFound
+ If it is internal entity then it is true otherwise false.
+ [in] NW_Uint32 encoding:
+ Original encoding of the buffer so that entityValStr contain
+ correct.
+ [in] void* internalEntityList: Internal Entity list
+
+ @description: This extracts the Internal Entity name from the XML buffer
+ and stores in the Link list.
+
+ @returns:
+ In case of file related failures: Error codes is returned defined in
+ nwx_status.h
+ NW_STAT_FAILURE : For any general error and entity is not predefined
+ entity.
+ NW_STAT_SUCCESS: For success
+ -----------------------------------------------------------------------------------**/
+
+ NW_Status_t CXML_XML_Resolve_Internal_Entity(NW_Ucs2* entityName,
+ CXML_Uint8** entityValStr,
+ NW_Bool* entityFound,
+ NW_Uint32 encoding,
+ void* internalEntityList);
+
+
+
+
+#ifdef __cplusplus
+} // extern "C" {
+#endif /* __cplusplus */
+
+#endif //_CXML_XMLP_INT_ENTITY_H_
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/xmlp/src/XMLParser.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,2215 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_xmlp_xmlreader.h>
+#include <xml/cxml/nw_xmlp_xmlparser.h>
+#include <xml/cxml/nw_encoder_wbxmlwriter.h>
+
+
+#include "cxml_xmlp_entity.h"
+#include <xml/cxml/nw_string_string.h>
+#include "cxml_xmlp_int_entity.h"
+
+
+
+/* "<?" len 2 */
+#define NW_XML_String_PiFormStartLength 2
+static
+const NW_Uint8 NW_XML_String_PiFormStart[NW_XML_String_PiFormStartLength] =
+{
+ '<', '?'
+};
+
+/* "?>" len 2 */
+#define NW_XML_String_PiFormStopLength 2
+static
+const NW_Uint8 NW_XML_String_PiFormStop[NW_XML_String_PiFormStopLength] =
+{
+ '?', '>'
+};
+
+/* "version" len 7 */
+#define NW_XML_String_VersionLength 7
+static
+const NW_Uint8 NW_XML_String_Version[NW_XML_String_VersionLength] =
+{
+ 'v', 'e', 'r', 's', 'i', 'o', 'n'
+};
+
+/* "encoding" len 8 */
+#define NW_XML_String_EncodingLength 8
+static
+const NW_Uint8 NW_XML_String_Encoding[NW_XML_String_EncodingLength] =
+{
+ 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g'
+};
+
+/* "standalone" len 10 */
+#define NW_XML_String_StandaloneLength 10
+static
+const NW_Uint8 NW_XML_String_Standalone[NW_XML_String_StandaloneLength] =
+{
+ 's', 't', 'a', 'n', 'd', 'a', 'l', 'o', 'n', 'e'
+};
+
+/* "<!DOCTYPE" len 9 */
+#define NW_XML_String_DoctypeStartLength 9
+static
+const NW_Uint8 NW_XML_String_DoctypeStart[NW_XML_String_DoctypeStartLength] =
+{
+ '<', '!', 'D', 'O', 'C', 'T', 'Y', 'P', 'E'
+};
+
+/* "<!ENTITY" len 8 in the DTD */
+
+#define NW_XML_String_EntityStartLength 8
+static
+const NW_Uint8 NW_XML_String_EntityStart[NW_XML_String_EntityStartLength] =
+{
+ '<', '!', 'E', 'N', 'T', 'I', 'T', 'Y'
+};
+
+/* "<!--" len 4 comment start */
+#define NW_XML_String_CommentStartLength 4
+static
+const NW_Uint8 NW_XML_String_CommentStart[NW_XML_String_CommentStartLength] =
+{
+ '<', '!', '-', '-'
+};
+
+/* "-->" len 3 comment end */
+#define NW_XML_String_CommentStopLength 3
+static
+const NW_Uint8 NW_XML_String_CommentStop[NW_XML_String_CommentStopLength] =
+{
+ '-', '-', '>'
+};
+
+/* "/>" len 2 */
+#define NW_XML_String_EmptyTagEndLength 2
+static
+const NW_Uint8 NW_XML_String_EmptyTagEnd[NW_XML_String_EmptyTagEndLength] =
+{
+ '/', '>'
+};
+
+/* "</" len 2 */
+#define NW_XML_String_EndTagStartLength 2
+static
+const NW_Uint8 NW_XML_String_EndTagStart[NW_XML_String_EndTagStartLength] =
+{
+ '<', '/'
+};
+
+/* "<![CDATA[" len 9 */
+#define NW_XML_String_CdataStartLength 9
+static
+const NW_Uint8 NW_XML_String_CdataStart[NW_XML_String_CdataStartLength] =
+{
+ '<', '!', '[', 'C', 'D', 'A', 'T', 'A', '['
+};
+
+/* "]]>" len 3 */
+#define NW_XML_String_CdataEndLength 3
+static
+const NW_Uint8 NW_XML_String_CdataEnd[NW_XML_String_CdataEndLength] =
+{
+ ']', ']', '>'
+};
+
+/* All case variations of "xml" */
+#define NW_XML_String_XmlNameVariationCount 8
+#define NW_XML_String_XmlLength 3
+static
+const NW_Uint8 NW_XML_String_XmlVariations[(NW_XML_String_XmlNameVariationCount
+ * NW_XML_String_XmlLength)] =
+{
+ 'x', 'm', 'l', /* all lower case form must be first */
+ 'x', 'm', 'L',
+ 'x', 'M', 'l',
+ 'x', 'M', 'L',
+ 'X', 'm', 'l',
+ 'X', 'm', 'L',
+ 'X', 'M', 'l',
+ 'X', 'M', 'L'
+};
+
+
+/* Assumes position in Reader is at the first character of keyword.
+returns: *pMatch = 1 if found keyword and advanced over it, 0 if no match
+NOTE: Keyword match just means the string of keyword chars
+exists at the read position so it does not mean that the keyword
+is delimited at the end---it might be followed by more name chars. */
+static
+NW_Status_t
+NW_XML_Parse_KeywordConsume(NW_XML_Reader_t* pT, NW_XML_Reader_Interval_t* pI,
+ NW_Uint32 l, const NW_Uint8* pKeyword,
+ NW_Uint32* pMatch)
+{
+ NW_Status_t s;
+ NW_XML_Reader_Interval_Init(pI);
+ s = NW_XML_Reader_AsciiStringMatch(pT, l, pKeyword, pMatch);
+ if (NW_STAT_IS_SUCCESS(s) && *pMatch) {
+ NW_XML_Reader_Interval_Start(pI, pT);
+ NW_XML_Reader_AdvanceOffset(pT, l);
+ NW_XML_Reader_Interval_Stop(pI, pT);
+ }
+ return s;
+}
+
+/*
+Parses an XML Name (productions 5, 4) in Reader.
+If no parse error, then *pI marks the Name.
+Assumes position in Reader is at the first character of name.
+returns: *pMatch = 1 if found name and advanced over it, 0 if no match
+*/
+static
+NW_Status_t
+NW_XML_Parse_NameConsume(NW_XML_Reader_t* pT, NW_XML_Reader_Interval_t* pI,
+ NW_Uint32* pMatch)
+{
+ /*
+ [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':'
+ | CombiningChar | Extender
+
+ Note: combining and extender ignored here.
+
+ [5] Name ::= (Letter | '_' | ':') (NameChar)*
+ */
+ NW_Status_t sl;
+ NW_Uint32 isLetter;
+ NW_Status_t su;
+ NW_Uint32 isUnderscore;
+ NW_Status_t sc;
+ NW_Uint32 isColon;
+ NW_Status_t sd = NW_STAT_SUCCESS;
+ NW_Uint32 isDigit = 0;
+ NW_Status_t sp = NW_STAT_SUCCESS;
+ NW_Uint32 isPeriod = 0;
+ NW_Status_t sh = NW_STAT_SUCCESS;
+ NW_Uint32 isHyphen = 0;
+ NW_Status_t s = NW_STAT_SUCCESS;
+
+ sl = NW_XML_Reader_IsLetter(pT, &isLetter);
+ su = NW_XML_Reader_AsciiCharMatch(pT, '_', &isUnderscore);
+ sc = NW_XML_Reader_AsciiCharMatch(pT, ':', &isColon);
+ *pMatch = 0;
+ NW_XML_Reader_Interval_Init(pI);
+ if (NW_STAT_IS_SUCCESS(sl) && NW_STAT_IS_SUCCESS(su)
+ && NW_STAT_IS_SUCCESS(sc)) {
+ if (isLetter | isUnderscore | isColon) {
+ NW_XML_Reader_Interval_Start(pI, pT);
+ while ((NW_STAT_IS_SUCCESS(sl) && NW_STAT_IS_SUCCESS(su)
+ && NW_STAT_IS_SUCCESS(sc) && NW_STAT_IS_SUCCESS(sd)
+ && NW_STAT_IS_SUCCESS(sp) && NW_STAT_IS_SUCCESS(sh)
+ && NW_STAT_IS_SUCCESS(s))
+ && (isLetter | isDigit | isPeriod | isHyphen | isUnderscore
+ | isColon )) {
+ s = NW_XML_Reader_Advance(pT);
+ sl = NW_XML_Reader_IsLetter(pT, &isLetter);
+ sd = NW_XML_Reader_IsDigit(pT, &isDigit);
+ sp = NW_XML_Reader_AsciiCharMatch(pT, '.', &isPeriod);
+ sh = NW_XML_Reader_AsciiCharMatch(pT, '-', &isHyphen);
+ su = NW_XML_Reader_AsciiCharMatch(pT, '_', &isUnderscore);
+ sc = NW_XML_Reader_AsciiCharMatch(pT, ':', &isColon);
+ }
+ NW_XML_Reader_Interval_Stop(pI, pT);
+ *pMatch = 1;
+ }
+ }
+ if (NW_STAT_IS_SUCCESS(sl) && NW_STAT_IS_SUCCESS(su)
+ && NW_STAT_IS_SUCCESS(sc) && NW_STAT_IS_SUCCESS(sd)
+ && NW_STAT_IS_SUCCESS(sp) && NW_STAT_IS_SUCCESS(sh)
+ && NW_STAT_IS_SUCCESS(s)) {
+ return NW_STAT_SUCCESS;
+ }
+ return NW_STAT_FAILURE;
+}
+
+/* This function reads data from the pT->pBuf and converts this data to
+ * the NW_String_t. The string memory is allocated here but it is freed
+ * in the calling function.
+ *
+ * pT --> Parser Structute (IN)
+ * I_attrVal --> Attribute value Interval parameter (IN)
+ * *dataStr --> Output string (OUT)
+ *
+ *
+ */
+
+static NW_Status_t NW_XML_Data_to_String(NW_XML_Reader_t* pT, NW_XML_Reader_Interval_t* I_attrVal,
+ NW_String_t* dataStr)
+{
+ NW_Uint8* pData;
+ NW_Uint32 numbytes = 0;
+ NW_Uint32 totalByteCount = 0;
+ CXML_Uint8* tempAttrValBuf;
+ CXML_Uint32 tempBufLen = 0;
+ NW_Uint32 length;
+ NW_Uint32 i =0;
+ NW_Ucs2 c;
+ NW_Status_t s;
+
+ length = I_attrVal->stop - I_attrVal->start;
+ tempBufLen = length; //Desired bytes need to read.
+
+ s = NW_XML_Reader_DataAddressFromBuffer(pT,I_attrVal->start,
+ &tempBufLen,
+ &tempAttrValBuf);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return s;
+ }
+
+ if (tempBufLen != length)
+ {
+ return NW_STAT_FAILURE;
+ }
+
+
+
+ /* pData is not NULL terminated so need to use following method. The num byte
+ * will be used for both pName and pVlaue.
+ */
+
+
+ numbytes = NW_String_readChar( (NW_Byte*) tempAttrValBuf,&c,pT->encoding);
+
+ /* Calculate the length of string. Also add the number of characters
+ * required for the NULL termination.
+ */
+
+ totalByteCount = length + numbytes;
+
+ pData = (NW_Uint8*) NW_Mem_Malloc(totalByteCount);
+
+ if (pData != NULL)
+ {
+ (void)NW_Mem_memcpy(pData , tempAttrValBuf, length );
+
+
+ for(i=0; i < numbytes; i++)
+ {
+ pData[length+i] = '\0';
+ }
+ } /*end if (pName != NULL)*/
+ else
+ {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ s = NW_String_initialize( dataStr , pData, pT->encoding);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return s;
+ }
+
+ /* This will the storage of the dataStr by the NW_String_delete() */
+
+ dataStr->length |= 0x80000000;
+
+ return NW_STAT_SUCCESS;
+
+}/*end NW_XML_Data_to_String()*/
+
+/* Assumes position in Reader is at the opening quote character for value.
+* BUG not yet spec compliant.
+* The following function is called for Process Instruction and Element
+* attribute consume. The predefined entities will be handled in
+* element attributes only. So, the "entity" parameter is used to
+* distinguish between these two cases.
+* Careful about the "entity" parameter passed. This is used both as
+* IN/OUT paramter.
+
+* IN --> if(entity == CXML_TRUE): Then parse attribute value for the
+* entities.
+
+* OUT --> (entity=CXML_TRUE): The entity is found in the attribute value.
+
+*/
+
+static
+NW_Status_t
+NW_XML_Parse_ValueConsume(NW_XML_Reader_t* pT, NW_XML_Reader_Interval_t* pI,
+ CXML_Bool* entityCheck, NW_String_t* attrValStr,
+ const RPointerArray <CXML_Internal_Entity_t>* internalEntityList)
+{
+ /*
+ Literal data is any quoted string not containing the quotation mark
+ used as a delimiter for that string.
+
+ [10] AttValue ::= '"' ([^<&"] | Reference)* '"'
+ | "'" ([^<&'] | Reference)* "'"
+ */
+
+ /* BUG this only pays attention to the quote chars not the value
+ so it ignores [<&]. */
+ NW_Status_t s;
+ NW_Status_t ssq;
+ NW_Uint32 isOpenSingleQuote;
+ NW_Uint32 isCloseSingleQuote = 0;
+ NW_Status_t sdq;
+ NW_Uint32 isOpenDoubleQuote;
+ NW_Uint32 isCloseDoubleQuote = 0;
+ NW_Status_t slt;
+ NW_Uint32 isLessThan;
+
+ NW_Uint32 prevIndex;
+ NW_Uint32 prevCharIndex;
+ NW_XML_Reader_LineColumn_t prevLineColumn;
+ CXML_Uint8* intEntityValStr = NULL;
+ CXML_Uint32 tempBufLen = 0;
+ NW_String_t* tempStr = NULL;
+ NW_String_t entityValStr;
+ CXML_Bool entityFoundLevel_2 = NW_FALSE;
+ CXML_Bool entityFoundOnce = NW_FALSE;
+ NW_String_initialize (&entityValStr, NULL, 0);
+
+
+
+
+ NW_XML_Reader_Interval_Init(pI);
+ ssq = NW_XML_Reader_AsciiCharMatch(pT, '\'', &isOpenSingleQuote);
+ sdq = NW_XML_Reader_AsciiCharMatch(pT, '\"', &isOpenDoubleQuote);
+ if (NW_STAT_IS_FAILURE(sdq) || NW_STAT_IS_FAILURE(ssq)
+ || (!isOpenSingleQuote && !isOpenDoubleQuote)) {
+ return NW_STAT_FAILURE;
+ }
+ /* xor, mutually exclusive */
+ NW_ASSERT(isOpenSingleQuote ^ isOpenDoubleQuote);
+ s = NW_XML_Reader_Advance(pT);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ NW_XML_Reader_Interval_Start(pI, pT);
+ for (;;) {
+
+ /* Check for the closing quotes. If this is empty attribute value
+ * then no need for the checking the entities.
+ */
+
+ if (isOpenSingleQuote) {
+ ssq = NW_XML_Reader_AsciiCharMatch(pT, '\'', &isCloseSingleQuote);
+ }
+ if (isOpenDoubleQuote) {
+ sdq = NW_XML_Reader_AsciiCharMatch(pT, '\"', &isCloseDoubleQuote);
+ }
+ slt = NW_XML_Reader_AsciiCharMatch(pT, '<', &isLessThan);
+ if (NW_STAT_IS_FAILURE(ssq) || NW_STAT_IS_FAILURE(sdq)
+ || NW_STAT_IS_FAILURE(slt) || isLessThan) {
+ return NW_STAT_FAILURE;
+ }
+
+
+ if( (*entityCheck == CXML_TRUE) && !isCloseSingleQuote && !isCloseDoubleQuote)
+ {
+ NW_Uint32 match;
+
+ s = NW_XML_Reader_AsciiCharMatch(pT, '&', &match);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+ if (match)
+ {
+ NW_XML_Reader_Interval_t I_entityData;
+ NW_Bool entityFoundLevel_1 = NW_FALSE; //If end of entity (;) found
+ NW_Uint32 entityVal = 0;
+ NW_XML_Reader_Interval_t* I_attrVal = pI;
+
+
+
+ entityFoundLevel_2 = NW_FALSE;
+ NW_XML_Reader_Interval_Stop(I_attrVal, pT); //Contents before entity
+
+ //Will back if not a valid entity
+ NW_XML_Reader_GetPosition(pT,
+ &prevIndex, &prevCharIndex, &prevLineColumn);
+
+ s = CXML_XML_Parser_Entity(pT,&I_entityData,&entityFoundLevel_1);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+ /*
+ if(entityFoundLevel_1 == NW_FALSE)
+ {
+ return NW_STAT_XHTML_BAD_CONTENT;
+ }
+ */
+ if (entityFoundLevel_1)
+ {
+ // Validate the entity
+ // The following function checks for the character,
+ // predefined and Internal Entities.
+
+ if( (I_entityData.stop - I_entityData.start) > 0)
+ {
+ s = CXML_XML_Handle_entity(pT,
+ &I_entityData,&entityVal,&intEntityValStr,
+ &entityFoundLevel_2,
+ (void*) internalEntityList);
+ }
+ else
+ {
+ //Not a valid entity e.g. "&&;" test case
+ entityFoundLevel_2 = NW_FALSE;
+ }
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ if(entityFoundLevel_2 == CXML_TRUE)
+ {
+ /* Read contents before entity*/
+
+ tempBufLen = I_attrVal->stop - I_attrVal->start;
+
+ if(tempBufLen > 0)
+ {
+
+ if(tempStr == NULL)
+ {
+ tempStr = NW_String_new();
+ if(tempStr == NULL)
+ {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ } /*end if(tempStr == NULL)*/
+
+ s = NW_XML_Data_to_String (pT,I_attrVal,tempStr);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return s;
+ }
+
+ s = NW_String_concatenate(attrValStr,tempStr,pT->encoding);
+
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return s;
+ }
+
+ // Do some clean up
+
+ if(tempStr != NULL)
+ {
+ NW_String_delete(tempStr);
+ tempStr = NULL;
+ }
+
+ }//end if(tempBufLen > 0)
+
+ // Write the entity content now. There are two possibilities for entities.
+ //
+ // 1) If it is character or decimal or predefined entities.
+ // In this case, intEntityValStr = NULL.
+ //
+ // 2) If it is "Internal Entity" then In this case, entityVal = 0;
+
+ if (intEntityValStr == NULL)
+ {
+
+ /* convert contents of the character/predfined entity to string */
+
+ s = NW_String_entityToString(entityVal,&entityValStr,pT->encoding);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return s;
+ }
+ }/*end if (intEntityValStr == NULL)*/
+ else if(entityVal == 0)
+ {
+ /* This is a internal entity string */
+
+ s = NW_String_initialize(&entityValStr,intEntityValStr,pT->encoding);
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return s;
+ }
+ } /*end else if(entityVal == 0)*/
+
+ /* Add this entity value to the string */
+
+ s = NW_String_concatenate(attrValStr,&entityValStr,pT->encoding);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return s;
+ }
+
+
+
+ if(entityValStr.storage != NULL)
+ {
+ NW_Mem_Free (entityValStr.storage);
+ }
+ // Initialize the entity string for next entity
+
+ NW_String_initialize (&entityValStr, NULL, 0);
+
+ //Again start the top level interval
+
+ NW_XML_Reader_Interval_Init(pI);
+ NW_XML_Reader_Interval_Start(pI, pT);
+
+ /*Check for the closing quotes after entity parsing */
+
+ if (isOpenSingleQuote) {
+ ssq = NW_XML_Reader_AsciiCharMatch(pT, '\'', &isCloseSingleQuote);
+ }
+ if (isOpenDoubleQuote) {
+ sdq = NW_XML_Reader_AsciiCharMatch(pT, '\"', &isCloseDoubleQuote);
+ }
+ slt = NW_XML_Reader_AsciiCharMatch(pT, '<', &isLessThan);
+ if (NW_STAT_IS_FAILURE(ssq) || NW_STAT_IS_FAILURE(sdq)
+ || NW_STAT_IS_FAILURE(slt) || isLessThan) {
+ return NW_STAT_FAILURE;
+ }
+ entityFoundOnce = CXML_TRUE;
+ }//endif(entityFoundLevel_2 == CXML_TRUE)
+ else
+ {
+ /* If it is here, the entity is not well formed or a entity is
+ * not supported. But, it is error for now.
+ */
+ /*
+ return NW_STAT_XHTML_BAD_CONTENT;*/
+
+ //No valid entity found. Parse as the normal string
+ NW_XML_Reader_SetPosition(pT,
+ prevIndex,
+ prevCharIndex,
+ &prevLineColumn);
+ }
+
+ } //end if (entityFound && inContent)
+ else
+ {
+ //No valid entity found. Parse as the normal string
+ NW_XML_Reader_SetPosition(pT,
+ prevIndex,
+ prevCharIndex,
+ &prevLineColumn);
+ }//end else
+ } //end match
+ } //end if( !isCloseSingleQuote && !isCloseDoubleQuote)
+
+
+
+ if ((isOpenSingleQuote & isCloseSingleQuote)
+ | (isOpenDoubleQuote & isCloseDoubleQuote)) {
+ break;
+ }
+
+ if(entityFoundLevel_2 != CXML_TRUE)
+ {
+ s = NW_XML_Reader_Advance(pT);
+ }
+ else
+ {
+ entityFoundLevel_2 = CXML_FALSE;
+ }
+ }//end for (;;)
+ NW_XML_Reader_Interval_Stop(pI, pT);
+ s = NW_XML_Reader_Advance(pT);
+
+
+ if( (*entityCheck == CXML_TRUE) &&
+ ( (entityFoundLevel_2 == CXML_TRUE) || (entityFoundOnce == CXML_TRUE) ) )
+ {
+ /* Get rest of the attribute value contents */
+
+
+ tempBufLen = pI->stop - pI->start;
+
+ if(tempBufLen > 0)
+ {
+ if(tempStr == NULL)
+ {
+ tempStr = NW_String_new();
+ if(tempStr == NULL)
+ {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ } /*end if(tempStr == NULL)*/
+ s = NW_XML_Data_to_String (pT,pI,tempStr);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return s;
+ }
+
+
+ s = NW_String_concatenate(attrValStr,tempStr,pT->encoding);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return s;
+ }
+
+ // Do some clean up
+
+ if(tempStr != NULL)
+ {
+ NW_String_delete(tempStr);
+ tempStr = NULL;
+ }
+
+ }//endif(tempBufLen > 0)
+
+ }//end if( (*entityCheck == CXML_TRUE) && (entityFoundLevel_2 == CXML_TRUE) )
+ else
+ {
+ *entityCheck = CXML_FALSE;
+ }
+
+ return s;
+}
+
+/*
+Parses an XML attribute (production ???) in Reader.
+If no parse error, then ti_name and ti_attvalue mark the two items.
+Allows for leading whitespace. If l is > 0 then p is a "string" of
+length l that is the name that must match (parse error if doesn't).
+Assumes position in Reader is at whitespace before or first character
+of attribute.
+return: *pMatch = 1 if keyword or attribute name found
+
+ Careful about the "entity" parameter passed. This is used both as
+ IN/OUT paramter.
+
+ IN --> if(entity == CXML_TRUE): Then parse attribute value for the
+ entities.
+
+ OUT --> (entity=CXML_TRUE): The entity is found in the attribute value.
+*/
+
+
+static
+NW_Status_t
+NW_XML_Parse_AttributeValueConsume(NW_XML_Reader_t* pT,
+ NW_XML_Reader_Interval_t* pI_name,
+ NW_XML_Reader_Interval_t* pI_attvalue,
+ NW_Uint32 l, const NW_Uint8* pKeyword,
+ NW_Uint32* pMatch,
+ CXML_Bool* entity, NW_String_t* attrValStr,
+ const RPointerArray <CXML_Internal_Entity_t>* internalEntityList)
+{
+ /*
+ [41] Attribute ::= Name Eq AttValue
+ where Name is possibly a keyword that must match
+ */
+ NW_Status_t s;
+ NW_Uint32 match;
+ NW_Uint32 prevIndex0;
+ NW_Uint32 prevIndex1;
+ NW_Uint32 prevCharIndex0;
+ NW_Uint32 prevCharIndex1;
+ NW_XML_Reader_LineColumn_t prevLineColumn0;
+ NW_XML_Reader_LineColumn_t prevLineColumn1;
+
+ *pMatch = 0;
+
+ /* S mandatory */
+ NW_XML_Reader_GetPosition(pT, &prevIndex0, &prevCharIndex0, &prevLineColumn0);
+ s = NW_XML_Reader_SkipSpace(pT);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ NW_XML_Reader_GetPosition(pT, &prevIndex1, &prevCharIndex1, &prevLineColumn1);
+ if (prevIndex0 == prevIndex1) {
+ return NW_STAT_FAILURE;
+ }
+ /* Name */
+ if ((l != 0U) && (pKeyword != NULL)) {
+ s = NW_XML_Parse_KeywordConsume(pT, pI_name, l, pKeyword, pMatch);
+ if (NW_STAT_IS_SUCCESS(s) && !*pMatch) {
+ /* backup so mandatory space not consumed */
+ NW_XML_Reader_SetPosition(pT, prevIndex0, prevCharIndex0, &prevLineColumn0);
+ }
+ } else {
+ s = NW_XML_Parse_NameConsume(pT, pI_name, pMatch);
+ }
+ if (NW_STAT_IS_FAILURE(s) || !*pMatch) {
+ return NW_STAT_FAILURE;
+ }
+ /* S */
+ s = NW_XML_Reader_SkipSpace(pT);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ /* = */
+ s = NW_XML_Reader_AsciiCharMatch(pT, '=', &match);
+ if (NW_STAT_IS_FAILURE(s) || !match) {
+ return NW_STAT_FAILURE;
+ }
+ s = NW_XML_Reader_Advance(pT);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ /* S */
+ s = NW_XML_Reader_SkipSpace(pT);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ /* attValue */
+
+ if(*entity == CXML_FALSE)
+ {
+ return NW_XML_Parse_ValueConsume(pT, pI_attvalue,entity,NULL, internalEntityList);
+ }
+ else
+ {
+ return NW_XML_Parse_ValueConsume(pT, pI_attvalue,entity,attrValStr, internalEntityList);
+ }
+}
+
+/*
+Parses an XML Comment (production 15) in Reader.
+If no parse error, then ti marks the Comment--all chars
+between the start and end marks including spaces.
+Assumes position in Reader is the character after "<!--".
+*/
+static
+NW_Status_t
+NW_XML_Parse_CommentConsume(NW_XML_Reader_t* pT, NW_XML_Reader_Interval_t* pI,
+ const struct NW_XML_Parser_EventCallbacks_s* pE)
+{
+ /*
+ [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
+
+ Note: the pattern with (Char - '-') means that the comment cannot
+ end with '--->' although it can begin with '<!--...'.
+
+ Also, '--' may not appear in a comment.
+ BUG not yet implemented
+ */
+ NW_Status_t s;
+ NW_Uint32 match;
+
+ NW_XML_Reader_Interval_Start(pI, pT);
+ for (;;) {
+ s = NW_XML_Reader_AsciiStringMatch(pT, NW_XML_String_CommentStopLength,
+ NW_XML_String_CommentStop, &match);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ if (match) {
+ break;
+ }
+ s = NW_XML_Reader_Advance(pT);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ }
+ NW_XML_Reader_Interval_Stop(pI, pT);
+ s = NW_XML_Reader_AdvanceOffset(pT, NW_XML_String_CommentStopLength);
+ NW_ASSERT(NW_STAT_IS_SUCCESS(s)); /* should never fail */
+ if (pE->Comment_CB != NULL) {
+ s = (*(pE->Comment_CB))(pT, pI, pE->pClientPointer);
+ }
+ return s;
+}
+
+/*
+Parses things that start with "<?". These are XMLDecl, TextDecl and
+the Processing Instruction. On return the formType distinguishes which one
+was consumed. If it was a PI then ti_name marks the PITarget and
+ti_content marks the text "argument" of the PI. If it was an XMLDecl
+(or TextDecl) then examine the booleans to see if various attributes appeared.
+Note that XMLDecl must have VersionInfo and a TextDecl must not have an SDDecl.
+Neither XMLDecl or TextDecl should have additional content
+(i.e., *ti_contentValid should be 0).
+Assumes position in Reader is the character after "<?".
+*/
+static
+NW_Status_t
+NW_XML_Parse_PiFormConsume(NW_XML_Reader_t* pT, NW_PiFormTypeTag_t* pFormType,
+ NW_Uint32* pNameValid,
+ NW_XML_Reader_Interval_t* pI_name,
+ NW_Uint32* pVersionValid,
+ NW_XML_Reader_Interval_t* pI_version,
+ NW_Uint32* pEncodingValid,
+ NW_XML_Reader_Interval_t* pI_encoding,
+ NW_Uint32* pStandaloneValid,
+ NW_XML_Reader_Interval_t* pI_standalone,
+ NW_Uint32* pContentValid,
+ NW_XML_Reader_Interval_t* pI_content,
+ const RPointerArray <CXML_Internal_Entity_t>* internalEntityList)
+{
+ /*
+ [16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
+
+ [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
+
+ when name is an XMLDecl or TextDecl then parse according to
+
+ [23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
+
+ [77] TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>'
+
+ [24] VersionInfo ::= S 'version' Eq ("'" VersionNum "'"
+ | '"' VersionNum '"')
+
+ [26] VersionNum ::= ([a-zA-Z0-9_.:] | '-')+
+
+ [80] EncodingDecl ::= S 'encoding' Eq
+ ('"' EncName '"' | "'" EncName "'" )
+
+ [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
+
+ [32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'")
+ | ('"' ('yes' | 'no') '"'))
+
+ */
+ NW_Status_t s;
+ NW_XML_Reader_Interval_t I_keyword;
+ NW_Uint32 prevIndex;
+ NW_Uint32 prevCharIndex;
+ NW_XML_Reader_LineColumn_t prevLineColumn;
+ NW_Uint32 match;
+ NW_Uint32 i;
+ CXML_Bool entity = CXML_FALSE;
+
+
+ *pNameValid = *pVersionValid = *pEncodingValid = 0;
+ *pStandaloneValid = *pContentValid = 0;
+ *pFormType = UNKNOWFORM;
+
+
+ s = NW_STAT_FAILURE;
+ match = 0;
+ /* Will back up if "xml" is part of a longer name like "xml-stylesheet". */
+ NW_XML_Reader_GetPosition(pT,
+ &prevIndex, &prevCharIndex, &prevLineColumn);
+ for (i = 0; i < NW_XML_String_XmlNameVariationCount; i++) {
+ s = NW_XML_Parse_KeywordConsume(pT, pI_name,
+ NW_XML_String_XmlLength,
+ (NW_XML_String_XmlVariations
+ + NW_XML_String_XmlLength * i),
+ &match);
+ if (NW_STAT_IS_SUCCESS(s) && match) {
+ /* Make sure that the "xml" variant isn't part of a longer name */
+ NW_Uint32 m;
+ /* look for end of piform */
+ s = NW_XML_Reader_AsciiStringMatch(pT, NW_XML_String_PiFormStopLength,
+ NW_XML_String_PiFormStop, &m);
+ if (NW_STAT_IS_SUCCESS(s) && m) {
+ break;
+ }
+ /* look for whitespace */
+ s = NW_XML_Reader_IsSpace(pT, &m);
+ if (NW_STAT_IS_SUCCESS(s) && m) {
+ break;
+ }
+ /* if get here then "xml" variant is part of a longer name,
+ fail match, back up and shortcut out of loop */
+ match = 0;
+ NW_XML_Reader_SetPosition(pT,
+ prevIndex,
+ prevCharIndex,
+ &prevLineColumn);
+ i = NW_XML_String_XmlNameVariationCount;
+ break;
+ }
+ }
+
+ if (NW_STAT_IS_SUCCESS(s) && !match) {
+ s = NW_XML_Parse_NameConsume(pT, pI_name, &match);
+ }
+ if (NW_STAT_IS_FAILURE(s) || !match) {
+ return NW_STAT_FAILURE;
+ }
+ *pNameValid = 1;
+
+ /* Support all the XML declaration starting with any possible combination. */
+
+ if (i < NW_XML_String_XmlNameVariationCount)
+ {
+ /* BUG there is currently no checking of legal values according
+ to productions 26, 81 and 32 */
+ *pFormType = XMLDECL;
+ s = NW_XML_Parse_AttributeValueConsume(pT, &I_keyword, pI_version,
+ NW_XML_String_VersionLength,
+ NW_XML_String_Version, &match,
+ &entity,NULL,
+ internalEntityList);
+ if (NW_STAT_IS_FAILURE(s)) {
+ if (match) {
+ return NW_STAT_FAILURE; /* couldn't parse version value */
+ }
+ } else {
+ if (match) {
+ *pVersionValid = 1;
+ }
+ }
+ s = NW_XML_Parse_AttributeValueConsume(pT, &I_keyword, pI_encoding,
+ NW_XML_String_EncodingLength,
+ NW_XML_String_Encoding, &match,
+ &entity,NULL,internalEntityList);
+ if (NW_STAT_IS_FAILURE(s)) {
+ if (match) {
+ return NW_STAT_FAILURE; /* couldn't parse encoding value */
+ }
+ } else {
+ if (match) {
+ *pEncodingValid = 1;
+ }
+ }
+ s = NW_XML_Parse_AttributeValueConsume(pT, &I_keyword, pI_standalone,
+ NW_XML_String_StandaloneLength,
+ NW_XML_String_Standalone, &match,
+ &entity,NULL,internalEntityList);
+ if (NW_STAT_IS_FAILURE(s)) {
+ if (match) {
+ return NW_STAT_FAILURE; /* couldn't parse standalone value */
+ }
+ } else {
+ if (match) {
+ *pStandaloneValid = 1;
+ }
+ }
+ } else {
+ *pFormType = PI;
+ }
+ s = NW_XML_Reader_SkipSpace(pT);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ NW_XML_Reader_Interval_Start(pI_content, pT);
+ for (;;) {
+ s = NW_XML_Reader_AsciiStringMatch(pT, NW_XML_String_PiFormStopLength,
+ NW_XML_String_PiFormStop, &match);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ if (match) {
+ break;
+ }
+ s = NW_XML_Reader_Advance(pT);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ }
+ NW_XML_Reader_Interval_Stop(pI_content, pT);
+ if (pI_content->start == pI_content->stop) {
+ *pContentValid = 0;
+ } else {
+ *pContentValid = 1;
+ }
+ s = NW_XML_Reader_AdvanceOffset(pT, NW_XML_String_PiFormStopLength);
+ NW_ASSERT(NW_STAT_IS_SUCCESS(s)); /* should never fail */
+ return s;
+}
+
+/* Assumes position is either at whitespace or beginning of text. */
+static
+NW_Status_t
+NW_XML_Parse_MiscConsume(NW_XML_Reader_t* pT,
+ const struct NW_XML_Parser_EventCallbacks_s* pE,
+ const RPointerArray <CXML_Internal_Entity_t>* internalEntityList)
+{
+ /*
+ [27] Misc ::= Comment | PI | S
+
+ Note: All invocations of this production take the form "Misc*"
+ */
+ NW_Status_t s;
+ NW_XML_Reader_Interval_t I;
+ NW_Uint32 match;
+ NW_Uint32 prevIndex0; /* will do while there is advancement thru Reader */
+ NW_Uint32 prevIndex1; /* will do while there is advancement thru Reader */
+ NW_Uint32 prevCharIndex; /* ignored */
+ NW_XML_Reader_LineColumn_t prevLineColumn; /* ignored */
+ do {
+ NW_XML_Reader_GetPosition(pT, &prevIndex0, &prevCharIndex, &prevLineColumn);
+ s = NW_XML_Reader_SkipSpace(pT);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+
+ if(pT->end){
+ break;
+ }
+ s = NW_XML_Parse_KeywordConsume(pT, &I,
+ NW_XML_String_CommentStartLength,
+ NW_XML_String_CommentStart, &match);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ if (match) {
+ s = NW_XML_Parse_CommentConsume(pT, &I, pE);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ } else {
+ s = NW_XML_Parse_KeywordConsume(pT, &I,
+ NW_XML_String_PiFormStartLength,
+ NW_XML_String_PiFormStart, &match);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ if (match) {
+ NW_PiFormTypeTag_t pi_type;
+ NW_XML_Reader_Interval_t I_name, I_version, I_encoding, I_standalone;
+ NW_XML_Reader_Interval_t I_content;
+ NW_Uint32 nameValid, versionValid, encodingValid, standaloneValid;
+ NW_Uint32 contentValid;
+ s = NW_XML_Parse_PiFormConsume(pT, &pi_type,
+ &nameValid,
+ &I_name,
+ &versionValid,
+ &I_version,
+ &encodingValid,
+ &I_encoding,
+ &standaloneValid,
+ &I_standalone,
+ &contentValid,
+ &I_content,
+ internalEntityList);
+ if (NW_STAT_IS_FAILURE(s) || !nameValid) {
+ return NW_STAT_FAILURE;
+ }
+ if (pi_type != PI) {
+ /* BUG Is this really an illegal case? */
+ return NW_STAT_FAILURE;
+ }
+ if (pE->PiForm_CB != NULL) {
+ s = (*(pE->PiForm_CB))(pT, pi_type,
+ (nameValid ? &I_name : NULL),
+ (versionValid ? &I_version : NULL),
+ (encodingValid ? &I_encoding : NULL),
+ (standaloneValid ? &I_standalone : NULL),
+ (contentValid ? &I_content : NULL),
+ pE->pClientPointer);
+ }
+ }
+ }
+ NW_XML_Reader_GetPosition(pT, &prevIndex1, &prevCharIndex, &prevLineColumn);
+ } while (prevIndex0 != prevIndex1); /* do while */
+ return NW_STAT_SUCCESS;
+}
+
+
+/* on entry position should be just after '<!DOCTYPE' */
+
+static
+NW_Status_t
+NW_XML_Parse_InternalEntity(NW_XML_Reader_t* pT,
+ RPointerArray <CXML_Internal_Entity_t>* internalEntityList)
+{
+ NW_Status_t s;
+ NW_XML_Reader_Interval_t I_EntityName;
+ NW_Uint32 match;
+ NW_XML_Reader_Interval_t I_EntityValue;
+ NW_Uint32 quoteChar = 0; /* 0 = double quote, 1 = single quote */
+ NW_Uint32 matchDoubleQuote;
+ NW_Uint32 matchSingleQuote;
+ NW_Uint32 matchPercentSign;
+ NW_Status_t statusDoubleQuote;
+ NW_Status_t statusSingleQuote;
+
+
+
+
+ s = NW_XML_Reader_SkipSpace(pT);
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ /* The Internal Parameteric Entities has "%" symbol in the beginning of the entity.
+ * Check for parametric entity has skip the symbol.
+ */
+
+ s = NW_XML_Reader_AsciiCharMatch(pT, '%', &matchPercentSign);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ if(matchPercentSign)
+ {
+ /*Advance from '%' sign */
+
+ s = NW_XML_Reader_Advance(pT);
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ s = NW_XML_Reader_SkipSpace(pT);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ } /*end if(matchPercentSign)*/
+
+ /* Name */
+
+ s = NW_XML_Parse_NameConsume(pT, &I_EntityName, &match);
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ if (!match)
+ {
+ /* FATAL bad tag */
+ return NW_STAT_FAILURE;
+ }
+
+ /* S, space may be there after the Entry Name */
+
+ s = NW_XML_Reader_SkipSpace(pT);
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ /* Look for opening single or double quote. Let the closing '>'
+ * be handled in the DTD function.
+ */
+
+ statusDoubleQuote = NW_XML_Reader_AsciiCharMatch(pT, '\"', &matchDoubleQuote);
+ statusSingleQuote = NW_XML_Reader_AsciiCharMatch(pT, '\'', &matchSingleQuote);
+
+ if (NW_STAT_IS_FAILURE(statusDoubleQuote)
+ || NW_STAT_IS_FAILURE(statusSingleQuote) )
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ if(matchDoubleQuote || matchSingleQuote)
+ {
+
+ if(matchSingleQuote) /* Look for corresponding quote */
+ {
+ quoteChar = 1; /* 0 = double quote, 1 = single quote */
+ }
+ /*Advance from the Quote */
+
+ s = NW_XML_Reader_Advance(pT);
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ /* Start the Internal for the name space */
+
+ NW_XML_Reader_Interval_Start(&I_EntityValue, pT);
+
+ for(; ;)
+ {
+ statusDoubleQuote = NW_XML_Reader_AsciiCharMatch(pT, '\"', &matchDoubleQuote);
+ statusSingleQuote = NW_XML_Reader_AsciiCharMatch(pT, '\'', &matchSingleQuote);
+
+ if(matchDoubleQuote || matchSingleQuote)
+ {
+ if(!quoteChar && matchDoubleQuote)
+ {
+ NW_XML_Reader_Interval_Stop(&I_EntityValue, pT);
+ break;
+ }
+ else if(quoteChar && matchSingleQuote)
+ {
+ NW_XML_Reader_Interval_Stop(&I_EntityValue, pT);
+ break;
+ }
+ }/* if(matchDoubleQuote || matchSingleQuote)*/
+
+ /*Read next character */
+
+ s = NW_XML_Reader_Advance(pT);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ }/*end for */
+ }/*end if(statusDoubleQuote || statusSingleQuote)*/
+
+
+ s = CXML_XML_Parser_Store_I_Entity(pT,&I_EntityName,&I_EntityValue,internalEntityList);
+
+ if(s != NW_STAT_SUCCESS )
+ {
+ return s;
+ }
+
+
+ return NW_STAT_SUCCESS;
+
+}/*end NW_XML_Parse_InternalEntity() */
+
+/* on entry position should be just after '<!DOCTYPE' */
+static
+NW_Status_t
+NW_XML_Parse_DtdConsume(NW_XML_Reader_t* pT,
+ RPointerArray <CXML_Internal_Entity_t>* internalEntityList)
+{
+ NW_Status_t s;
+ NW_XML_Reader_Interval_t I_name;
+ NW_Uint32 match;
+ NW_XML_Reader_Interval_t I_keyword;
+ NW_Uint32 inString = 0;
+ NW_Uint32 quoteChar = 0; /* 0 = double quote, 1 = single quote */
+ NW_Uint32 balance = 1; /* already read opening greater-than sign */
+
+ /* S */
+ s = NW_XML_Reader_SkipSpace(pT);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ /* Name */
+ s = NW_XML_Parse_NameConsume(pT, &I_name, &match);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ if (!match) {
+ /* FATAL bad tag */
+ return NW_STAT_FAILURE;
+ }
+ /* You can put quoted '<' and '>' in literal value strings which must be ignored. */
+ while (balance) {
+ NW_Uint32 matchDoubleQuote;
+ NW_Uint32 matchSingleQuote;
+ NW_Uint32 matchGreaterThan;
+ NW_Uint32 matchLessThan;
+ NW_Status_t statusDoubleQuote;
+ NW_Status_t statusSingleQuote;
+ NW_Status_t statusGreaterThan;
+ NW_Status_t statusLessThan;
+
+ statusDoubleQuote = NW_XML_Reader_AsciiCharMatch(pT, '\"', &matchDoubleQuote);
+ statusSingleQuote = NW_XML_Reader_AsciiCharMatch(pT, '\'', &matchSingleQuote);
+ statusGreaterThan = NW_XML_Reader_AsciiCharMatch(pT, '>', &matchGreaterThan);
+ statusLessThan = NW_XML_Reader_AsciiCharMatch(pT, '<', &matchLessThan);
+
+ if (NW_STAT_IS_FAILURE(statusDoubleQuote)
+ || NW_STAT_IS_FAILURE(statusSingleQuote)
+ || NW_STAT_IS_FAILURE(statusGreaterThan)
+ || NW_STAT_IS_FAILURE(statusLessThan)) {
+ return NW_STAT_FAILURE;
+ }
+
+ if (inString) {
+ if (quoteChar) {
+ if (matchSingleQuote) {
+ inString = 0;
+ }
+ } else if (matchDoubleQuote) {
+ inString = 0;
+ }
+ } else
+ {
+ if (matchGreaterThan)
+ {
+ NW_ASSERT(balance);
+ balance--;
+ } else if (matchLessThan)
+ {
+ balance++;
+ /* '<!ENTITY' */
+ s = NW_XML_Parse_KeywordConsume(pT, &I_keyword,
+ NW_XML_String_EntityStartLength,
+ NW_XML_String_EntityStart, &match);
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+ if (match)
+ {
+ s = NW_XML_Parse_InternalEntity(pT,internalEntityList);
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+ }
+ } else if (matchSingleQuote)
+ {
+ quoteChar = 1;
+ inString = 1;
+ }
+ else if (matchDoubleQuote)
+ {
+ quoteChar = 0;
+ inString = 1;
+ }
+ } /*end else */
+ s = NW_XML_Reader_Advance(pT);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ }
+ return NW_STAT_SUCCESS;
+}
+
+static
+NW_Status_t
+NW_XML_Parse_PrologConsume(NW_XML_Reader_t* pT,
+ const struct NW_XML_Parser_EventCallbacks_s* pE,
+ RPointerArray <CXML_Internal_Entity_t>* internalEntityList)
+{
+ /*
+ [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?
+
+ [23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
+
+ [24] VersionInfo ::= S 'version' Eq ("'" VersionNum "'"
+ | '"' VersionNum '"')
+
+ [26] VersionNum ::= ([a-zA-Z0-9_.:] | '-')+
+ */
+
+ /* '<?' */
+ NW_Status_t s;
+ NW_Uint32 match;
+ NW_PiFormTypeTag_t pi_type;
+ NW_Uint32 nameValid;
+ NW_XML_Reader_Interval_t I_name;
+ NW_Uint32 versionValid;
+ NW_XML_Reader_Interval_t I_version;
+ NW_Uint32 encodingValid;
+ NW_XML_Reader_Interval_t I_encoding;
+ NW_Uint32 standaloneValid;
+ NW_XML_Reader_Interval_t I_standalone;
+ NW_Uint32 contentValid;
+ NW_XML_Reader_Interval_t I_content;
+ NW_XML_Reader_Interval_t I_keyword;
+ NW_Uint32 prevIndex;
+ NW_Uint32 prevCharIndex;
+ NW_XML_Reader_LineColumn_t prevLineColumn;
+
+ /* Might back up if PiForm is from Misc */
+ NW_XML_Reader_GetPosition(pT, &prevIndex, &prevCharIndex, &prevLineColumn);
+
+ s = NW_XML_Parse_KeywordConsume(pT, &I_keyword,
+ NW_XML_String_PiFormStartLength,
+ NW_XML_String_PiFormStart, &match);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ if (match) {
+ NW_Uint32 error = 0;
+ /* XMLDecl */
+ s = NW_XML_Parse_PiFormConsume(pT, &pi_type,
+ &nameValid,
+ &I_name,
+ &versionValid,
+ &I_version,
+ &encodingValid,
+ &I_encoding,
+ &standaloneValid,
+ &I_standalone,
+ &contentValid,
+ &I_content,
+ internalEntityList);
+ if (NW_STAT_IS_FAILURE(s) || !nameValid) {
+ return NW_STAT_FAILURE;
+ }
+ switch (pi_type) {
+ case XMLDECL:
+ /* BUG not checking for legal values of version,
+ encoding and standalone */
+ if (!versionValid) {
+ /* version is mandatory */
+ error = 1;
+ }
+ if (contentValid) {
+ /* no other attribute info is legal */
+ error = 1;
+ }
+ if (!error && (pE->PiForm_CB != NULL)) {
+ s = (*(pE->PiForm_CB))(pT, pi_type,
+ (nameValid ? &I_name : NULL),
+ (versionValid ? &I_version : NULL),
+ (encodingValid ? &I_encoding : NULL),
+ (standaloneValid ? &I_standalone : NULL),
+ (contentValid ? &I_content : NULL),
+ pE->pClientPointer);
+ }
+ break;
+ case PI:
+ /* encountered a PI from Misc, rewind and continue */
+ NW_XML_Reader_SetPosition(pT, prevIndex, prevCharIndex, &prevLineColumn);
+ break;
+ default:
+ error = 1;
+ break;
+ }
+ if (error) {
+ if (pE->Exception_CB != NULL) {
+ s = (*(pE->Exception_CB))(pT, pE->pClientPointer);
+ }
+ return NW_STAT_FAILURE;
+ }
+ }
+ /* MISC */
+ s = NW_XML_Parse_MiscConsume(pT, pE,internalEntityList);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ /* '<!DOCTYPE' */
+ s = NW_XML_Parse_KeywordConsume(pT, &I_keyword,
+ NW_XML_String_DoctypeStartLength,
+ NW_XML_String_DoctypeStart, &match);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ if (match) {
+ s = NW_XML_Parse_DtdConsume(pT,internalEntityList);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ }
+ /* MISC */
+ s = NW_XML_Parse_MiscConsume(pT, pE,internalEntityList);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/* Assumes read position is at '<' on entry.
+return: *pIsEmptyElement = 1 if it is an EmptyElemTag. */
+static
+NW_Status_t
+NW_XML_Parse_ElementOpeningMarkupConsume(NW_XML_Reader_t* pT,
+ NW_Uint32* pIsEmptyElement,
+ const struct
+ NW_XML_Parser_EventCallbacks_s* pE,
+ const RPointerArray <CXML_Internal_Entity_t>* internalEntityList)
+{
+ /*
+ [40] STag ::= '<' Name (S Attribute)* S? '>'
+
+ [41] Attribute ::= Name Eq AttValue
+
+ [44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>'
+ */
+
+ NW_Status_t s;
+ NW_XML_Reader_Interval_t I_name;
+ NW_XML_Reader_Interval_t I_attName;
+ NW_XML_Reader_Interval_t I_attValue;
+ NW_Uint32 match;
+ NW_Uint32 attributeCount;
+ CXML_Bool entity = CXML_TRUE;
+ NW_String_t attrValStr;
+ NW_Byte* finalStr = NULL;
+ NW_Uint32 finalStrLen = 0;
+ NW_String_initialize (&attrValStr, NULL, 0);
+
+
+ *pIsEmptyElement = 0;
+ /* '<' */
+ s = NW_XML_Reader_AsciiCharMatch(pT, '<', &match);
+ if (NW_STAT_IS_FAILURE(s) || !match) {
+ return NW_STAT_FAILURE;
+ }
+ s = NW_XML_Reader_Advance(pT);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ /* Name */
+ s = NW_XML_Parse_NameConsume(pT, &I_name, &match);
+ if (NW_STAT_IS_FAILURE(s) || !match) {
+ return NW_STAT_FAILURE;
+ }
+ if (pE->Tag_Start_CB != NULL) {
+ s = (*(pE->Tag_Start_CB))(pT, &I_name, pE->pClientPointer);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ }
+ /* Do attribute value consume and look for closing markup. */
+ for (attributeCount = 0;;) {
+ entity = CXML_TRUE;
+ s = NW_XML_Parse_AttributeValueConsume(pT, &I_attName, &I_attValue,
+ 0, NULL, &match,
+ &entity,&attrValStr,internalEntityList);
+
+ if (NW_STAT_IS_SUCCESS(s) && match && (entity != CXML_TRUE) ) {
+ attributeCount++;
+ if (pE->Attr_Start_CB != NULL) {
+ s = (*(pE->Attr_Start_CB))(pT, &I_attName, pE->pClientPointer);
+ if (NW_STAT_IS_SUCCESS(s)) {
+ if (pE->Attr_VarVal_CB != NULL) {
+ s = (*(pE->Attr_VarVal_CB))(pT, &I_attName, &I_attValue,
+ pE->pClientPointer);
+ }
+ }
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ if(attrValStr.storage != NULL)
+ {
+ NW_Mem_Free(attrValStr.storage);
+ }
+ NW_String_initialize (&attrValStr, NULL, 0);
+ }
+ continue;
+ }
+ else if(NW_STAT_IS_SUCCESS(s) && match && (entity == CXML_TRUE) )
+ {
+ attributeCount++;
+ if (pE->Attr_Start_CB != NULL) {
+ s = (*(pE->Attr_Start_CB))(pT, &I_attName, pE->pClientPointer);
+ if (NW_STAT_IS_SUCCESS(s)) {
+ if (pE->Attr_Entity_VarVal_CB != NULL) {
+ /* The MSB of NW_Byte length if set represents that the
+ string is from storage buffer, so BufferOwns String. So,
+ find exact length.
+ */
+ finalStrLen = attrValStr.length & 0x7fffffff;
+
+ /* This string is with the NULL terminate character. But,
+ * the callback function Attr_Entity_VarVal_CB(..) requires
+ * with out this. So, take out NULL termination character
+ * length depending on the Encoding.
+ */
+
+ if ( (pT->encoding == HTTP_iso_10646_ucs_2) &&
+ (finalStrLen > 1) &&
+ (attrValStr.storage[(finalStrLen-1)] == 0) &&
+ (attrValStr.storage[(finalStrLen-2)] == 0) )
+ {
+ finalStrLen--;
+ finalStrLen--;
+ }
+ else if ((pT->encoding == HTTP_utf_8) ||
+ (pT->encoding == HTTP_us_ascii) ||
+ (pT->encoding== HTTP_iso_8859_1))
+ {
+ if ( (finalStrLen > 0) && (attrValStr.storage[finalStrLen-1] == 0) )
+ {
+ finalStrLen--;
+ }
+ }
+
+ finalStr = (NW_Byte*) NW_Mem_Malloc(finalStrLen);
+ if(finalStr == NULL)
+ {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ CXML_Mem_memcpy(finalStr,attrValStr.storage,finalStrLen);
+
+ s = (*(pE->Attr_Entity_VarVal_CB))(pT, &I_attName,
+ finalStr,finalStrLen,pE->pClientPointer);
+ if(finalStr != NULL)
+ {
+ NW_Mem_Free(finalStr);
+ finalStr = NULL;
+ }
+ }
+ }
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+
+ if(attrValStr.storage != NULL)
+ {
+ NW_Mem_Free(attrValStr.storage);
+ }
+ NW_String_initialize (&attrValStr, NULL, 0);
+ }
+ continue;
+
+ }//end else if(NW_STAT_IS_SUCCESS(s) && match && (entity != CXML_TRUE) )
+ if (NW_STAT_IS_FAILURE(s) && match) {
+ return NW_STAT_FAILURE;
+ }
+ s = NW_XML_Reader_AsciiCharMatch(pT, '>', &match);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ if (match) {
+ s = NW_XML_Reader_Advance(pT);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ if (pE->Attributes_End_CB != NULL) {
+ s = (*(pE->Attributes_End_CB))(pT, attributeCount,
+ pE->pClientPointer);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ }
+ break;
+ }
+ s = NW_XML_Reader_AsciiStringMatch(pT, NW_XML_String_EmptyTagEndLength,
+ NW_XML_String_EmptyTagEnd, &match);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ if (match) {
+ s = NW_XML_Reader_AdvanceOffset(pT, NW_XML_String_EmptyTagEndLength);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ if (pE->Attributes_End_CB != NULL) {
+ s = (*(pE->Attributes_End_CB))(pT, attributeCount,
+ pE->pClientPointer);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ }
+ *pIsEmptyElement = 1;
+ if (pE->Tag_End_CB != NULL) {
+ s = (*(pE->Tag_End_CB))(pT, &I_name,
+ 1, /* empty tag*/
+ pE->pClientPointer);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ }
+ break;
+ }
+ return NW_STAT_FAILURE;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/* Assumes position is at '<' on entry. */
+static
+NW_Status_t
+NW_XML_Parse_ElementConsume(NW_XML_Reader_t* pT,
+ const struct NW_XML_Parser_EventCallbacks_s* pE,
+ const RPointerArray <CXML_Internal_Entity_t>* internalEntityList)
+{
+ /*
+ [39] element ::= EmptyElemTag | STag content ETag
+
+ [40] STag ::= '<' Name (S Attribute)* S? '>'
+
+ [41] Attribute ::= Name Eq AttValue
+
+ [42] ETag ::= '</' Name S? '>'
+
+ [43] content ::= CharData?
+ ((element | Reference | CDSect | PI | Comment)
+ CharData?)*
+
+ [44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>'
+ */
+ NW_Status_t s;
+ NW_Uint32 match;
+ NW_Uint32 isEmptyElement;
+ NW_Uint32 nestingCount;
+ NW_Uint32 inContent;
+ NW_Uint32 prevIndex;
+ NW_Uint32 prevCharIndex;
+ CXML_Uint8* intEntityValStr = NULL;
+ NW_Uint32 contentLen = 0;
+ NW_XML_Reader_LineColumn_t prevLineColumn;
+ NW_Bool entityFoundLevel_2 = NW_FALSE;
+ NW_XML_Reader_Interval_t I_elementContent;
+ NW_XML_Reader_Interval_Init(&I_elementContent);
+
+
+ s = NW_XML_Reader_SkipSpace(pT);
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ /* Look for initial element markup. */
+ s = NW_XML_Parse_ElementOpeningMarkupConsume(pT, &isEmptyElement, pE, internalEntityList);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ if (isEmptyElement) {
+ return NW_STAT_SUCCESS;
+ }
+ inContent = 0;
+ for (nestingCount = 1; nestingCount;) {
+ /* test for ETag */
+ s = NW_XML_Reader_AsciiStringMatch(pT, NW_XML_String_EndTagStartLength,
+ NW_XML_String_EndTagStart, &match);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ if (match)
+ {
+ NW_XML_Reader_Interval_t I_name;
+ if (inContent)
+ {
+ inContent = 0;
+ NW_XML_Reader_Interval_Stop(&I_elementContent, pT);
+
+ /*Write the contents only if I_elementContent have some contents*/
+
+ if(NW_XML_Reader_Interval_IsWellFormed(&I_elementContent) )
+ {
+ if (pE->Content_CB != NULL)
+ {
+ s = (*(pE->Content_CB))(pT, &I_elementContent, pE->pClientPointer);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ }/*end if (pE->Content_CB != NULL)*/
+ }
+ }/*end if(inContent)*/
+
+ s = NW_XML_Reader_AdvanceOffset(pT, NW_XML_String_EndTagStartLength);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ /* Name */
+ s = NW_XML_Parse_NameConsume(pT, &I_name, &match);
+ if (NW_STAT_IS_FAILURE(s) || !match) {
+ return NW_STAT_FAILURE;
+ }
+ /* S */
+ s = NW_XML_Reader_SkipSpace(pT);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ /* '>' */
+ s = NW_XML_Reader_AsciiCharMatch(pT, '>', &match);
+ if (NW_STAT_IS_FAILURE(s) || !match) {
+ return NW_STAT_FAILURE;
+ }
+ s = NW_XML_Reader_Advance(pT);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ /* FUTURE could check that Etag name matches STag name */
+ nestingCount--;
+ if (pE->Tag_End_CB != NULL) {
+ s = (*(pE->Tag_End_CB))(pT, &I_name,
+ 0, /* not empty tag */
+ pE->pClientPointer);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ /*Just now element (tag) is consumned so contenst will start
+ *after this. So, init the content pointer.
+ */
+
+ NW_XML_Reader_Interval_Start(&I_elementContent, pT);
+ }
+ continue;
+ } /*end if(match) */
+
+
+ /* test for PI */
+ s = NW_XML_Reader_AsciiStringMatch(pT, NW_XML_String_PiFormStartLength,
+ NW_XML_String_PiFormStart, &match);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ if (match) {
+ NW_PiFormTypeTag_t pi_type;
+ NW_XML_Reader_Interval_t I_name, I_version, I_encoding, I_standalone;
+ NW_XML_Reader_Interval_t I_content;
+ NW_Uint32 nameValid, versionValid, encodingValid, standaloneValid;
+ NW_Uint32 contentValid;
+ if (inContent) {
+ inContent = 0;
+ NW_XML_Reader_Interval_Stop(&I_elementContent, pT);
+ if (pE->Content_CB != NULL) {
+ s = (*(pE->Content_CB))(pT, &I_elementContent, pE->pClientPointer);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ }
+ }
+ s = NW_XML_Reader_AdvanceOffset(pT, NW_XML_String_PiFormStartLength);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ s = NW_XML_Parse_PiFormConsume(pT, &pi_type,
+ &nameValid,
+ &I_name,
+ &versionValid,
+ &I_version,
+ &encodingValid,
+ &I_encoding,
+ &standaloneValid,
+ &I_standalone,
+ &contentValid,
+ &I_content,
+ internalEntityList);
+ if (NW_STAT_IS_FAILURE(s) || !nameValid) {
+ return NW_STAT_FAILURE;
+ }
+ if (pi_type == PI && (pE->PiForm_CB != NULL)) {
+ s = (*(pE->PiForm_CB))(pT, pi_type,
+ (nameValid ? &I_name : NULL),
+ (versionValid ? &I_version : NULL),
+ (encodingValid ? &I_encoding : NULL),
+ (standaloneValid ? &I_standalone : NULL),
+ (contentValid ? &I_content : NULL),
+ pE->pClientPointer);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ }
+ if (pi_type != PI) {
+ /* BUG is this correct? */
+ return NW_STAT_FAILURE;
+ }
+ continue;
+ }
+ /* test for Comment */
+ s = NW_XML_Reader_AsciiStringMatch(pT, NW_XML_String_CommentStartLength,
+ NW_XML_String_CommentStart, &match);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ if (match) {
+ NW_XML_Reader_Interval_t I_comment;
+ if (inContent) {
+ inContent = 0;
+ NW_XML_Reader_Interval_Stop(&I_elementContent, pT);
+ if (pE->Content_CB != NULL) {
+ s = (*(pE->Content_CB))(pT, &I_elementContent, pE->pClientPointer);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ }
+ }
+ s = NW_XML_Reader_AdvanceOffset(pT, NW_XML_String_CommentStartLength);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ s = NW_XML_Parse_CommentConsume(pT, &I_comment, pE);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ continue;
+ }
+ /* test for CDSect */
+ s = NW_XML_Reader_AsciiStringMatch(pT, NW_XML_String_CdataStartLength,
+ NW_XML_String_CdataStart, &match);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ if (match) {
+ NW_XML_Reader_Interval_t I_cdata;
+ if (inContent) {
+ inContent = 0;
+ NW_XML_Reader_Interval_Stop(&I_elementContent, pT);
+ if (pE->Content_CB != NULL) {
+ s = (*(pE->Content_CB))(pT, &I_elementContent, pE->pClientPointer);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ }
+ }
+ s = NW_XML_Reader_AdvanceOffset(pT, NW_XML_String_CdataStartLength);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ NW_XML_Reader_Interval_Start(&I_cdata, pT);
+ for (;;) {
+ s = NW_XML_Reader_AsciiStringMatch(pT,
+ NW_XML_String_CdataEndLength,
+ NW_XML_String_CdataEnd,
+ &match);
+ if (NW_STAT_IS_FAILURE(s)) {
+ NW_XML_Reader_Interval_Stop(&I_cdata, pT);
+ return NW_STAT_FAILURE;
+ }
+ if (match) {
+ NW_XML_Reader_Interval_Stop(&I_cdata, pT);
+ s = NW_XML_Reader_AdvanceOffset(pT,
+ NW_XML_String_CdataEndLength);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ /* BUG Is this spec compliant parsing of CDATA? */
+ if (pE->Cdata_CB != NULL) {
+ s = (*(pE->Cdata_CB))(pT, &I_cdata, pE->pClientPointer);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ }
+ break;
+ }
+ s = NW_XML_Reader_Advance(pT);
+ if (NW_STAT_IS_FAILURE(s)) {
+ NW_XML_Reader_Interval_Stop(&I_cdata, pT);
+ return NW_STAT_FAILURE;
+ }
+ }
+ continue;
+ }
+ /* test for illegal '<' or nested element */
+ s = NW_XML_Reader_AsciiCharMatch(pT, '<', &match);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ if (match) {
+ if (inContent) {
+ inContent = 0;
+ NW_XML_Reader_Interval_Stop(&I_elementContent, pT);
+
+ if (pE->Content_CB != NULL)
+ {
+ contentLen = I_elementContent.stop - I_elementContent.start;
+ if(contentLen > 0)
+ {
+ s = (*(pE->Content_CB))(pT, &I_elementContent, pE->pClientPointer);
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+ }//end if(contentLen > 0)
+ }// end if(pE->Content_CB != NULL)
+ }
+ s = NW_XML_Parse_ElementOpeningMarkupConsume(pT, &isEmptyElement,
+ pE, internalEntityList);
+ if (NW_STAT_IS_SUCCESS(s)) {
+ if (!isEmptyElement) {
+ nestingCount++;
+ }
+
+ /*Just now element (tag) is consumned so contenst will start
+ *after this. So, init the content pointer.
+ */
+
+ NW_XML_Reader_Interval_Start(&I_elementContent, pT);
+ continue;
+ }
+ return NW_STAT_FAILURE;
+ }
+
+
+ /* Test for predefined entities and character entries*/
+
+ s = NW_XML_Reader_AsciiCharMatch(pT, '&', &match);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+
+ if (match)
+ {
+ NW_XML_Reader_Interval_t I_entityData;
+ NW_Bool entityFoundLevel_1 = NW_FALSE; //If end of entity (;) found
+ NW_Uint32 entityVal = 0;
+ NW_XML_Reader_Interval_t* I_content = &I_elementContent;
+
+ //Will back off if not a valid entity
+
+ NW_XML_Reader_GetPosition(pT,
+ &prevIndex, &prevCharIndex, &prevLineColumn);
+
+ /* If it is here then this must in the contents. The entity can appear
+ * at the beginning of content.
+ */
+
+ inContent = NW_TRUE;
+ entityFoundLevel_2 = NW_FALSE;
+ NW_XML_Reader_Interval_Stop(I_content, pT); //Contents before entity
+
+ s = CXML_XML_Parser_Entity(pT,&I_entityData,&entityFoundLevel_1);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ if (entityFoundLevel_1 && inContent)
+ {
+ //Validate the entity
+
+ //The following function checks for the character,
+ //predefined entities and Internal Entities.
+
+ contentLen = I_entityData.stop - I_entityData.start;
+
+ if(contentLen > 0)
+ {
+ s = CXML_XML_Handle_entity(pT,
+ &I_entityData,&entityVal,
+ &intEntityValStr,&entityFoundLevel_2,
+ (void*) internalEntityList);
+ }
+ else
+ {
+ //Not a valid entity e.g. "&&;" test case
+ entityFoundLevel_2 = NW_FALSE;
+ }
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ if(entityFoundLevel_2 == CXML_TRUE)
+ {
+ inContent = NW_FALSE;
+
+ //Now write content before entity first
+
+
+ if (pE->Content_CB != NULL) {
+ contentLen = I_content->stop - I_content->start;
+ if(contentLen > 0)
+ {
+ s = (*(pE->Content_CB))(pT, I_content, pE->pClientPointer);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ }
+ }
+
+ // Write the entity content now. There are two possibilities for
+ // entities.
+ //
+ // 1) If it is character or decimal or predefined entities.
+ // In this case, intEntityValStr = NULL.
+ //
+ // 2) If it is "Internal Entity" then intEntityValStr != NULL.
+ // So, this is directly written to WBXML encoder as inline string.
+ // In this case, entityVal = 0;
+
+
+ if (pE->Entity_CB != NULL )
+ {
+ s = (*(pE->Entity_CB))(pT, entityVal, pE->pClientPointer,intEntityValStr);
+
+ if(intEntityValStr != NULL)
+ {
+ NW_Mem_Free(intEntityValStr);
+ }
+if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ }/*end if(pE->Entity_CB != NULL) */
+ }//endif(entityFoundLevel_2 == CXML_TRUE)
+ else
+ {
+ //No valid entity found. Parse as the normal string
+ NW_XML_Reader_SetPosition(pT,
+ prevIndex,
+ prevCharIndex,
+ &prevLineColumn);
+ }
+ } //end if (entityFoundLevel_1 && inContent)
+ else
+ {
+ //No valid entity found. Parse as the normal string
+
+ NW_XML_Reader_SetPosition(pT,
+ prevIndex,
+ prevCharIndex,
+ &prevLineColumn);
+ }
+ } //end match
+
+
+ /* BUG no reference parsing and also permits illegal char data */
+ if (!inContent)
+ {
+ NW_XML_Reader_Interval_Start(&I_elementContent, pT);
+ inContent = 1;
+ if(entityFoundLevel_2 == NW_TRUE)
+ {
+ //Don't advance if it is entity as we did already
+ entityFoundLevel_2 = NW_FALSE;
+ continue;
+ }
+ }
+
+ s = NW_XML_Reader_Advance(pT);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return NW_STAT_FAILURE;
+ }
+ }/*end for(..) */
+ return NW_STAT_SUCCESS;
+}
+
+EXPORT_C NW_Status_t
+NW_XML_Parse(NW_XML_Reader_t* pT, const struct NW_XML_Parser_EventCallbacks_s* pE)
+{
+ /*
+ [1] document ::= prolog element Misc*
+ */
+ NW_Status_t s = NW_STAT_SUCCESS;
+ RPointerArray <CXML_Internal_Entity_t> internalEntityList;
+
+ if (pE->StartDocument_CB != NULL) {
+ s = (*(pE->StartDocument_CB))(pT, pE->pClientPointer);
+ if (NW_STAT_IS_FAILURE(s)) {
+ s = NW_STAT_FAILURE;
+ goto nw_xml_parser_final;
+ }
+ }
+
+ s = NW_XML_Parse_PrologConsume(pT, pE,&internalEntityList);
+ if (NW_STAT_IS_FAILURE(s)) {
+ s = NW_STAT_FAILURE;
+ goto nw_xml_parser_final;
+ }
+
+ s = NW_XML_Parse_ElementConsume(pT, pE, &internalEntityList);
+ if (NW_STAT_IS_FAILURE(s)) {
+ s = NW_STAT_FAILURE;
+ goto nw_xml_parser_final;
+ }
+
+ s = NW_XML_Parse_MiscConsume(pT, pE, &internalEntityList);
+ if (NW_STAT_IS_FAILURE(s) && !NW_XML_Reader_AtEnd(pT)) {
+ s = NW_STAT_FAILURE;
+ goto nw_xml_parser_final;
+ }
+
+ if (!NW_XML_Reader_AtEnd(pT)) {
+ s = NW_STAT_FAILURE;
+ goto nw_xml_parser_final;
+ }
+
+ if (pE->EndDocument_CB != NULL) {
+ s = (*(pE->EndDocument_CB))(pT, pE->pClientPointer);
+ if (NW_STAT_IS_FAILURE(s)) {
+ goto nw_xml_parser_final;
+ }
+ }
+
+nw_xml_parser_final:
+
+ CXML_XML_Parser_Free_I_Entity_List(internalEntityList);
+ return s;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/xmlp/src/XMLReader.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,445 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/*
+This module provides a text (character) stream, pointers into the stream
+and operations on segments of the stream as though they were strings.
+The goal is to isolate the client from stream buffers, cross buffer
+issues and some character set encoding concerns.
+
+This particular version is for input from a single buffer.
+*/
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_string_char.h>
+#include <xml/cxml/nw_xmlp_xmlreader.h>
+
+static
+NW_Status_t
+NW_XML_Reader_ReadAsciiChar(NW_Uint32 c, NW_Uint32* pReturnChar)
+{
+ /* This looks a bit weird but the idea is to force the conversion
+ of the ASCII character through the same function that is used
+ to read a character from the text. This will impose the same conversion
+ limitations and the same result encoding. */
+ NW_Int32 byteCount;
+ NW_Uint8 buf[2];
+ NW_Ucs2 c_ucs2;
+ buf[0] = (NW_Uint8)(c & 0xff);
+ buf[1] = 0;
+ /* should only use this function for ASCII */
+ if (c > 127) {
+ return NW_STAT_FAILURE;
+ }
+ /* call it UTF-8 because ASCII doesn't work with NW_String_readChar()
+ at the moment */
+ byteCount = NW_String_readChar((NW_Byte*)buf, &c_ucs2, HTTP_utf_8);
+ if (byteCount != 1) {
+ return NW_STAT_FAILURE;
+ }
+ *pReturnChar = c_ucs2;
+ return NW_STAT_SUCCESS;
+}
+
+/* assumes this is just a handoff of the buffer (i.e., won't make a copy) */
+EXPORT_C NW_Status_t
+NW_XML_Reader_InitFromBuffer(NW_XML_Reader_t* pT, NW_Uint32 length, unsigned char* pBuf)
+{
+ pT->encoding = 0;
+ pT->endianness = NW_NATIVE_ENDIAN;
+ pT->index = 0;
+ pT->charIndex = 0;
+ pT->lineColumn.crCount = 0;
+ pT->lineColumn.lfCount = 0;
+ pT->lineColumn.charsSinceLastCR = 0;
+ pT->lineColumn.charsSinceLastLF = 0;
+ pT->end = 0;
+ pT->length = length;
+ pT->pBuf = pBuf;
+ return NW_STAT_SUCCESS;
+}
+
+EXPORT_C NW_Status_t
+NW_XML_Reader_DataAddressFromBuffer(NW_XML_Reader_t* pT,
+ NW_Uint32 start, NW_Uint32* length,
+ unsigned char** ppData)
+{
+ NW_ASSERT(start < pT->length);
+ NW_ASSERT(*length <= pT->length);
+ NW_ASSERT((start + *length) <= pT->length);
+ *ppData = NULL;
+ if (start < pT->length) {
+ *ppData = pT->pBuf + start;
+ *length = (((start + *length) <= pT->length) ?
+ *length : (pT->length - start));
+ return NW_STAT_SUCCESS;
+ }
+ return NW_STAT_FAILURE;
+}
+
+/* peekOrAdvance: first arg "advance": peek = 0, advance = 1 */
+static
+NW_Status_t
+NW_XML_Reader_PeekOrAdvanceOffset(NW_Bool advance, NW_XML_Reader_t* pT,
+ NW_Uint32 offsetCharCount, NW_Uint32* pC)
+{
+ NW_Ucs2 c_ucs2;
+ NW_Uint32 i;
+ NW_Uint32 charCount = 0;
+ NW_Int32 byteCount = 0;
+ NW_Uint32 crCount = 0;
+ NW_Uint32 lfCount = 0;
+ NW_Uint32 charsPastCR = 0;
+ NW_Uint32 charsPastLF = 0;
+ NW_Bool resetPastCR = 0;
+ NW_Bool resetPastLF = 0;
+
+ NW_ASSERT(!(advance && !offsetCharCount));
+
+ if (pT->end) {
+ return NW_STAT_FAILURE;
+ }
+ for (i = pT->index; i < pT->length; i += (NW_Uint32)byteCount) {
+ NW_ASSERT(charCount <= offsetCharCount);
+
+ /* It is assumed that this func returns UNICODE code points. */
+ byteCount = NW_String_readChar((NW_Byte*)&(pT->pBuf[i]),
+ &c_ucs2, pT->encoding);
+ *pC = c_ucs2;
+ if (byteCount == -1) {
+ return NW_STAT_FAILURE;
+ }
+ if (charCount == offsetCharCount) {
+ /* This catches NW_String_readChar() reading past buffer end
+ and can be removed when the readChar function does proper
+ error checking. */
+ if ((i + (NW_Uint32)byteCount) > pT->length) {
+ return NW_STAT_FAILURE;
+ }
+ break;
+ }
+ charCount++;
+ charsPastCR++;
+ charsPastLF++;
+ if (c_ucs2 == 0xd /* CR */) {
+ crCount++;
+ resetPastCR = 1;
+ charsPastCR = 0;
+ } else if (c_ucs2 == 0xa /* LF */) {
+ lfCount++;
+ resetPastLF = 1;
+ charsPastLF = 0;
+ }
+ }
+ if (i >= pT->length) {
+ pT->end = 1;
+ }
+ /* This catches NW_String_readChar() reading past buffer end and can be
+ removed when the readChar function does proper error checking. */
+ if (i > pT->length) {
+ return NW_STAT_FAILURE;
+ }
+ if (advance) {
+ pT->index = i;
+ pT->charIndex += charCount;
+ pT->lineColumn.crCount += crCount;
+ pT->lineColumn.lfCount += lfCount;
+ if (resetPastCR) {
+ pT->lineColumn.charsSinceLastCR = charsPastCR;
+ } else {
+ pT->lineColumn.charsSinceLastCR += charsPastCR;
+ }
+ if (resetPastLF) {
+ pT->lineColumn.charsSinceLastLF = charsPastLF;
+ } else {
+ pT->lineColumn.charsSinceLastLF += charsPastLF;
+ }
+ }
+ return NW_STAT_SUCCESS;
+}
+
+EXPORT_C NW_Status_t
+NW_XML_Reader_PeekOffset(NW_XML_Reader_t* pT, NW_Uint32 nChars, NW_Uint32* pC)
+{
+ return NW_XML_Reader_PeekOrAdvanceOffset(0, pT, nChars, pC);
+}
+
+EXPORT_C NW_Status_t
+NW_XML_Reader_AdvanceOffset(NW_XML_Reader_t* pT, NW_Uint32 nChars)
+{
+ NW_Uint32 c;
+ return NW_XML_Reader_PeekOrAdvanceOffset(1, pT, nChars, &c);
+}
+
+EXPORT_C
+void NW_XML_Reader_GetPosition(NW_XML_Reader_t* pT, NW_Uint32* pByteIndex,
+ NW_Uint32* pCharIndex,
+ NW_XML_Reader_LineColumn_t* pLineColumn)
+{
+ *pByteIndex = pT->index;
+ *pCharIndex = pT->charIndex;
+ pLineColumn->crCount = pT->lineColumn.crCount;
+ pLineColumn->lfCount = pT->lineColumn.lfCount;
+ pLineColumn->charsSinceLastCR = pT->lineColumn.charsSinceLastCR;
+ pLineColumn->charsSinceLastLF = pT->lineColumn.charsSinceLastLF;
+}
+
+/* Note: Setting the position (similar to seeking in a file) is in general
+not possible without reading the characters (usually reading forward) because
+character encoding may use a variable numbers of bytes per character. This is
+here so that if you have defined a valid interval, then you can reposition to
+the beginning of the interval. Setting to the position to a bad value will
+not always be caught immediately. Don't forget to also save and set line
+and column with position. */
+EXPORT_C void
+NW_XML_Reader_SetPosition(NW_XML_Reader_t* pT, NW_Uint32 byteIndex,
+ NW_Uint32 charIndex,
+ const NW_XML_Reader_LineColumn_t* pLineColumn)
+{
+ pT->index = byteIndex;
+ pT->charIndex = charIndex;
+ pT->lineColumn.crCount = pLineColumn->crCount;
+ pT->lineColumn.lfCount = pLineColumn->lfCount;
+ pT->lineColumn.charsSinceLastCR = pLineColumn->charsSinceLastCR;
+ pT->lineColumn.charsSinceLastLF = pLineColumn->charsSinceLastLF;
+}
+
+/*
+Reader Interval Functions
+*/
+
+EXPORT_C void
+NW_XML_Reader_Interval_Start(NW_XML_Reader_Interval_t* pI, NW_XML_Reader_t* pT)
+{
+ /* set both start and stop for safety in later use */
+ pI->start = pI->stop = pT->index;
+ pI->charStart = pI->charStop = pT->charIndex;
+}
+
+EXPORT_C void
+NW_XML_Reader_Interval_Stop(NW_XML_Reader_Interval_t* pI, NW_XML_Reader_t* pT)
+{
+ pI->stop = pT->index;
+ pI->charStop = pT->charIndex;
+}
+
+/* BEGIN GENERIC Reader CHARACTER AND STRING FUNCTIONS */
+
+/* pMatch is 1 if ASCII character c matches Reader char in its encoding */
+EXPORT_C NW_Status_t
+NW_XML_Reader_AsciiCharMatch(NW_XML_Reader_t* pT, NW_Uint32 asciiC, NW_Uint32* pMatch)
+{
+ NW_Uint32 c_text, c_ascii;
+ NW_Status_t s = NW_XML_Reader_Peek(pT, &c_text);
+ *pMatch = 0;
+ if (NW_STAT_IS_SUCCESS(s)) {
+ s = NW_XML_Reader_ReadAsciiChar(asciiC, &c_ascii);
+ if (NW_STAT_IS_SUCCESS(s)) {
+ *pMatch = (c_text == c_ascii);
+ }
+ }
+ return s;
+}
+
+/* pMatch is 1 if ASCII string matches Reader sequence in its encoding */
+EXPORT_C NW_Status_t
+NW_XML_Reader_AsciiStringMatch(NW_XML_Reader_t* pT, NW_Uint32 length, const NW_Uint8* pString,
+ NW_Uint32* pMatch)
+{
+ NW_Uint32 c_text, c_ascii;
+ NW_Uint32 i;
+ NW_Status_t s = NW_STAT_SUCCESS;
+ *pMatch = 0;
+ NW_ASSERT(length);
+ for (i = 0; i < length; i++) {
+ s = NW_XML_Reader_PeekOffset(pT, i, &c_text);
+ if (NW_STAT_IS_FAILURE(s)) {
+ break;
+ }
+ s = NW_XML_Reader_ReadAsciiChar(pString[i], &c_ascii);
+ if (NW_STAT_IS_FAILURE(s)) {
+ break;
+ }
+ if (c_text != c_ascii) {
+ break;
+ }
+ }
+ if (i == length) {
+ *pMatch = 1;
+ }
+ return s;
+}
+
+/* Note: For XML, whitespace is only ASCII 0x20 (space),
+0x09 (tab), 0x0d (CR), 0x0a (LF). The base test used here,
+CXML_Str_Isspace(), includes two other forms of whitespace. */
+EXPORT_C NW_Status_t
+NW_XML_Reader_SkipSpace(NW_XML_Reader_t* pT)
+{
+ NW_Uint32 c;
+ NW_Status_t s = NW_STAT_SUCCESS;
+ for (;;) {
+ s = NW_XML_Reader_Peek(pT, &c);
+ if (NW_STAT_IS_FAILURE(s)) {
+ break;
+ }
+ if (c > 0xffff) { /* validate casting */
+ break;
+ }
+ if (!CXML_Str_Isspace((NW_Ucs2)(c & 0xffff))) {
+ break;
+ }
+ s = NW_XML_Reader_Advance(pT);
+ if (NW_STAT_IS_FAILURE(s)) {
+ break;
+ }
+ if (pT->end){
+ /* At the end so break */
+ break;
+ }
+ }
+ return s;
+}
+
+/* Note: For XML, whitespace is only ASCII 0x20 (space),
+0x09 (tab), 0x0d (CR), 0x0a (LF). The base test used here,
+CXML_Str_Isspace(), includes two other forms of whitespace. */
+EXPORT_C NW_Status_t
+NW_XML_Reader_IsSpace(NW_XML_Reader_t* pT, NW_Uint32* pMatch)
+{
+ NW_Uint32 c;
+ NW_Status_t s;
+
+ *pMatch = 0;
+ s = NW_XML_Reader_Peek(pT, &c);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (c > 0xffff) { /* validate casting */
+ return NW_STAT_FAILURE;
+ }
+ if (CXML_Str_Isspace((NW_Ucs2)(c & 0xffff))) {
+ *pMatch = 1;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+EXPORT_C NW_Status_t
+NW_XML_Reader_IsLetter(NW_XML_Reader_t* pT, NW_Uint32* pMatch)
+{
+ NW_Uint32 c;
+ NW_Status_t s;
+
+ *pMatch = 0;
+ s = NW_XML_Reader_Peek(pT, &c);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ /* This is an approximation to what XML charaters are "letter".
+ Everything above the 8-bit range is considered to be a "letter".*/
+ if (c >= 0x41 && c <= 0x5a) {
+ *pMatch = 1;
+ }
+ else if (c >= 0x61 && c <= 0x7a) {
+ *pMatch = 1;
+ }
+ else if (c >= 0xc0 && c <= 0xd6) {
+ *pMatch = 1;
+ }
+ else if (c >= 0xd8 && c <= 0xf6) {
+ *pMatch = 1;
+ }
+ else if (c >= 0xf8) {/* letters become anything above 0xf8 */
+ *pMatch = 1;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/* Note: For XML, digits include not only the ASCII digits but
+other language forms of digits. The base test used here,
+CXML_Str_Isdigit() only tests for ASCII digits. */
+EXPORT_C NW_Status_t
+NW_XML_Reader_IsDigit(NW_XML_Reader_t* pT, NW_Uint32* pMatch)
+{
+ NW_Uint32 c;
+ NW_Status_t s;
+
+ *pMatch = 0;
+ s = NW_XML_Reader_Peek(pT, &c);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (c > 0xffff) {/* validate casting */
+ return NW_STAT_SUCCESS;
+ }
+ if (CXML_Str_Isdigit((NW_Ucs2)(c & 0xffff))) {
+ *pMatch = 1;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+/* Returns an estimate of the current line and column position in the text.
+It is an estimate because it has to guess at what the intended line ending
+sequence is using a count of CR and LF characters. Line and Column indices
+are 1-based not 0-based. */
+EXPORT_C void
+NW_XML_Reader_GetLineColumn(NW_XML_Reader_t* pT, NW_Uint32* pLine,
+ NW_Uint32* pColumn)
+{
+ NW_Uint32 crCount, lfCount, charsSinceCR, charsSinceLF;
+ crCount = pT->lineColumn.crCount;
+ lfCount = pT->lineColumn.lfCount;
+ charsSinceCR = pT->lineColumn.charsSinceLastCR;
+ charsSinceLF = pT->lineColumn.charsSinceLastLF;
+ if (crCount == lfCount) {
+ /* assume CR, LF, DOS style */
+ /* use a bias in favor of CR followed by LF
+ which will give the correct column for DOS */
+ *pLine = lfCount + 1;
+ *pColumn = charsSinceLF + 1;
+ } else if (lfCount == 0) {
+ /* assume CR only, Unix style */
+ *pLine = crCount + 1;
+ *pColumn = charsSinceCR + 1;
+ } else if (crCount == 0) {
+ /* assume LF only, Mac style */
+ *pLine = lfCount + 1;
+ *pColumn = charsSinceLF + 1;
+ } else {
+ /* an unclear situation so use
+ thresholds on the ratio to guess */
+ NW_Uint32 ratio;
+ ratio = ((crCount * 100) / lfCount);
+ if (ratio > 300) {/* more than 3 to 1 crCount to lfCount */
+ /* assume CR only, Unix style */
+ *pLine = crCount + 1;
+ *pColumn = charsSinceCR + 1;
+ } else if (ratio < 33) {/* less than 1 to 3 crCount to lfCount */
+ /* assume LF only, Mac style */
+ *pLine = lfCount + 1;
+ *pColumn = charsSinceLF + 1;
+ } else {
+ /* assume CR, LF, DOS style */
+ /* use a bias in favor of CR, LF sequence (DOS style)
+ which will give the correct column */
+ *pLine = lfCount + 1;
+ *pColumn = charsSinceLF + 1;
+ }
+ }
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/xmlp/src/Xmlp2Wbxml.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,1215 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <string.h>
+#include "cxml_internal.h"
+#include <xml/cxml/nw_encoder_wbxmlwriter.h>
+#include <xml/cxml/nw_xmlp_xmlparser.h>
+#include <xml/cxml/nw_xmlp_xmlp2wbxml.h>
+#include <xml/cxml/nw_encoder_stringtable.h>
+#include "cxml_xmlp_entity.h"
+
+
+typedef struct CXML_Encoding_String_s {
+ NW_Int8* charSetStr;
+ NW_Uint32 encodingVal;
+}CXML_Encoding_String_t;
+
+/* Number of encoding string supported */
+
+#define CXML_Encoding_Str_Num 5
+
+static
+const CXML_Encoding_String_t CXML_EncodingStr_Array[] =
+{
+ {(NW_Int8*) "utf-8", HTTP_utf_8 },
+ {(NW_Int8*) "us-ascii", HTTP_us_ascii },
+ {(NW_Int8*) "iso-10646-ucs-2", HTTP_iso_10646_ucs_2 },
+ {(NW_Int8*) "iso-8859-1", HTTP_iso_8859_1 },
+ {(NW_Int8*) "utf-8", HTTP_utf_16}
+};
+
+typedef struct NW_XML_XmlpWbxmlEncoder_s
+{
+ NW_WBXML_Writer_t* pE;
+ /*
+ need access to last tag token to backpatch attribute and content flags
+ */
+ NW_Uint32 lastTagTokenIndex;
+ NW_Uint32 publicID; /* needed to pass to start callback */
+ NW_Uint32 encoding; /* needed to pass to start callback */
+
+} NW_XML_XmlpWbxmlEncoder_t;
+
+/* The following function finds the encoding in the XML declaration statement (if any).
+ * This function is called only when there is no BOM present and encoding is assumed
+ * ASCII/Latine-1.
+ * e.g. <?xml version="1.0" encoding="iso-8859-1"?>, here XML Declaration has the encoding
+ * of "iso-8859-1"
+ */
+
+static NW_Bool NW_XML_FindEncoding(NW_Uint32 length, const unsigned char* pBuf, NW_Uint32* encodingVal)
+{
+
+ NW_Bool s = NW_FALSE;
+ NW_Uint8* sourceWalker = NULL;
+ NW_Uint8* encodingStart = NULL;
+ NW_Uint8* encodingValStart = NULL;
+ NW_Uint8* endXMLDecl = NULL;
+ NW_Uint32 xmlDeclLen = 0;
+ NW_Uint32 encodingValLen = 0;
+ NW_Uint32 i = 0;
+
+ /* Look for end of the XML Declration statement */
+
+ endXMLDecl = (NW_Uint8*) strstr((char*) pBuf+2, "?>");
+
+ if(endXMLDecl)
+ {
+ xmlDeclLen = endXMLDecl - pBuf;
+
+
+ if(xmlDeclLen < length)
+ {
+ encodingStart = (NW_Uint8*) strstr(( (char*)(pBuf+2) ),"encoding");
+
+ /*Move the pointer after the encoding */
+
+
+ if(encodingStart)
+ {
+ sourceWalker = encodingStart + 8;
+
+ /*Skip any space */
+ while(CXML_Str_Isspace((NW_Ucs2)(*sourceWalker & 0xffff) ) )
+ {
+ sourceWalker++;
+ }
+
+ if(*sourceWalker == '=')
+ {
+ sourceWalker++;
+ while(CXML_Str_Isspace((NW_Ucs2)(*sourceWalker & 0xffff) ) )
+ {
+ sourceWalker++;
+ }
+ }
+
+ if( (*sourceWalker == '\'') || (*sourceWalker == '\"') )
+ {
+ sourceWalker++;
+ }
+
+ encodingValStart = sourceWalker;
+
+ /* End the Encoding value consume if one of following condition is reached:
+ * 1) Closing quote has encounted.
+ * 2) '>' closing tag has encountered
+ * 3) Space had encounted
+ * 4) '?' has encounded.
+ * There is possibilty of some arguments after encoding like following:
+ * <?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
+ */
+
+ while( (*sourceWalker != '\'') && (*sourceWalker != '\"') &&
+ (*sourceWalker != '>') && (*sourceWalker != '?') )
+ {
+ encodingValLen++;
+ sourceWalker++;
+ }
+
+ for(i=0; i < CXML_Encoding_Str_Num; i++)
+ {
+ if(!strncmp((char*) encodingValStart, (char*) CXML_EncodingStr_Array[i].charSetStr,encodingValLen))
+ {
+ *encodingVal = CXML_EncodingStr_Array[i].encodingVal;
+ s = NW_TRUE;
+ break;
+ }
+ }/*end for() */
+ }/*end if(encodingStart)*/
+ }/*end if(xmlDeclLen < length)*/
+ }/*end if(endXMLDecl)*/
+
+ return s;
+}/*end NW_XML_FindEncoding()*/
+
+NW_Status_t
+EXPORT_C
+NW_XML_ComputeEncoding(NW_Uint32 length, const unsigned char* pBuf,
+ NW_Uint32* pEncoding, NW_Endianness_t* pEndianness)
+{
+ NW_Uint32 c0, c1, c2, c3;
+ if (length < 4)
+ {
+ return NW_STAT_FAILURE;
+ }
+ c0 = pBuf[0];
+ c1 = pBuf[1];
+ c2 = pBuf[2];
+ c3 = pBuf[3];
+ if (c0 == 0 && c1 == 0 && c2 == 0xfe && c3 == 0xff)
+ {
+ *pEncoding = 1001; /* ISO-10646-UCS-4 IANA MIBenum */
+ *pEndianness = NW_BIG_ENDIAN;
+ }
+ else if (c0 == 0 && c1 == 0 && c2 == 0 && c3 == 0x3c)
+ {
+ *pEncoding = 1001; /* ISO-10646-UCS-4 IANA MIBenum */
+ *pEndianness = NW_BIG_ENDIAN;
+ }
+ else if (c0 == 0xff && c1 == 0xfe && c2 == 0 && c3 == 0)
+ {
+ *pEncoding = 1001; /* ISO-10646-UCS-4 IANA MIBenum */
+ *pEndianness = NW_LITTLE_ENDIAN;
+ }
+ else if (c0 == 0x3c && c1 == 0 && c2 == 0 && c3 == 0)
+ {
+ *pEncoding = 1001; /* ISO-10646-UCS-4 IANA MIBenum */
+ *pEndianness = NW_LITTLE_ENDIAN;
+ }
+ else if (c0 == 0xfe && c1 == 0xff && !(c2 == 0 && c3 == 0))
+ {
+ /* call it UCS-2 instead of UTF-16 IANA MIBenum, favor over
+ UTF-16BE 1013 */
+ *pEncoding = 1000;
+ *pEndianness = NW_BIG_ENDIAN;
+ }
+ else if (c0 == 0 && c1 == 0x3c && c2 == 0 && c3 == 0x3f)
+ {
+ /* could be UTF-16 but must read xml encoding decl to tell */
+ *pEncoding = 1000; /* UCS-2 IANA MIBenum */
+ *pEndianness = NW_BIG_ENDIAN;
+ }
+ else if (c0 == 0xff && c1 == 0xfe && !(c2 == 0 && c3 == 0))
+ {
+ /* call it UCS-2 instead of UTF-16 IANA MIBenum, favor over
+ UTF-16LE 1014 */
+ *pEncoding = 1000;
+ *pEndianness = NW_LITTLE_ENDIAN;
+ }
+ else if (c0 == 0x3c && c1 == 0 && c2 == 0x3f && c3 == 0)
+ {
+ /* could be UTF-16 but must read xml encoding decl to tell */
+ *pEncoding = 1000; /* UCS-2 IANA MIBenum */
+ *pEndianness = NW_LITTLE_ENDIAN;
+ }
+ else if (c0 == 0x3c && c1 == 0x3f && c2 == 0x78 && c3 == 0x6d)
+ {
+ /* could be anything with anything with an ASCII subset,
+ must read xml encoding decl to tell */
+ if( !NW_XML_FindEncoding (length,pBuf, pEncoding) )
+ {
+ /*If encoding is not in the XML Declaration */
+ *pEncoding = 106; /* UTF-8 IANA MIBenum, no endianness */
+ }
+ *pEndianness = NW_NATIVE_ENDIAN;
+ }
+ else if (c0 == 0xef && c1 == 0xbb && c2 == 0xbf) /* c3 ignored */
+ {
+ *pEncoding = 106; /* UTF-8 IANA MIBenum, no endianness */
+ *pEndianness = NW_NATIVE_ENDIAN; /* Ha! */
+ }
+ else
+ {
+ /* default to UTF-8 and let the parser barf if it isn't */
+ *pEncoding = 106; /* UTF-8 IANA MIBenum, no endianness */
+ *pEndianness = NW_NATIVE_ENDIAN; /* Ha! */
+ }
+ return NW_STAT_SUCCESS;
+}
+
+
+
+/* When encoding is UCS-2, the parser has changed the byte order to
+native, however, the WBXML should be written in network (i.e., big
+endian) order. The way this is done is to change the byte order
+in-place to network order, write the WBXML, and then put the byte
+order back to native in-place. */
+static
+void
+NW_XML_XmlpWbxmlEncoder_Ucs2NativeToNetworkByteOrder(NW_Uint32 byteCount,
+ NW_Uint8* pBuf)
+{
+ NW_Uint32 i;
+ NW_Uint16 c_ucs2 = 1;
+
+ if (((NW_Uint8*)&c_ucs2)[0] == 1) { /* test for little endian host */
+ for (i = 0; i < byteCount; i += 2) {
+ (void)NW_Mem_memcpy(&c_ucs2, pBuf + i, sizeof(NW_Uint16));
+ pBuf[i] = (NW_Uint8)((c_ucs2 >> 8) & 0xff);
+ pBuf[i+1] = (NW_Uint8)(c_ucs2 & 0xff);
+ }
+ }
+}
+
+static
+void
+NW_XML_XmlpWbxmlEncoder_Ucs2NetworkToNativeByteOrder(NW_Uint32 byteCount,
+ NW_Uint8* pBuf)
+{
+ NW_Uint32 i;
+ NW_Uint16 c_ucs2 = 1;
+
+ if (((NW_Uint8*)&c_ucs2)[0] == 1) { /* test for little endian host */
+ for (i = 0; i < byteCount; i += 2) {
+ /* this is a clever trick: pick up bytes in big endian order,
+ force the result to memory via taking address of result which
+ will put the 16-bits into native byte order, then copy the
+ result over the original bytes */
+ c_ucs2 = (NW_Uint16)((pBuf[i] << 8) | pBuf[i+1]);
+ (void)NW_Mem_memcpy(pBuf + i, &c_ucs2, sizeof(NW_Uint16));
+ }
+ }
+}
+
+/* end of line normalization replaces DOS or Mac style end of line
+with Unix style end of line. If no normalization is needed, then on
+return *ppTextOut == pTextIn (i.e., no malloc was done), otherwise you
+need to call NW_Mem_Free(*ppTextOut) when you are done with the output
+NOTE: only works for native byte order!
+*/
+static
+NW_Status_t
+NW_XML_XmlpWbxmlEncoder_EndOfLineNormalization(NW_Uint32 encoding,
+ NW_Uint32* pCharCount,
+ NW_Uint32* pByteCount,
+ const NW_Uint8* pTextIn,
+ NW_Uint8** ppTextOut)
+{
+ NW_Uint32 i;
+ NW_Uint32 j;
+ NW_Uint32 elideCharCount;
+ NW_Uint32 elideByteCount;
+ NW_Int32 byteCount;
+ NW_Ucs2 cUCS2;
+ NW_Uint8 crHit;
+ NW_Uint8 needsNormalization = 0;
+
+ /* the output is the input unless it must be normalized */
+ *ppTextOut = (NW_Uint8*)pTextIn;
+
+ /* scan to count #xD's that need translating */
+ elideCharCount = 0;
+ elideByteCount = 0;
+ crHit = 0;
+ for (i = 0; i < *pByteCount; i += (NW_Uint32)byteCount) {
+ byteCount = NW_String_readChar((NW_Uint8*)&(pTextIn[i]), &cUCS2, encoding);
+ if (byteCount < 0) {
+ return NW_STAT_FAILURE;
+ }
+ /* catch DOS 0xd 0xa eol */
+ if (crHit && (cUCS2 == 0xa)) {
+ elideCharCount++;
+ elideByteCount += (NW_Uint32)byteCount;
+ }
+ if (cUCS2 == 0xd) {
+ needsNormalization = 1;
+ crHit = 1;
+ } else {
+ crHit = 0;
+ }
+ }
+ if (needsNormalization) {
+ /* alloc a new string */
+ *ppTextOut = (NW_Uint8*) NW_Mem_Malloc(*pByteCount - elideByteCount);
+ if (*ppTextOut == NULL) {
+ *ppTextOut = (NW_Uint8*)pTextIn;
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ /* make a normalized copy of input */
+ crHit = 0;
+ j = 0;
+ for (i = 0; i < *pByteCount; i += (NW_Uint32)byteCount) {
+ byteCount = NW_String_readChar((NW_Uint8*)&(pTextIn[i]), &cUCS2, encoding);
+ if (byteCount < 0) {
+ NW_Mem_Free(*ppTextOut);
+ *ppTextOut = (NW_Uint8*)pTextIn;
+ return NW_STAT_FAILURE;
+ }
+ /* check that readChar isn't trying to read off end of buffer */
+ NW_ASSERT((i + byteCount - 1) < *pByteCount);
+ if (cUCS2 == 0xd) {
+ crHit = 1;
+ if (byteCount == 1) {
+ (*ppTextOut)[j++] = 0xa;
+ } else if (byteCount == 2) {
+ /* this looks odd but takes into account either endianess */
+ if (pTextIn[i] == 0xd) {
+ (*ppTextOut)[j++] = (NW_Uint8)0xa;
+ (*ppTextOut)[j++] = 0;
+ } else {
+ (*ppTextOut)[j++] = 0;
+ (*ppTextOut)[j++] = (NW_Uint8)0xa;
+ }
+ } else {
+ NW_ASSERT(byteCount <= 2); /* code bug, force debug stop here */
+ NW_Mem_Free(*ppTextOut);
+ *ppTextOut = (NW_Uint8*)pTextIn;
+ return NW_STAT_FAILURE;
+ }
+ } else {
+ if (!(crHit && (cUCS2 == 0xa))) {
+ (void)NW_Mem_memcpy(&((*ppTextOut)[j]), &(pTextIn[i]), (NW_Uint32)byteCount);
+ j += (NW_Uint32)byteCount;
+ }
+ crHit = 0;
+ }
+ }
+ *pByteCount -= elideByteCount;
+ *pCharCount -= elideCharCount;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+static
+NW_Status_t
+NW_XML_XmlpWbxmlEncoder_New(NW_Uint32 publicID, NW_Uint32 encoding, void** ppV)
+{
+ NW_WBXML_Dictionary_t* pDictionary;
+ NW_XML_XmlpWbxmlEncoder_t** ppTE = (NW_XML_XmlpWbxmlEncoder_t**)ppV;
+ *ppTE = (NW_XML_XmlpWbxmlEncoder_t*) NW_Mem_Malloc(sizeof(NW_XML_XmlpWbxmlEncoder_t));
+ if (!*ppTE) {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+ (*ppTE)->lastTagTokenIndex = 0;
+ (*ppTE)->publicID = publicID;
+ (*ppTE)->encoding = encoding;
+ (*ppTE)->pE = (NW_WBXML_Writer_t*) NW_Mem_Malloc(sizeof(NW_WBXML_Writer_t));
+ if (!((*ppTE)->pE)) {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+ /* Note that we only have access to one dictionary and we
+ should really have two: one for tags and one for attributes. */
+ pDictionary = NW_WBXML_Dictionary_getByPublicId((*ppTE)->publicID);
+
+ if( ( CXML_Additional_Feature_Supprted() & CXML_DTD_SUPPORT_ON) )
+ {
+ NW_Encoder_StringTable_t* strTable = NW_Encoder_StringTable_new();
+
+
+ NW_WBXML_Writer_Initialize((*ppTE)->pE,
+ 0, NULL, NULL, /* no mem needed for sizing */
+ pDictionary,
+ pDictionary,
+ NW_Encoder_StringTable_getStringTableOffset,
+ NW_Encoder_StringTable_addToStringTable,
+ strTable,
+ NW_Encoder_StringTable_StringTableIterateInit,
+ NW_Encoder_StringTable_StringTableIterateNext,
+ 1 /* do sizing only */);
+ }
+ else
+ {
+
+ NW_WBXML_Writer_Initialize((*ppTE)->pE,
+ 0, NULL, NULL, /* no mem needed for sizing */
+ pDictionary, pDictionary,
+ NULL, NULL, NULL, NULL, NULL, /* string table stuff */
+ 1 /* do sizing only */);
+ }
+ return NW_STAT_SUCCESS;
+}
+
+static
+void
+NW_XML_XmlpWbxmlEncoder_SetToWrite(NW_XML_XmlpWbxmlEncoder_t* pTE,
+ NW_Uint32 byteLength, NW_Uint8* pBuf,
+ NW_WBXML_Writer_GrowBuf_t growBufCallback)
+{
+
+ if( ( CXML_Additional_Feature_Supprted() & CXML_DTD_SUPPORT_ON) )
+ {
+ NW_Encoder_StringTable_t* strTable = NW_Encoder_StringTable_new();
+
+
+ NW_WBXML_Writer_Initialize(pTE->pE,
+ byteLength, pBuf,
+ growBufCallback,
+ pTE->pE->pTagDictionary,
+ pTE->pE->pAttributeDictionary,
+ NW_Encoder_StringTable_getStringTableOffset,
+ NW_Encoder_StringTable_addToStringTable,
+ strTable,
+ NW_Encoder_StringTable_StringTableIterateInit,
+ NW_Encoder_StringTable_StringTableIterateNext,
+ 0 /* don't do sizing, write */);
+ }
+ else
+ {
+ NW_WBXML_Writer_Initialize(pTE->pE,
+ byteLength, pBuf,
+ growBufCallback,
+ pTE->pE->pTagDictionary,
+ pTE->pE->pAttributeDictionary,
+ NULL, NULL, NULL, NULL, NULL, /* string table stuff */
+ 0 /* don't do sizing, write */);
+ }
+}
+
+void
+NW_XML_XmlpWbxmlEncoder_Delete(void* pV)
+{
+ NW_XML_XmlpWbxmlEncoder_t* pTE = (NW_XML_XmlpWbxmlEncoder_t*)pV;
+ NW_WBXML_Writer_t* pE = pTE->pE;
+ NW_Mem_Free(pE); /* note that this doesn't free WBXML buf and string table. */
+ NW_Mem_Free(pTE);
+}
+
+static
+NW_Status_t
+NW_XML_XmlpWbxmlEncoder_StartDocument_CB(NW_XML_Reader_t* pT, void* pV)
+{
+ NW_XML_XmlpWbxmlEncoder_t* pTE = (NW_XML_XmlpWbxmlEncoder_t*)pV;
+ NW_WBXML_Writer_t* pE = pTE->pE;
+
+ NW_REQUIRED_PARAM(pT);
+
+ /* Note: We do not build a string table because it isn't clear if
+ it is worthwhile. */
+
+ return NW_WBXML_Writer_Header(pE, 3, pTE->publicID, pTE->encoding, 0);
+}
+
+static
+NW_Status_t
+NW_XML_XmlpWbxmlEncoder_Tag_Start_CB(NW_XML_Reader_t* pT,
+ const NW_XML_Reader_Interval_t* pI_name,
+ void* pV)
+{
+ NW_XML_XmlpWbxmlEncoder_t* pTE = (NW_XML_XmlpWbxmlEncoder_t*)pV;
+ NW_WBXML_Writer_t* pE = pTE->pE;
+ NW_Uint32 length;
+ NW_Uint32 nameByteLength;
+ NW_Uint8* pName;
+ NW_Status_t s;
+ if (!NW_XML_Reader_Interval_IsWellFormed(pI_name)) {
+ return NW_STAT_FAILURE;
+ }
+ length = pI_name->stop - pI_name->start;
+ nameByteLength = length;
+ s = NW_XML_Reader_DataAddressFromBuffer(pT, pI_name->start,
+ &nameByteLength,
+ &pName);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (nameByteLength != length) {
+ return NW_STAT_FAILURE;
+ }
+ length = pI_name->charStop - pI_name->charStart;
+ s = NW_WBXML_Writer_TagString(pE, pTE->encoding, length, nameByteLength,
+ pName, &(pTE->lastTagTokenIndex));
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ /* default to content but erase if see empty tag end */
+ return NW_WBXML_Writer_TagSetContentFlag(pE, pTE->lastTagTokenIndex);
+}
+
+static
+NW_Status_t
+NW_XML_XmlpWbxmlEncoder_Attr_Start_CB(NW_XML_Reader_t* pT,
+ const NW_XML_Reader_Interval_t* pI_name,
+ void* pV)
+{
+ NW_XML_XmlpWbxmlEncoder_t* pTE = (NW_XML_XmlpWbxmlEncoder_t*)pV;
+ NW_WBXML_Writer_t* pE = pTE->pE;
+ NW_REQUIRED_PARAM(pT);
+ NW_REQUIRED_PARAM(pI_name);
+ return NW_WBXML_Writer_TagSetAttributesFlag(pE, pTE->lastTagTokenIndex);
+}
+
+static
+NW_Status_t
+NW_XML_XmlpWbxmlEncoder_Attr_VarVal_CB(NW_XML_Reader_t* pT,
+ const NW_XML_Reader_Interval_t* pI_name,
+ const NW_XML_Reader_Interval_t* pI_value,
+ void* pV)
+{
+ NW_XML_XmlpWbxmlEncoder_t* pTE = (NW_XML_XmlpWbxmlEncoder_t*)pV;
+ NW_WBXML_Writer_t* pE = pTE->pE;
+ NW_Uint32 length;
+ NW_Uint32 nameLength;
+ NW_Uint8* pName;
+ NW_Uint32 valueByteLength;
+ NW_Uint32 valueCharCount;
+ NW_Uint8* pValue;
+ NW_Status_t s;
+
+ if (!NW_XML_Reader_Interval_IsWellFormed(pI_name)) {
+ return NW_STAT_FAILURE;
+ }
+
+ /* var name setup */
+ length = pI_name->stop - pI_name->start;
+ nameLength = length; /* byte length */
+ s = NW_XML_Reader_DataAddressFromBuffer(pT, pI_name->start,
+ &nameLength, &pName);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (nameLength != length) {
+ return NW_STAT_FAILURE;
+ }
+ nameLength = pI_name->charStop - pI_name->charStart; /* char count */
+
+ /* value setup */
+ length = pI_value->stop - pI_value->start;
+ valueByteLength = length;
+ s = NW_XML_Reader_DataAddressFromBuffer(pT, pI_value->start,
+ &valueByteLength, &pValue);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (valueByteLength != length) {
+ return NW_STAT_FAILURE;
+ }
+ valueCharCount = pI_value->charStop - pI_value->charStart;
+
+ if (pT->encoding == HTTP_iso_10646_ucs_2) {
+ NW_XML_XmlpWbxmlEncoder_Ucs2NativeToNetworkByteOrder(valueByteLength,
+ pValue);
+ }
+ s = NW_WBXML_Writer_AttributeAndValue(pE, pTE->encoding, nameLength,
+ pName, valueCharCount,
+ valueByteLength, pValue);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (pT->encoding == HTTP_iso_10646_ucs_2) {
+ NW_XML_XmlpWbxmlEncoder_Ucs2NetworkToNativeByteOrder(valueByteLength,
+ pValue);
+ }
+ return NW_STAT_SUCCESS;
+}
+
+static
+NW_Status_t
+NW_XML_XmlpWbxmlEncoder_Attributes_End_CB(NW_XML_Reader_t* pT,
+ NW_Uint32 attributeCount, void* pV)
+{
+ NW_XML_XmlpWbxmlEncoder_t* pTE = (NW_XML_XmlpWbxmlEncoder_t*)pV;
+ NW_WBXML_Writer_t* pE = pTE->pE;
+ NW_Status_t s;
+ NW_REQUIRED_PARAM(pT);
+ /* if there were any attributes, then must write end token */
+ if (attributeCount) {
+ s = NW_WBXML_Writer_End(pE);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ }
+ return NW_STAT_SUCCESS;
+}
+
+static
+NW_Status_t
+NW_XML_XmlpWbxmlEncoder_CoreTextHandler(NW_Uint32 encoding,
+ NW_Uint32 charCount,
+ NW_Uint32 byteLength,
+ NW_Uint8* pText,
+ NW_WBXML_Writer_t* pE)
+{
+ NW_Uint8* pNormalizedText;
+ NW_Status_t s;
+
+ s = NW_XML_XmlpWbxmlEncoder_EndOfLineNormalization(encoding,
+ &charCount,
+ &byteLength,
+ pText,
+ &pNormalizedText);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (encoding == HTTP_iso_10646_ucs_2) {
+ NW_XML_XmlpWbxmlEncoder_Ucs2NativeToNetworkByteOrder(byteLength,
+ pNormalizedText);
+ }
+ s = NW_WBXML_Writer_Text(pE, encoding, byteLength, pNormalizedText);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (pText == pNormalizedText) {
+ if (encoding == HTTP_iso_10646_ucs_2) {
+ NW_XML_XmlpWbxmlEncoder_Ucs2NetworkToNativeByteOrder(byteLength,
+ pNormalizedText);
+ }
+ } else {
+ NW_Mem_Free(pNormalizedText);
+ }
+ return NW_STAT_SUCCESS;
+}
+
+
+static
+NW_Status_t
+NW_XML_XmlpWbxmlEncoder_Content_CB(NW_XML_Reader_t* pT,
+ const NW_XML_Reader_Interval_t* pI_content,
+ void* pV)
+{
+ NW_XML_XmlpWbxmlEncoder_t* pTE = (NW_XML_XmlpWbxmlEncoder_t*)pV;
+ NW_WBXML_Writer_t* pE = pTE->pE;
+ NW_Status_t s;
+ NW_Uint32 length;
+ NW_Uint32 byteLength;
+ NW_Uint32 charCount;
+ NW_Uint8* pContent;
+ NW_Uint8* pNormalizedContent;
+
+ if (!NW_XML_Reader_Interval_IsWellFormed(pI_content)) {
+ return NW_STAT_FAILURE;
+ }
+ length = pI_content->stop - pI_content->start;
+ byteLength = length;
+ s = NW_XML_Reader_DataAddressFromBuffer(pT, pI_content->start,
+ &byteLength,
+ &pContent);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (byteLength != length) {
+ return NW_STAT_FAILURE;
+ }
+ charCount = pI_content->charStop - pI_content->charStart;
+ s = NW_XML_XmlpWbxmlEncoder_EndOfLineNormalization(pT->encoding,
+ &charCount,
+ &byteLength,
+ pContent,
+ &pNormalizedContent);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (pT->encoding == HTTP_iso_10646_ucs_2) {
+ NW_XML_XmlpWbxmlEncoder_Ucs2NativeToNetworkByteOrder(byteLength,
+ pNormalizedContent);
+ }
+ s = NW_WBXML_Writer_Text(pE, pT->encoding, byteLength, pNormalizedContent);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (pContent == pNormalizedContent) {
+ if (pT->encoding == HTTP_iso_10646_ucs_2) {
+ NW_XML_XmlpWbxmlEncoder_Ucs2NetworkToNativeByteOrder(byteLength,
+ pNormalizedContent);
+ }
+ } else {
+ NW_Mem_Free(pNormalizedContent);
+ }
+ return NW_STAT_SUCCESS;
+}
+
+static
+NW_Status_t
+NW_XML_XmlpWbxmlEncoder_Tag_End_CB(NW_XML_Reader_t* pT,
+ const NW_XML_Reader_Interval_t* pI_name,
+ NW_Uint32 emptyTagFlag, void* pV)
+{
+ NW_XML_XmlpWbxmlEncoder_t* pTE = (NW_XML_XmlpWbxmlEncoder_t*)pV;
+ NW_WBXML_Writer_t* pE = pTE->pE;
+ NW_Status_t s;
+ NW_REQUIRED_PARAM(pT);
+ NW_REQUIRED_PARAM(pI_name);
+ if (emptyTagFlag) {
+ s = NW_WBXML_Writer_TagClearContentFlag(pE, pTE->lastTagTokenIndex);
+ } else {
+ s = NW_WBXML_Writer_End(pE);
+ }
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ return s;
+}
+
+static
+NW_Status_t
+NW_XML_XmlpWbxmlEncoder_Cdata_CB(NW_XML_Reader_t* pT,
+ const NW_XML_Reader_Interval_t* pI_cdata,
+ void* pV)
+{
+ NW_XML_XmlpWbxmlEncoder_t* pTE = (NW_XML_XmlpWbxmlEncoder_t*)pV;
+ NW_WBXML_Writer_t* pE = pTE->pE;
+ NW_Uint8* pText;
+ NW_Uint8* pQuotedText;
+ NW_Uint8* pSrc;
+ NW_Uint8* pDest;
+ NW_Uint32 encoding = pT->encoding;
+ NW_Uint32 length;
+ NW_Uint32 byteLength;
+ NW_Uint32 charCount;
+ NW_Uint32 ampCount;
+ NW_Uint32 i, j;
+ NW_Ucs2 cUCS2;
+ NW_Status_t s;
+
+ /* code only supports the following charset values */
+ NW_ASSERT((encoding == HTTP_us_ascii)
+ || (encoding == HTTP_iso_8859_1)
+ || (encoding == HTTP_utf_8)
+ || (encoding == HTTP_iso_10646_ucs_2));
+
+ charCount = pI_cdata->charStop - pI_cdata->charStart;
+ length = pI_cdata->stop - pI_cdata->start;
+ if (length < 1) {
+ return NW_STAT_SUCCESS;
+ }
+ byteLength = length;
+ s = NW_XML_Reader_DataAddressFromBuffer(pT, pI_cdata->start,
+ &byteLength,
+ &pText);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (byteLength != length) {
+ return NW_STAT_FAILURE;
+ }
+
+ /* Cdata is not supposed to have any entity expansion done on it.
+ Since we don't alter the original document text in general, we
+ have done the entity expansion outside of cXML. Therefore, we
+ must quote any ampersands in the Cdata to prevent later entity
+ expansion. */
+
+ /* count ampersands */
+ pSrc = pText;
+ ampCount = 0;
+ for (i = 0; i < charCount; i++) {
+ j = NW_String_readChar(pSrc, &cUCS2, pT->encoding);
+ pSrc += j;
+ /* don't need to check j < 1, text has already been validated */
+ if (cUCS2 == '&') {
+ ampCount++;
+ }
+ }
+
+ pQuotedText = pText;
+ if (ampCount) {
+ /* allocate a new buffer
+
+ need incremental length for: & => &
+ start with single byte charset value */
+ ampCount *= 4;
+ /* double for ucs2 */
+ if (pT->encoding == HTTP_iso_10646_ucs_2) {
+ ampCount *= 2;
+ }
+ pQuotedText = (NW_Uint8*)NW_Mem_Malloc(byteLength + ampCount);
+ if (pQuotedText == NULL) {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+ /* copy and quote ampersands */
+ pSrc = pText;
+ pDest = pQuotedText;
+ for (i = 0; i < charCount; i++) {
+ j = NW_String_readChar(pSrc, &cUCS2, encoding);
+ /* don't need to check for byteCount < 1, text has already been
+ validated */
+ NW_Mem_memcpy(pDest, pSrc, j);
+ pSrc += j;
+ pDest += j;
+ if (cUCS2 == '&') {
+ if (encoding == HTTP_iso_10646_ucs_2) {
+ /* double byte */
+ *((NW_Uint16*)pDest) = 'a';
+ *((NW_Uint16*)(pDest + 2)) = 'm';
+ *((NW_Uint16*)(pDest + 4)) = 'p';
+ *((NW_Uint16*)(pDest + 6)) = ';';
+ pDest += 8;
+ } else {
+ /* single byte encodings */
+ NW_Mem_memcpy(pDest, "amp;", 4);
+ pDest += 4;
+ }
+ }
+ }
+ byteLength += ampCount;
+ if (pT->encoding == HTTP_iso_10646_ucs_2) {
+ charCount += (ampCount / 2);
+ } else {
+ charCount = byteLength;
+ }
+ }
+
+ /* output the text */
+ s = NW_XML_XmlpWbxmlEncoder_CoreTextHandler(pT->encoding,
+ charCount,
+ byteLength,
+ pQuotedText,
+ pE);
+ if (pQuotedText != pText) {
+ NW_Mem_Free(pQuotedText);
+ }
+ return s;
+}
+
+static
+NW_Status_t
+NW_XML_XmlpWbxmlEncoder_EndDocument_CB(NW_XML_Reader_t* pT, void* pV)
+{
+ /* When debugging, this func provides a place to capture the final WBXML. */
+ NW_REQUIRED_PARAM(pT);
+ NW_REQUIRED_PARAM(pV);
+ return NW_STAT_SUCCESS;
+}
+
+
+/* Function to check the string table of encoder process. If the string table is
+ * found and supported then keep a copy of this so that WBXML parser can populate
+ * its string table from this.
+ */
+static
+void NW_XML_StrTbl(struct NW_XML_Parser_EventCallbacks_s* eventCBs,
+ void** WBXMLEncStrTbl)
+{
+ //Keep the copy of the WBXML string table, so that it can be added to the
+ //DOM later.
+ if( (NW_Bool) (CXML_Additional_Feature_Supprted() & CXML_DTD_SUPPORT_ON) )
+ {
+ NW_Uint32 stringTableByteCount = 0;
+ NW_Encoder_StringTable_t* strTable = (NW_Encoder_StringTable_t*)
+ ((NW_XML_XmlpWbxmlEncoder_t*)eventCBs->pClientPointer)->pE->pStringTableObject;
+ if(strTable)
+ {
+ stringTableByteCount = NW_Encoder_StringTable_getTotalBytes(strTable);
+ if( (stringTableByteCount == 0) || (WBXMLEncStrTbl == NULL) )
+ {
+ //Empty Table
+ NW_Encoder_StringTable_delete(strTable);
+ if(WBXMLEncStrTbl)
+ {
+ *WBXMLEncStrTbl = NULL;
+ }
+ }
+ else
+ {
+ if(WBXMLEncStrTbl)
+ {
+ *WBXMLEncStrTbl = (void*) strTable;
+ }
+ }//end else
+ }//end if(strTable)
+ else
+ {
+ if(WBXMLEncStrTbl)
+ {
+ *WBXMLEncStrTbl = NULL;
+ }
+ }
+ }//end if((NW_Bool) CXML_Additional_Feature_Supprted() )
+ else
+ {
+ if(WBXMLEncStrTbl)
+ {
+ *WBXMLEncStrTbl = NULL;
+ }
+ }
+ return;
+}/*NW_XML_StrTbl()*/
+
+
+//Write the entity content now. There are two possibilities for
+//entities.
+//
+// 1) If it is character or decimal or predefined entities.
+// In this case, intEntityValStr = NULL.
+//
+// 2) If it is "Internal Entity" then intEntityValStr != NULL.
+// So, this is directly written to WBXML encoder as inline string.
+// In this case, entityVal = 0;
+
+static
+NW_Status_t
+NW_XML_XmlpWbxmlEncoder_Entity_CB(NW_XML_Reader_t* pT,NW_Uint32 numEntity,
+ void* pV, CXML_Uint8* intEntityValStr)
+{
+ NW_XML_XmlpWbxmlEncoder_t* pTE = (NW_XML_XmlpWbxmlEncoder_t*)pV;
+ NW_WBXML_Writer_t* pW = pTE->pE;
+ NW_Status_t s = NW_STAT_FAILURE;
+
+ NW_REQUIRED_PARAM(pT);
+ NW_REQUIRED_PARAM(pV);
+
+ if(intEntityValStr == NULL)
+ {
+ s = NW_WBXML_Writer_Entity(pW,numEntity);
+ }
+ else if( (intEntityValStr != NULL) && (numEntity == 0) )
+ {
+ NW_Uint32 valBufByteCnt = 0;
+ NW_Int32 valBufLen = NW_String_charBuffGetLength( (void*)intEntityValStr,
+ pT->encoding,
+ &valBufByteCnt);
+
+ /* Write internal entity as Inline string */
+
+ s = NW_WBXML_Writer_Text( pW, pT->encoding, valBufByteCnt, intEntityValStr);
+
+ }/*end else if*/
+
+ return s;
+}/*end NW_XML_XmlpWbxmlEncoder_Entity_CB() */
+
+/* This is used for if Entity is there in the Attribute value */
+
+static
+NW_Status_t
+NW_XML_XmlpWbxmlEncoder_Entity_Attr_VarVal_CB(NW_XML_Reader_t* pT,
+ const NW_XML_Reader_Interval_t* pI_name,
+ NW_Uint8* pValue,
+ NW_Uint32 valueByteLength,
+ void* pV)
+{
+NW_XML_XmlpWbxmlEncoder_t* pTE = (NW_XML_XmlpWbxmlEncoder_t*)pV;
+ NW_WBXML_Writer_t* pE = pTE->pE;
+ NW_Uint32 length;
+ NW_Uint32 nameLength;
+ NW_Uint32 valueCharCount;
+ NW_Uint8* pName;
+ NW_Status_t s;
+
+ if (!NW_XML_Reader_Interval_IsWellFormed(pI_name)) {
+ return NW_STAT_FAILURE;
+ }
+
+ /* var name setup */
+ length = pI_name->stop - pI_name->start;
+ nameLength = length; /* byte length */
+ s = NW_XML_Reader_DataAddressFromBuffer(pT, pI_name->start,
+ &nameLength, &pName);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (nameLength != length) {
+ return NW_STAT_FAILURE;
+ }
+ nameLength = pI_name->charStop - pI_name->charStart; /* char count */
+
+ /* value setup */
+ valueCharCount = valueByteLength;
+
+
+ if (pT->encoding == HTTP_iso_10646_ucs_2) {
+ NW_XML_XmlpWbxmlEncoder_Ucs2NativeToNetworkByteOrder(valueByteLength,
+ pValue);
+ }
+ s = NW_WBXML_Writer_AttributeAndValue(pE, pTE->encoding, nameLength,
+ pName, valueCharCount,
+ valueByteLength, pValue);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (pT->encoding == HTTP_iso_10646_ucs_2) {
+ NW_XML_XmlpWbxmlEncoder_Ucs2NetworkToNativeByteOrder(valueByteLength,
+ pValue);
+ }
+ return NW_STAT_SUCCESS;
+}/*end NW_XML_XmlpWbxmlEncoder_Entity_Attr_VarVal_CB(..)*/
+
+
+
+
+
+NW_Status_t
+NW_XML_XmlToWbxml(NW_Buffer_t* pInBuf, NW_Uint32 encoding,
+ NW_Buffer_t** ppOutBuf, NW_Uint32* line,
+ NW_Uint32 publicID, void** WBXMLEncStrTbl)
+{
+ NW_Status_t s;
+ NW_XML_Reader_t t;
+ NW_Uint8* pWbxmlBuf;
+ NW_Uint8* docStartAddress;
+ NW_Uint32 docByteLength;
+ NW_Uint32 wbxmlBufLength;
+ struct NW_XML_Parser_EventCallbacks_s wbxmlEncodeCallbacks;
+ NW_XML_XmlpWbxmlEncoder_t* ppTE = NULL;
+ NW_WBXML_Writer_t* pW = NULL;
+
+ NW_ASSERT( pInBuf != NULL );
+ NW_ASSERT( ppOutBuf != NULL );
+ NW_ASSERT( line != NULL );
+
+ *line = 0;
+ if (pInBuf->length == 0 || pInBuf->data == NULL) {
+ return NW_STAT_FAILURE;
+ }
+ /* For UTF-8 and UCS-2 handle BOM (byte order mark). Also, for
+ UCS-2 handle network (big) to native byte order conversion. */
+ docByteLength = pInBuf->length;
+ docStartAddress = pInBuf->data;
+ if (encoding == HTTP_utf_8) {
+ /* look for BOM and remove if found */
+ if (docByteLength >= 3) {
+ if ((docStartAddress[0] == 0xef)
+ && (docStartAddress[1] == 0xbb)
+ && (docStartAddress[2] == 0xbf)) {
+ docByteLength -= 3;
+ docStartAddress += 3;
+ }
+ }
+ }
+ if (encoding == HTTP_iso_10646_ucs_2) {
+ /* WARNING: we are assuming network byte order (i.e., big) for
+ the input document */
+ /* verify the doc has an even number of bytes, check LSB != 1 */
+ if ((docByteLength & 1) == 1) {
+ return NW_STAT_FAILURE;
+ }
+
+ /* make a pass over the doc, forcing byte order to native byte order */
+ NW_XML_XmlpWbxmlEncoder_Ucs2NetworkToNativeByteOrder(docByteLength,
+ docStartAddress);
+ /* now look for BOM and remove if found */
+ if (docByteLength >= 2) {
+ if (((docStartAddress[0] == 0xfe) && (docStartAddress[1] == 0xff))
+ || ((docStartAddress[0] == 0xff) && (docStartAddress[1] == 0xfe))) {
+ docByteLength -= 2;
+ docStartAddress += 2;
+ }
+ }
+ }
+ /* verify there is some doc remaining after BOM processing */
+ if (docByteLength == 0) {
+ return NW_STAT_FAILURE;
+ }
+
+ /* malloc the output buffer */
+ *ppOutBuf = (NW_Buffer_t*) NW_Mem_Malloc(sizeof(NW_Buffer_t));
+ if (!*ppOutBuf) {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+ (*ppOutBuf)->length = 0;
+ (*ppOutBuf)->allocatedLength = 0;
+ (*ppOutBuf)->data = NULL;
+
+ /* Null out all WBXML generation callback addresses. */
+ NW_Mem_memset(&wbxmlEncodeCallbacks, 0,
+ sizeof(struct NW_XML_Parser_EventCallbacks_s));
+ /* Add in-use WBXML generation callbacks. */
+ wbxmlEncodeCallbacks.StartDocument_CB = NW_XML_XmlpWbxmlEncoder_StartDocument_CB;
+ wbxmlEncodeCallbacks.Tag_Start_CB = NW_XML_XmlpWbxmlEncoder_Tag_Start_CB;
+ wbxmlEncodeCallbacks.Attr_Start_CB = NW_XML_XmlpWbxmlEncoder_Attr_Start_CB;
+ wbxmlEncodeCallbacks.Attr_VarVal_CB = NW_XML_XmlpWbxmlEncoder_Attr_VarVal_CB;
+ wbxmlEncodeCallbacks.Attributes_End_CB = NW_XML_XmlpWbxmlEncoder_Attributes_End_CB;
+ wbxmlEncodeCallbacks.Tag_End_CB = NW_XML_XmlpWbxmlEncoder_Tag_End_CB;
+ wbxmlEncodeCallbacks.Content_CB = NW_XML_XmlpWbxmlEncoder_Content_CB;
+ wbxmlEncodeCallbacks.Cdata_CB = NW_XML_XmlpWbxmlEncoder_Cdata_CB;
+ wbxmlEncodeCallbacks.EndDocument_CB = NW_XML_XmlpWbxmlEncoder_EndDocument_CB;
+
+ wbxmlEncodeCallbacks.Entity_CB = NW_XML_XmlpWbxmlEncoder_Entity_CB;
+ wbxmlEncodeCallbacks.Attr_Entity_VarVal_CB = NW_XML_XmlpWbxmlEncoder_Entity_Attr_VarVal_CB;
+
+
+ /* The encoder contains a WBXML_Writer that defaults to a sizing pass. */
+ s = NW_XML_XmlpWbxmlEncoder_New(publicID, encoding,
+ &(wbxmlEncodeCallbacks.pClientPointer));
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+
+ ppTE = (NW_XML_XmlpWbxmlEncoder_t*)wbxmlEncodeCallbacks.pClientPointer;
+ pW = (NW_WBXML_Writer_t*) ppTE->pE;
+
+ /* Hand the document text to the Reader in preparation for parsing. */
+ s = NW_XML_Reader_InitFromBuffer(&t, docByteLength, docStartAddress);
+ if (NW_STAT_IS_FAILURE(s)) {
+ NW_XML_XmlpWbxmlEncoder_Delete(wbxmlEncodeCallbacks.pClientPointer);
+ if(pW->pStringTableObject)
+ {
+ NW_Encoder_StringTable_delete(pW->pStringTableObject);
+ }
+ return s;
+ }
+ NW_XML_Reader_SetEncoding(&t, encoding);
+
+ /* Parse and do a sizing pass for the WBXML. */
+ s = NW_XML_Parse(&t, &wbxmlEncodeCallbacks);
+ if (NW_STAT_IS_FAILURE(s)) {
+ NW_Uint32 column;
+ NW_XML_Reader_GetLineColumn(&t, line, &column);
+ if(pW->pStringTableObject)
+ {
+ NW_Encoder_StringTable_delete(pW->pStringTableObject);
+ }
+ NW_XML_XmlpWbxmlEncoder_Delete(wbxmlEncodeCallbacks.pClientPointer);
+ return s;
+ }
+
+ /* If there is any string table data then free it after PASS-1 as
+ * PASS-2 will again store the data in this. The PASS-1 only calulate
+ * size of the WBXML buffer.
+ */
+
+ NW_Encoder_StringTable_delete((NW_Encoder_StringTable_t*)
+ ((NW_XML_XmlpWbxmlEncoder_t*)wbxmlEncodeCallbacks.pClientPointer)->pE->pStringTableObject);
+
+
+ /* Allocate buffer and reinitialize writer to write to buf. */
+ wbxmlBufLength = (((NW_XML_XmlpWbxmlEncoder_t*)
+ wbxmlEncodeCallbacks.pClientPointer)->pE->index);
+ pWbxmlBuf = (NW_Uint8*) NW_Mem_Malloc(wbxmlBufLength);
+ if (!pWbxmlBuf) {
+ if(pW->pStringTableObject)
+ {
+ NW_Encoder_StringTable_delete(pW->pStringTableObject);
+ }
+ NW_XML_XmlpWbxmlEncoder_Delete(wbxmlEncodeCallbacks.pClientPointer);
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+ NW_XML_XmlpWbxmlEncoder_SetToWrite((NW_XML_XmlpWbxmlEncoder_t*)
+ wbxmlEncodeCallbacks.pClientPointer,
+ wbxmlBufLength, pWbxmlBuf,
+ NULL /* no growth callback */);
+ /* Reregister the document text with the Reader in preparation for parsing. */
+ s = NW_XML_Reader_InitFromBuffer(&t, docByteLength, docStartAddress);
+ if (NW_STAT_IS_FAILURE(s)) {
+ if(pW->pStringTableObject)
+ {
+ NW_Encoder_StringTable_delete(pW->pStringTableObject);
+ }
+ NW_XML_XmlpWbxmlEncoder_Delete(wbxmlEncodeCallbacks.pClientPointer);
+ return s;
+ }
+ NW_XML_Reader_SetEncoding(&t, encoding);
+
+ /* Parse and generate WBXML. */
+ s = NW_XML_Parse(&t, &wbxmlEncodeCallbacks);
+ if (NW_STAT_IS_FAILURE(s)) {
+ NW_Uint32 column;
+ NW_XML_Reader_GetLineColumn(&t, line, &column);
+ if(pW->pStringTableObject)
+ {
+ NW_Encoder_StringTable_delete(pW->pStringTableObject);
+ }
+ NW_XML_XmlpWbxmlEncoder_Delete(wbxmlEncodeCallbacks.pClientPointer);
+ return s;
+ }
+
+ /* The string table support check and initialize parameter accordingly. */
+
+
+ NW_XML_StrTbl(&wbxmlEncodeCallbacks,WBXMLEncStrTbl);
+
+ NW_XML_XmlpWbxmlEncoder_Delete(wbxmlEncodeCallbacks.pClientPointer);
+ (*ppOutBuf)->length = wbxmlBufLength;
+ (*ppOutBuf)->allocatedLength = wbxmlBufLength;
+ (*ppOutBuf)->data = pWbxmlBuf;
+ return NW_STAT_SUCCESS;
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/xmlp/src/XmlpEntity.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,816 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_xmlp_xmlreader.h>
+#include <xml/cxml/nw_xmlp_xmlparser.h>
+#include <xml/cxml/nw_string_string.h>
+#include "cxml_xmlp_entity.h"
+#include "cxml_xmlp_int_entity.h"
+
+/*IMPORTANT NOTE: This array must be sorted by entity name. The lookup function
+ * does a binary search.
+ *
+ * When you update this table make sure the constant
+ * CXML_Num_CaseInsensitive_Entries which is the count of
+ * caseinsensitive entries is updated correctly
+ */
+
+#define CXML_Num_CaseInsensitive_Entries 126
+
+
+
+static
+const CXML_EntitySet_Entry_t CXML_EntitySet_Array[] =
+{
+ // CaseSensitive entries
+ {(CXML_Uint8*) "AElig", 198 },
+ {(CXML_Uint8*) "Aacute", 193 },
+ {(CXML_Uint8*) "Acirc", 194 },
+ {(CXML_Uint8*) "Agrave", 192 },
+ {(CXML_Uint8*) "Alpha", 913 },
+ {(CXML_Uint8*) "Aring", 197 },
+ {(CXML_Uint8*) "Atilde", 195 },
+ {(CXML_Uint8*) "Auml", 196 },
+ {(CXML_Uint8*) "Beta", 914 },
+ {(CXML_Uint8*) "Ccedil", 199 },
+ {(CXML_Uint8*) "Chi", 935 },
+ {(CXML_Uint8*) "Dagger", 8225 },
+ {(CXML_Uint8*) "Delta", 916 },
+ {(CXML_Uint8*) "ETH", 208 },
+ {(CXML_Uint8*) "Eacute", 201 },
+ {(CXML_Uint8*) "Ecirc", 202 },
+ {(CXML_Uint8*) "Egrave", 200 },
+ {(CXML_Uint8*) "Epsilon", 917 },
+ {(CXML_Uint8*) "Eta", 919 },
+ {(CXML_Uint8*) "Euml", 203 },
+ {(CXML_Uint8*) "Gamma", 915 },
+ {(CXML_Uint8*) "Iacute", 205 },
+ {(CXML_Uint8*) "Icirc", 206 },
+ {(CXML_Uint8*) "Igrave", 204 },
+ {(CXML_Uint8*) "Iota", 921 },
+ {(CXML_Uint8*) "Iuml", 207 },
+ {(CXML_Uint8*) "Kappa", 922 },
+ {(CXML_Uint8*) "Lambda", 923 },
+ {(CXML_Uint8*) "Mu", 924 },
+ {(CXML_Uint8*) "Ntilde", 209 },
+ {(CXML_Uint8*) "Nu", 925 },
+ {(CXML_Uint8*) "OElig", 338 },
+ {(CXML_Uint8*) "Oacute", 211 },
+ {(CXML_Uint8*) "Ocirc", 212 },
+ {(CXML_Uint8*) "Ograve", 210 },
+ {(CXML_Uint8*) "Omega", 937 },
+ {(CXML_Uint8*) "Omicron", 927 },
+ {(CXML_Uint8*) "Oslash", 216 },
+ {(CXML_Uint8*) "Otilde", 213 },
+ {(CXML_Uint8*) "Ouml", 214 },
+ {(CXML_Uint8*) "Phi", 934 },
+ {(CXML_Uint8*) "Pi", 928 },
+ {(CXML_Uint8*) "Prime", 8243 },
+ {(CXML_Uint8*) "Psi", 936 },
+ {(CXML_Uint8*) "Rho", 929 },
+ {(CXML_Uint8*) "Scaron", 352 },
+ {(CXML_Uint8*) "Sigma", 931 },
+ {(CXML_Uint8*) "THORN", 222 },
+ {(CXML_Uint8*) "Tau", 932 },
+ {(CXML_Uint8*) "Theta", 920 },
+ {(CXML_Uint8*) "Uacute", 218 },
+ {(CXML_Uint8*) "Ucirc", 219 },
+ {(CXML_Uint8*) "Ugrave", 217 },
+ {(CXML_Uint8*) "Upsilon", 933 },
+ {(CXML_Uint8*) "Uuml", 220 },
+ {(CXML_Uint8*) "Xi", 926 },
+ {(CXML_Uint8*) "Yacute", 221 },
+ {(CXML_Uint8*) "Yuml", 376 },
+ {(CXML_Uint8*) "Zeta", 918 },
+ {(CXML_Uint8*) "aacute", 225 },
+ {(CXML_Uint8*) "acirc", 226 },
+ {(CXML_Uint8*) "acute", 180 },
+ {(CXML_Uint8*) "aelig", 230 },
+ {(CXML_Uint8*) "agrave", 224 },
+ {(CXML_Uint8*) "alpha", 945 },
+ {(CXML_Uint8*) "atilde", 227 },
+ {(CXML_Uint8*) "auml", 228 },
+ {(CXML_Uint8*) "beta", 946 },
+ {(CXML_Uint8*) "ccedil", 231 },
+ {(CXML_Uint8*) "chi", 967 },
+ {(CXML_Uint8*) "dArr", 8659 },
+ {(CXML_Uint8*) "dagger", 8224 },
+ {(CXML_Uint8*) "darr", 8595 },
+ {(CXML_Uint8*) "delta", 948 },
+ {(CXML_Uint8*) "eacute", 233 },
+ {(CXML_Uint8*) "ecirc", 234 },
+ {(CXML_Uint8*) "egrave", 232 },
+ {(CXML_Uint8*) "epsilon", 949 },
+ {(CXML_Uint8*) "eta", 951 },
+ {(CXML_Uint8*) "euml", 235 },
+ {(CXML_Uint8*) "gamma", 947 },
+ {(CXML_Uint8*) "hArr", 8660 },
+ {(CXML_Uint8*) "harr", 8596 },
+ {(CXML_Uint8*) "iacute", 237 },
+ {(CXML_Uint8*) "icirc", 238 },
+ {(CXML_Uint8*) "igrave", 236 },
+ {(CXML_Uint8*) "iota", 953 },
+ {(CXML_Uint8*) "iuml", 239 },
+ {(CXML_Uint8*) "kappa", 954 },
+ {(CXML_Uint8*) "lArr", 8656 },
+ {(CXML_Uint8*) "lambda", 955 },
+ {(CXML_Uint8*) "larr", 8592 },
+ {(CXML_Uint8*) "mu", 956 },
+ {(CXML_Uint8*) "ntilde", 241 },
+ {(CXML_Uint8*) "nu", 957 },
+ {(CXML_Uint8*) "oacute", 243 },
+ {(CXML_Uint8*) "ocirc", 244 },
+ {(CXML_Uint8*) "oelig", 339 },
+ {(CXML_Uint8*) "ograve", 242 },
+ {(CXML_Uint8*) "omega", 969 },
+ {(CXML_Uint8*) "omicron", 959 },
+ {(CXML_Uint8*) "oslash", 248 },
+ {(CXML_Uint8*) "otilde", 245 },
+ {(CXML_Uint8*) "otimes", 8855 },
+ {(CXML_Uint8*) "ouml", 246 },
+ {(CXML_Uint8*) "phi", 966 },
+ {(CXML_Uint8*) "pi", 960 },
+ {(CXML_Uint8*) "psi", 968 },
+ {(CXML_Uint8*) "rArr", 8658 },
+ {(CXML_Uint8*) "rarr", 8594 },
+ {(CXML_Uint8*) "rho", 961 },
+ {(CXML_Uint8*) "scaron", 353 },
+ {(CXML_Uint8*) "sigma", 963 },
+ {(CXML_Uint8*) "tau", 964 },
+ {(CXML_Uint8*) "theta", 952 },
+ {(CXML_Uint8*) "thorn", 254 },
+ {(CXML_Uint8*) "uArr", 8657 },
+ {(CXML_Uint8*) "uacute", 250 },
+ {(CXML_Uint8*) "uarr", 8593 },
+ {(CXML_Uint8*) "ucirc", 251 },
+ {(CXML_Uint8*) "ugrave", 249 },
+ {(CXML_Uint8*) "upsilon", 965 },
+ {(CXML_Uint8*) "uuml", 252 },
+ {(CXML_Uint8*) "xi", 958 },
+ {(CXML_Uint8*) "yacute", 253 },
+ {(CXML_Uint8*) "yuml", 255 },
+ {(CXML_Uint8*) "zeta", 950 },
+ {(CXML_Uint8*) "zwj", 8205 },
+ {(CXML_Uint8*) "zwnj", 8204 },
+// Case Insensitive entries
+ {(CXML_Uint8*) "alefsym", 8501 },
+ {(CXML_Uint8*) "amp", 38 },
+ {(CXML_Uint8*) "and", 8743 },
+ {(CXML_Uint8*) "ang", 8736 },
+ {(CXML_Uint8*) "apos", 39 },
+ {(CXML_Uint8*) "aring", 229 },
+ {(CXML_Uint8*) "asymp", 8776 },
+ {(CXML_Uint8*) "bdquo", 8222 },
+ {(CXML_Uint8*) "brvbar", 166 },
+ {(CXML_Uint8*) "bull", 8226 },
+ {(CXML_Uint8*) "cap", 8745 },
+ {(CXML_Uint8*) "cedil", 184 },
+ {(CXML_Uint8*) "cent", 162 },
+ {(CXML_Uint8*) "circ", 710 },
+ {(CXML_Uint8*) "clubs", 9827 },
+ {(CXML_Uint8*) "cong", 8773 },
+ {(CXML_Uint8*) "copy", 169 },
+ {(CXML_Uint8*) "crarr", 8629 },
+ {(CXML_Uint8*) "cup", 8746 },
+ {(CXML_Uint8*) "curren", 164 },
+ {(CXML_Uint8*) "deg", 176 },
+ {(CXML_Uint8*) "diams", 9830 },
+ {(CXML_Uint8*) "divide", 247 },
+ {(CXML_Uint8*) "empty", 8709 },
+ {(CXML_Uint8*) "emsp", 8195 },
+ {(CXML_Uint8*) "ensp", 8194 },
+ {(CXML_Uint8*) "equiv", 8801 },
+ {(CXML_Uint8*) "eth", 240 },
+ {(CXML_Uint8*) "euro", 8364 },
+ {(CXML_Uint8*) "exist", 8707 },
+ {(CXML_Uint8*) "fnof", 402 },
+ {(CXML_Uint8*) "forall", 8704 },
+ {(CXML_Uint8*) "frac12", 189 },
+ {(CXML_Uint8*) "frac14", 188 },
+ {(CXML_Uint8*) "frac34", 190 },
+ {(CXML_Uint8*) "frasl", 8260 },
+ {(CXML_Uint8*) "ge", 8805 },
+ {(CXML_Uint8*) "gt", 62 },
+ {(CXML_Uint8*) "hearts", 9829 },
+ {(CXML_Uint8*) "hellip", 8230 },
+ {(CXML_Uint8*) "iexcl", 161 },
+ {(CXML_Uint8*) "image", 8465 },
+ {(CXML_Uint8*) "infin", 8734 },
+ {(CXML_Uint8*) "int", 8747 },
+ {(CXML_Uint8*) "iquest", 191 },
+ {(CXML_Uint8*) "isin", 8712 },
+ {(CXML_Uint8*) "lang", 9001 },
+ {(CXML_Uint8*) "laquo", 171 },
+ {(CXML_Uint8*) "lceil", 8968 },
+ {(CXML_Uint8*) "ldquo", 8220 },
+ {(CXML_Uint8*) "le", 8804 },
+ {(CXML_Uint8*) "lfloor", 8970 },
+ {(CXML_Uint8*) "lowast", 8727 },
+ {(CXML_Uint8*) "loz", 9674 },
+ {(CXML_Uint8*) "lrm", 8206 },
+ {(CXML_Uint8*) "lsaquo", 8249 },
+ {(CXML_Uint8*) "lsquo", 8216 },
+ {(CXML_Uint8*) "lt", 60 },
+ {(CXML_Uint8*) "macr", 175 },
+ {(CXML_Uint8*) "mdash", 8212 },
+ {(CXML_Uint8*) "micro", 181 },
+ {(CXML_Uint8*) "middot", 183 },
+ {(CXML_Uint8*) "minus", 8722 },
+ {(CXML_Uint8*) "nabla", 8711 },
+ {(CXML_Uint8*) "nbsp", 160 },
+ {(CXML_Uint8*) "ndash", 8211 },
+ {(CXML_Uint8*) "ne", 8800 },
+ {(CXML_Uint8*) "ni", 8715 },
+ {(CXML_Uint8*) "not", 172 },
+ {(CXML_Uint8*) "notin", 8713 },
+ {(CXML_Uint8*) "nsub", 8836 },
+ {(CXML_Uint8*) "oline", 8254 },
+ {(CXML_Uint8*) "oplus", 8853 },
+ {(CXML_Uint8*) "or", 8744 },
+ {(CXML_Uint8*) "ordf", 170 },
+ {(CXML_Uint8*) "ordm", 186 },
+ {(CXML_Uint8*) "para", 182 },
+ {(CXML_Uint8*) "part", 8706 },
+ {(CXML_Uint8*) "permil", 8240 },
+ {(CXML_Uint8*) "perp", 8869 },
+ {(CXML_Uint8*) "piv", 982 },
+ {(CXML_Uint8*) "plusmn", 177 },
+ {(CXML_Uint8*) "pound", 163 },
+ {(CXML_Uint8*) "prime", 8242 },
+ {(CXML_Uint8*) "prod", 8719 },
+ {(CXML_Uint8*) "prop", 8733 },
+ {(CXML_Uint8*) "quot", 34 },
+ {(CXML_Uint8*) "radic", 8730 },
+ {(CXML_Uint8*) "rang", 9002 },
+ {(CXML_Uint8*) "raquo", 187 },
+ {(CXML_Uint8*) "rceil", 8969 },
+ {(CXML_Uint8*) "rdquo", 8221 },
+ {(CXML_Uint8*) "real", 8476 },
+ {(CXML_Uint8*) "reg", 174 },
+ {(CXML_Uint8*) "rfloor", 8971 },
+ {(CXML_Uint8*) "rlm", 8207 },
+ {(CXML_Uint8*) "rsaquo", 8250 },
+ {(CXML_Uint8*) "rsquo", 8217 },
+ {(CXML_Uint8*) "sbquo", 8218 },
+ {(CXML_Uint8*) "sdot", 8901 },
+ {(CXML_Uint8*) "sect", 167 },
+ {(CXML_Uint8*) "shy", 173 },
+ {(CXML_Uint8*) "sigmaf", 962 },
+ {(CXML_Uint8*) "sim", 8764 },
+ {(CXML_Uint8*) "spades", 9824 },
+ {(CXML_Uint8*) "sub", 8834 },
+ {(CXML_Uint8*) "sube", 8838 },
+ {(CXML_Uint8*) "sum", 8721 },
+ {(CXML_Uint8*) "sup", 8835 },
+ {(CXML_Uint8*) "sup1", 185 },
+ {(CXML_Uint8*) "sup2", 178 },
+ {(CXML_Uint8*) "sup3", 179 },
+ {(CXML_Uint8*) "supe", 8839 },
+ {(CXML_Uint8*) "szlig", 223 },
+ {(CXML_Uint8*) "there4", 8756 },
+ {(CXML_Uint8*) "thetasym", 977 },
+ {(CXML_Uint8*) "thinsp", 8201 },
+ {(CXML_Uint8*) "tilde", 732 },
+ {(CXML_Uint8*) "times", 215 },
+ {(CXML_Uint8*) "trade", 8482 },
+ {(CXML_Uint8*)"uml", 168 },
+ {(CXML_Uint8*) "upsih", 978 },
+ {(CXML_Uint8*) "weierp", 8472 },
+ {(CXML_Uint8*) "yen", 165 },
+ {(CXML_Uint8*) "zwj", 8205 },
+ {(CXML_Uint8*) "zwnj", 8204 },
+};
+
+const CXML_Uint32 CXML_ALL_PREDEFINE_ENTITIES = (sizeof(CXML_EntitySet_Array)
+ / sizeof(CXML_EntitySet_Entry_t));
+
+/* It assumes the parser at the begginning i.e '&' symbol.
+ * The entity name stops at (;) or at '>'. If it is stopped
+ * at (;) then it is a valid entity.
+ * If it stops at '>' then it is not a valid entity.
+ */
+
+
+NW_Status_t CXML_XML_Parser_Entity(NW_XML_Reader_t* pT,
+ NW_XML_Reader_Interval_t* I_entityData,
+ NW_Bool* entityFound)
+{
+ NW_Status_t s;
+ NW_Bool endFound = NW_FALSE;
+ //NW_Uint32 isSpace;
+ NW_Uint32 cnt=0;
+ NW_Uint32 match;
+
+ s = NW_XML_Reader_Advance(pT); //Pass over the '&' symbol
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ NW_XML_Reader_Interval_Start(I_entityData, pT);
+
+ // Just check for false entity or error in entity e.g. If entity is not
+ // terminated by (;)
+
+
+ for(cnt=0; ; )
+ {
+
+ cnt++;
+
+ //check for terminating entity character
+
+ s = NW_XML_Reader_AsciiCharMatch(pT, ';', &match);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ if(match)
+ {
+ endFound = NW_TRUE;
+ break;
+ }
+
+ //Check condition if it is malformed entity. Exit at least
+ //at the end of attribute or contents.
+
+ s = NW_XML_Reader_AsciiCharMatch(pT, '>', &match);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ if(match)
+ {
+ endFound = NW_FALSE;
+ break;
+ }
+
+ //Move to next character
+
+ s = NW_XML_Reader_Advance(pT);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+ }//end for
+
+ if(endFound == NW_TRUE)
+ {
+ NW_XML_Reader_Interval_Stop(I_entityData, pT);
+ *entityFound = NW_TRUE;
+
+ //Move over end of entity i.e. (;) character.
+
+ s = NW_XML_Reader_Advance(pT);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return NW_STAT_FAILURE;
+ }
+ }
+ else
+ {
+ *entityFound = NW_FALSE;
+ s = NW_STAT_SUCCESS;
+ }
+
+
+ return s;
+}//end CXML_Parser_Entity(...)
+
+
+/* Function to verify the digit depending on its base */
+
+static
+CXML_Int32 CXML_XML_IsValidDigit (const CXML_Ucs2 ch,
+ NW_Int32 base)
+{
+ switch (base) {
+ case 10:
+ return CXML_Str_Isdigit (ch);
+
+ case 16:
+ return CXML_Str_Isxdigit (ch);
+
+ default:
+ return 0;
+ }
+}
+
+
+/*
+ * Function converts the entity string to the entity value.
+ */
+
+static
+NW_Bool CXML_XML_GetNumEntityChar (const CXML_Ucs2* instring,
+ CXML_Ucs2 *retchar,
+ CXML_Int32 base)
+{
+ CXML_Int32 result = 0;
+ CXML_Int32 prevResult;
+ CXML_Uint32 currDigit = 0;
+
+ if (*instring == 0) {
+ return NW_FALSE;
+ }
+
+ while (*instring != 0) {
+ if (!(CXML_XML_IsValidDigit (*instring, base)))
+ return NW_FALSE;
+
+ if (CXML_Str_Isdigit (*instring)) {
+ currDigit = *instring - CXML_ASCII_0;
+ instring++;
+ }
+ else {
+ currDigit = CXML_Str_ToUpper (*instring) - CXML_ASCII_UPPER_A + 10;
+ instring++;
+ }
+
+ prevResult = result;
+ result = result * base + currDigit;
+ if (result < prevResult) {
+ return NW_FALSE;
+ }
+ }
+ if (result > 0xffff || result < 0x0)
+ return NW_FALSE;
+
+ *retchar = (NW_Ucs2) result;
+ return NW_TRUE;
+}//end NW_Bool CXML_XML_GetNumEntityChar(..)
+
+
+/* This function uses the binary search to find the predefined
+ * entity names and corresponding value if found in the array.
+ */
+
+static NW_Ucs2
+CXML_Get_Entity_Val (NW_Ucs2 *name)
+{
+ CXML_Int32 index;
+ NW_Status_t s = NW_STAT_SUCCESS;
+ const CXML_EntitySet_Entry_t* entry;
+ NW_Ucs2* ucs2TempStr = NULL;
+ CXML_Uint32 entityLength = 0;
+
+ /* First do a binary search search in the case sensitive part of the array */
+ CXML_Int32 low = 0;
+ CXML_Int32 high = CXML_ALL_PREDEFINE_ENTITIES - CXML_Num_CaseInsensitive_Entries - 1;
+ CXML_Int32 res = 0;
+
+ while (low <= high ) {
+ index = (high + low) / 2;
+ entry = & (CXML_EntitySet_Array[index]);
+ entityLength = CXML_Asc_strlen((CXML_Int8 *)entry->name);
+
+ s = NW_String_byteToUCS2Char(entry->name,entityLength,&ucs2TempStr);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return 0;
+ }
+
+ // do a case insensitive string comparison
+
+ res = CXML_Str_StrcmpConst( name, ucs2TempStr );
+
+ if(ucs2TempStr != NULL)
+ {
+ NW_Mem_Free(ucs2TempStr);
+ ucs2TempStr = NULL;
+ }
+
+ if ( res > 0 ) {
+ /* name is ahead of this slot. Increase low bound. */
+ low = index + 1;
+ } else if ( res < 0 ) {
+ /* name is behind this slot. Decrease high bound. */
+ high = index - 1;
+ } else {
+ /* Found the entity name. Return its value. */
+ return entry->value;
+ }
+ }
+
+ /* if no match was found search in the case insensitive part of the table. */
+
+ low = CXML_ALL_PREDEFINE_ENTITIES - CXML_Num_CaseInsensitive_Entries;
+ high = CXML_ALL_PREDEFINE_ENTITIES - 1;
+ res = 0;
+ while (low <= high )
+ {
+ index = (high + low) / 2;
+ entry = &(CXML_EntitySet_Array[index]);
+ entityLength = CXML_Asc_strlen((CXML_Int8 *)entry->name);
+
+ s = NW_String_byteToUCS2Char(entry->name,entityLength,&ucs2TempStr);
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ return 0;
+ }
+
+ // do a case insensitive string comparison
+
+ res = CXML_Str_Stricmp( name, ucs2TempStr );
+
+ if(ucs2TempStr != NULL)
+ {
+ NW_Mem_Free(ucs2TempStr);
+ ucs2TempStr = NULL;
+ }
+
+
+ if ( res > 0 ) {
+ /* name is ahead of this slot. Increase low bound. */
+ low = index + 1;
+ } else if ( res < 0 ) {
+ /* name is behind this slot. Decrease high bound. */
+ high = index - 1;
+ } else {
+ /* Found the entity name. Return its value. */
+ return entry->value;
+ }
+ }/*end while */
+
+ /* if no match were found we return 0 */
+ return 0;
+}
+
+/* This function is called when entity of valid syntax is found. The
+ * entity validity is checked here.
+ *
+ * E.g. ⋙ is valid syntax entity but not a valid entity. In this
+ * case continue parsing the entity as it is. Create this
+ * as normal contents not as the entity.
+ *
+ * entityContent ==> Entity Name (e.g. "amp")
+ * length ==> Length of Entity Name.
+ * entityVal ==> This parameter will contain the entity value.
+ * if it is character entites (decimal, hex or predefined)
+ *
+ * entityFound ==> TRUE if it is valid entity of any kind.
+ * encoding ==> Encoding of input string.
+ *
+ * Resolve the following type of entities
+ * 1) Character hex entry
+ * 2) Character decimal entry
+ * 3) Prefined entry
+ * 4) Internal Entities defined in the DTD.
+ *
+ */
+
+
+static
+NW_Status_t CXML_XML_Resolve_Entity( CXML_Uint8* entityContent,
+ CXML_Uint32 length,
+ NW_Uint32* entityVal,
+ CXML_Uint8** entityValStr,
+ NW_Bool* entityFound,
+ NW_Uint32 encoding,
+ void* internalEntityList)
+{
+ NW_Status_t s = NW_STAT_SUCCESS;
+ NW_Ucs2 entityChar = 0;
+ NW_Ucs2* ucs2Str = NULL;
+ NW_Bool entityGot = NW_FALSE;
+
+
+
+ if( encoding == HTTP_iso_10646_ucs_2 )
+ {
+ /* Extra two bytes for NULL termination as UCS should be always
+ * even bytes.
+ */
+ ucs2Str = (NW_Ucs2*) NW_Mem_Malloc(length+2);
+ if(ucs2Str != NULL)
+ {
+ (void)NW_Mem_memcpy(ucs2Str, entityContent, length );
+ /* Null-terminate the string */
+ ucs2Str[length/2] = '\000';
+ }
+ else
+ {
+ s = NW_STAT_OUT_OF_MEMORY;
+ }
+ }
+ else
+ {
+ s = NW_String_byteToUCS2Char(entityContent,length,&ucs2Str);
+ }
+
+
+ if (NW_STAT_IS_FAILURE(s))
+ {
+ if(ucs2Str != NULL)
+ {
+ NW_Mem_Free(ucs2Str);
+ }
+ return s;
+ }
+
+ /*Check and validate for Hex/Decimal numeric character entry */
+
+ if(ucs2Str[0] == '#')
+ {
+ entityGot = CXML_TRUE;
+ if( (ucs2Str[1] == 'x') || (ucs2Str[1] == 'X') ) //Hex entity
+ {
+
+ if(CXML_XML_GetNumEntityChar(ucs2Str + 2,&entityChar,16) != NW_TRUE)
+ {
+ /* Entity syntax is valid, but entity value is wrong so continue parsing it as
+ * normal syntax.
+ */
+ *entityFound = CXML_FALSE;
+ if(ucs2Str != NULL)
+ {
+ NW_Mem_Free(ucs2Str);
+ }
+ return NW_STAT_SUCCESS;
+ }
+ *entityVal = (entityChar);
+ *entityValStr = NULL;
+ }
+ else
+ {
+ /*Check and validate for Decimal numeric character entry */
+ if(CXML_XML_GetNumEntityChar(ucs2Str + 1,&entityChar,10) != NW_TRUE)
+ {
+ /* Entity syntax is valid, but entity value is wrong so continue parsing it as
+ * normal syntax.
+ */
+ *entityFound = CXML_FALSE;
+ if(ucs2Str != NULL)
+ {
+ NW_Mem_Free(ucs2Str);
+ }
+ return NW_STAT_SUCCESS;
+ }
+ *entityVal = (entityChar);
+ *entityValStr = NULL;
+ }
+ *entityFound = CXML_TRUE;
+ } //end if(ucs2Str[0] == '#')
+
+ /* Check for only predefined entities */
+
+ if(entityGot != CXML_TRUE)
+ {
+ if( ( entityChar = CXML_Get_Entity_Val(ucs2Str) ) != 0)
+ {
+ entityGot = NW_TRUE;
+ }
+
+
+ if(entityGot == NW_TRUE)
+ {
+ *entityVal = entityChar;
+ *entityValStr = NULL;
+ *entityFound = CXML_TRUE;
+ }
+ } //end if(..)
+
+ /*Check for the Internal Entity */
+
+
+ if(entityGot != CXML_TRUE)
+ {
+ s = CXML_XML_Resolve_Internal_Entity(ucs2Str, entityValStr, entityFound, encoding, internalEntityList);
+ *entityVal = 0;
+ }
+
+
+ if(ucs2Str != NULL)
+ {
+ NW_Mem_Free(ucs2Str);
+ }
+
+ return NW_STAT_SUCCESS;
+}//end CXML_XML_Resolve_Entity()
+
+/* Reads the entity data. Decide about the entity. */
+
+
+NW_Status_t CXML_XML_Handle_entity(NW_XML_Reader_t* pT,
+ NW_XML_Reader_Interval_t* pI_entityData,
+ NW_Uint32* entityVal,
+ NW_Uint8** entityValStr,
+ NW_Bool* entityFound,
+ void* internalEntityList)
+{
+ NW_Status_t s;
+ NW_Uint32 length;
+ NW_Uint32 byteLength;
+ NW_Uint8* pContent;
+
+ if (!NW_XML_Reader_Interval_IsWellFormed(pI_entityData)) {
+ return NW_STAT_FAILURE;
+ }
+
+ length = pI_entityData->stop - pI_entityData->start;
+ byteLength = length;
+
+ s = NW_XML_Reader_DataAddressFromBuffer(pT, pI_entityData->start,
+ &byteLength,
+ &pContent);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+
+ if (byteLength != length) {
+ return NW_STAT_FAILURE;
+ }
+
+ s = CXML_XML_Resolve_Entity(pContent,length,entityVal,entityValStr,entityFound,
+ pT->encoding, internalEntityList);
+
+return s;
+}//end CXML_XML_Handle_entity(..)
+
+ /* The following function converts the numeric entities to the
+ * predefined entity.
+ */
+
+static
+NW_Status_t CXML_XML_Entity_to_Ascii(CXML_Uint32 entityVal,
+ CXML_Byte* entityStr,
+ CXML_Uint32* strLen)
+{
+ NW_Uint32 i = 0, j=0;
+ CXML_Uint32 entityLength = 0;
+ NW_Status_t s = NW_STAT_FAILURE;
+
+ for(i=0; i < CXML_ALL_PREDEFINE_ENTITIES; i++)
+ {
+ if(CXML_EntitySet_Array[i].value == entityVal)
+ {
+ entityStr[0] = '&'; //Starting of the entity
+
+ entityLength = CXML_Asc_strlen((CXML_Int8 *)CXML_EntitySet_Array[i].name);
+
+ for(j=0; j < entityLength; j++)
+ {
+ entityStr[j+1] = CXML_EntitySet_Array[i].name[j];
+ }
+
+ entityStr[j + 1] = ';' ; //end of entity
+ *strLen = entityLength + 2;
+ entityStr[*strLen] = '\0';
+ s = NW_STAT_SUCCESS;
+ break;
+ }//endif
+ }//end for(..)
+
+ return s;
+}//end CXML_XML_Ascii_to_Entity(..)
+
+/* This function assumes that predefined entities. The predefined
+ * entities are defined in the CXML_EntitySet_Array[].
+ *
+ */
+
+EXPORT_C
+NW_Status_t CXML_XML_Get_Entity(CXML_Uint32 entityVal,
+ CXML_Byte* entityStr,
+ CXML_Uint32* strLen)
+{
+ NW_Status_t s = NW_STAT_SUCCESS;
+ *strLen = 0;
+
+
+ s = CXML_XML_Entity_to_Ascii( entityVal,entityStr,strLen);
+
+ if(s == NW_STAT_FAILURE)
+ {
+ *entityStr = NULL;
+ *strLen = NULL;
+ }
+
+ return s;
+}//end CXML_XML_Get_Entity()
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cxmllibrary/src/xmlp/src/XmlpIntEntity.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,482 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/* Code to handle Internal Entities */
+
+#include "cxml_internal.h"
+#include <xml/cxml/nw_xmlp_xmlreader.h>
+#include <xml/cxml/nw_xmlp_xmlparser.h>
+#include <xml/cxml/nw_string_string.h>
+
+#include "cxml_xmlp_int_entity.h"
+
+//#include <flogger.h> // Comment out this.
+
+
+
+
+
+/** ----------------------------------------------------------------------- **
+ @function: CXML_XML_Parser_Store_I_Entity
+ @synopsis: Function to store the internal entity.
+ @scope: public
+
+ @parameters:
+ [in] entityVal
+
+
+ [in] NW_XML_Reader_Interval_t* I_entityName
+ Internal Entity Name
+
+
+ [in] NW_XML_Reader_Interval_t* I_entityValue
+ Internal Entity Value
+
+ [in] RPointerArray <CXML_Internal_Entity_t>* internalEntityList: Internal Entity list
+
+ @description: This extracts the Internal Entity name from the XML buffer
+ and stores in the Link list.
+
+ @returns:
+ In case of file related failures: Error codes is returned defined in
+ nwx_status.h
+ NW_STAT_FAILURE : For any general error and entity is not predefined
+ entity.
+ NW_STAT_SUCCESS: For success
+ -----------------------------------------------------------------------------------**/
+
+ NW_Status_t CXML_XML_Parser_Store_I_Entity(NW_XML_Reader_t* pT,
+ NW_XML_Reader_Interval_t* I_entityName,
+ NW_XML_Reader_Interval_t* I_entityValue,
+ RPointerArray <CXML_Internal_Entity_t>* internalEntityList)
+ {
+ NW_Uint32 length;
+ NW_Uint32 nameLength;
+ NW_Uint32 totalByteCount = 0;
+ NW_Uint32 i =0;
+ NW_Uint8* bufPointer;
+ NW_Uint8* pName;
+ NW_Ucs2* ucsName;
+ NW_Uint32 valueByteLength;
+ NW_Uint8* pValue;
+ NW_Ucs2* ucsValue;
+ CXML_Internal_Entity_t* internalEntity=NULL;
+ NW_Ucs2 c;
+ NW_Uint32 numbytes;
+ TInt errorCode;
+ TInt entryCount;
+ NW_Status_t s;
+
+ /* Check Entity Name Interval and Value Interval is valid */
+
+ if ( (!NW_XML_Reader_Interval_IsWellFormed(I_entityName) ) &&
+ (!NW_XML_Reader_Interval_IsWellFormed(I_entityValue) ) )
+ {
+ return NW_STAT_FAILURE;
+ }
+
+
+ /* Entity name */
+
+ length = I_entityName->stop - I_entityName->start;
+ nameLength = length; /* byte length */
+ s = NW_XML_Reader_DataAddressFromBuffer(pT, I_entityName->start,
+ &nameLength, &bufPointer);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (nameLength != length) {
+ return NW_STAT_FAILURE;
+ }
+ nameLength = I_entityName->charStop - I_entityName->charStart; /* char count */
+
+ /* pName is not NULL terminated so need to use following method. The num byte
+ * will be used for both pName and pVlaue.
+ */
+
+
+ numbytes = NW_String_readChar( (NW_Byte*) bufPointer,&c,pT->encoding);
+
+ /* Calculate the length of string. Also add the number of characters
+ * required for the NULL termination.
+ */
+
+ totalByteCount = length + numbytes;
+
+
+ pName = (NW_Uint8*) NW_Mem_Malloc(totalByteCount);
+
+ if (pName != NULL)
+ {
+ (void)NW_Mem_memcpy(pName , bufPointer, length );
+
+
+ for(i=0; i < numbytes; i++)
+ {
+ pName[length+i] = '\0';
+ }
+ } /*end if (pName != NULL)*/
+ else
+ {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+
+
+ /* The "pName" is already NULL terminated */
+
+ if(pT->encoding != HTTP_iso_10646_ucs_2)
+ {
+ s = NW_String_byteToUCS2Char(pName, length, &ucsName);
+
+ if(s != NW_STAT_SUCCESS)
+ {
+ return s;
+ }
+
+ totalByteCount = 2*totalByteCount;
+ }/*end if(pT->encoding != HTTP_iso_10646_ucs_2)*/
+ else
+ {
+ ucsName = (NW_Ucs2*) NW_Mem_Malloc(totalByteCount);
+ (void)NW_Mem_memcpy(ucsName, pName, totalByteCount);
+
+ }
+
+ /*Now free the pName */
+
+ if(pName != NULL)
+ {
+ NW_Mem_Free(pName);
+ }
+
+ internalEntity = (CXML_Internal_Entity_t*) NW_Mem_Malloc(sizeof(CXML_Internal_Entity_t) );
+
+ if(internalEntity == NULL)
+ {
+ if(pName != NULL)
+ {
+ NW_Mem_Free(pName);
+ }
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+
+
+ //SSS: Comment me.
+/*
+ RFileLogger::WriteFormat(_L("Browser"), _L("xml_core.log"),
+ EFileLoggingModeAppend, _L("In_INT:Name=%s \n"),
+ ucsName);
+
+*/
+
+ /* Length is including the NULL termination. */
+
+ internalEntity->nameLen = totalByteCount;
+
+ /* value setup */
+ length = I_entityValue->stop - I_entityValue->start;
+ valueByteLength = length;
+ s = NW_XML_Reader_DataAddressFromBuffer(pT, I_entityValue->start,
+ &valueByteLength, &bufPointer);
+ if (NW_STAT_IS_FAILURE(s)) {
+ return s;
+ }
+ if (valueByteLength != length) {
+ return NW_STAT_FAILURE;
+ }
+
+ /* Calculate the length of string. Also add the number of characters
+ * required for the NULL termination.
+ */
+
+ totalByteCount = length + numbytes;
+
+
+ pValue = (NW_Uint8*) NW_Mem_Malloc(totalByteCount);
+
+ if (pValue != NULL)
+ {
+ (void)NW_Mem_memcpy(pValue , bufPointer, length );
+
+
+ for(i=0; i < numbytes; i++)
+ {
+ pValue[length+i] = '\0';
+ }
+ } /*end if (pValue != NULL)*/
+ else
+ {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+
+
+ if(pT->encoding != HTTP_iso_10646_ucs_2)
+ {
+ s = NW_String_byteToUCS2Char(pValue, length, &ucsValue);
+
+ if(s != NW_STAT_SUCCESS)
+ {
+ return s;
+ }
+ totalByteCount = 2*totalByteCount;
+ }/*end if(pT->encoding != HTTP_iso_10646_ucs_2)*/
+ else
+ {
+ ucsValue = (NW_Ucs2*) NW_Mem_Malloc(totalByteCount);
+ (void)NW_Mem_memcpy(ucsValue, pValue, totalByteCount);
+
+ }
+ /*Now free the pValue */
+
+ if(pValue != NULL)
+ {
+ NW_Mem_Free(pValue);
+ }
+
+
+
+ //SSS: Comment me.
+/*
+ RFileLogger::WriteFormat(_L("Browser"), _L("xml_core.log"),
+ EFileLoggingModeAppend, _L("In_INT:Value=%s \n"),
+ ucsValue);
+*/
+
+
+
+ internalEntity->name = ucsName;
+ internalEntity->value = ucsValue;
+
+ entryCount = internalEntityList->Count();
+
+ errorCode = internalEntityList->Insert(internalEntity,entryCount);
+
+ if(errorCode != KErrNone)
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ ///SSS:Comment me below.
+ /*
+ RFileLogger::WriteFormat(_L("Browser"), _L("xml_core.log"),
+ EFileLoggingModeAppend, _L("In_INT:Adding:nameLen=%d name=%s valueLen=%d value=%s \n"),
+ internalEntity->nameLen, internalEntity->name,
+ totalByteCount, internalEntity->value );
+
+ */
+
+
+
+
+ return NW_STAT_SUCCESS;
+
+ }/*end CXML_XML_Parser_Store_I_Entity*/
+
+ /** ----------------------------------------------------------------------- **
+ @function: CXML_XML_Parser_Free_I_Entity_List
+ @synopsis: Function to free the internal entity list.
+ @scope: public
+
+ @parameters: void
+
+
+ @description: Function to free the internal entity list.
+
+ @returns:
+ void
+ -----------------------------------------------------------------------------------**/
+
+ void CXML_XML_Parser_Free_I_Entity_List(RPointerArray <CXML_Internal_Entity_t> internalEntityList)
+ {
+ TInt count = 0;
+ NW_Int32 i = 0;
+ CXML_Internal_Entity_t* internalEntity=NULL;
+
+
+ count = internalEntityList.Count();
+
+ for(i=0; i < count; i++)
+ {
+ internalEntity = (CXML_Internal_Entity_t*) internalEntityList[i];
+
+ if(internalEntity != NULL)
+ {
+ /*
+
+ RFileLogger::WriteFormat(_L("Browser"), _L("xml_core.log"),
+ EFileLoggingModeAppend, _L("Deleting: name=%s value=%s \n"),
+ internalEntity->name, internalEntity->value );
+ */
+
+ NW_Mem_Free(internalEntity->name);
+ NW_Mem_Free(internalEntity->value);
+ }
+ } /*end for()*/
+ /* This will destroy the internal pointers */
+
+ internalEntityList.ResetAndDestroy();
+
+ }/*end CXML_XML_Parser_Free_I_Entity_List(void)*/
+
+
+ /** ----------------------------------------------------------------------- **
+ @function: CXML_XML_Resolve_Internal_Entity
+ @synopsis: Function to store the internal entity.
+ @scope: public
+
+ @parameters:
+ [in] NW_Ucs2* entityName: Name of Entity
+
+
+ [out] CXML_Uint8** entityValStr
+ If the entity name is the internal entity then this
+ contains the entiy value string otherwise NULL.
+
+
+
+ [out] NW_Bool* entityFound
+ If it is internal entity then it is true otherwise false.
+ [in] NW_Uint32 encoding:
+ Original encoding of the buffer so that entityValStr contain
+ correct.
+
+ [in] void* internalEntityList: Internal Entity list
+
+ @description: This extracts the Internal Entity name from the XML buffer
+ and stores in the Link list.
+
+ @returns:
+ In case of file related failures: Error codes is returned defined in
+ nwx_status.h
+ NW_STAT_FAILURE : For any general error and entity is not predefined
+ entity.
+ NW_STAT_SUCCESS: For success
+ -----------------------------------------------------------------------------------**/
+
+ NW_Status_t CXML_XML_Resolve_Internal_Entity(NW_Ucs2* entityName,
+ CXML_Uint8** entityValStr,
+ NW_Bool* entityFound,
+ NW_Uint32 encoding,
+ void* entityList)
+ {
+ NW_Uint32 entityNameByteCnt;
+ TInt count = 0;
+ CXML_Int32 i = 0;
+ CXML_Int32 strCmp;
+ NW_Ucs2* valBuf;
+ NW_Uint32 valBufByteCnt = 0;
+ CXML_Internal_Entity_t* internalEntity=NULL;
+ RPointerArray <CXML_Internal_Entity_t>* internalEntityList = (RPointerArray <CXML_Internal_Entity_t>*) entityList;
+
+ *entityFound = NW_FALSE;
+
+
+
+ /* The entity name at time is always in the Ucs2 so fixed value is used below */
+
+
+ NW_Int32 entityNameLen = NW_String_charBuffGetLength((void*) entityName,
+ HTTP_iso_10646_ucs_2,
+ &entityNameByteCnt);
+
+
+ (void) entityNameLen; //To remove the warning
+ count = internalEntityList->Count();
+
+ /* Now look for entity name in "internalEntityList" */
+
+ for(i=0; i < count; i++)
+ {
+ internalEntity = (CXML_Internal_Entity_t*) (*internalEntityList)[i];
+
+
+ if(internalEntity != NULL)
+ {
+ if(internalEntity->nameLen == entityNameByteCnt)
+ {
+ strCmp = CXML_Str_Stricmp( (const CXML_Ucs2 *)internalEntity->name, entityName);
+
+ if(strCmp == 0)
+ {
+
+ valBuf = internalEntity->value ;
+ NW_Int32 valBufLen = NW_String_charBuffGetLength( (void*)internalEntity->value,
+ HTTP_iso_10646_ucs_2,
+ &valBufByteCnt);
+
+ if(valBuf != NULL)
+ {
+
+
+ switch(encoding)
+ {
+ /* write the string based on the actual encoding.*/
+ case HTTP_utf_8:
+ *entityValStr = (NW_Byte*) CXML_Str_CvtToAscii(valBuf);
+ *entityFound = NW_TRUE;
+ break;
+
+ case HTTP_iso_8859_1:
+ case HTTP_us_ascii:
+ *entityValStr = (NW_Byte*) CXML_Str_CvtToAscii(valBuf);
+ *entityFound = NW_TRUE;
+ break;
+ case HTTP_iso_10646_ucs_2:
+ *entityValStr = (CXML_Uint8*) NW_Mem_Malloc(valBufByteCnt);
+ if(*entityValStr == NULL)
+ {
+ return NW_STAT_OUT_OF_MEMORY;
+ }
+ CXML_Mem_memcpy((void*)*entityValStr,internalEntity->value,valBufByteCnt);
+ *entityFound = NW_TRUE;
+ break;
+ default:
+ //Some thing wrong so break
+ break;
+ }/*end switch(encoding)*/
+
+ if(*entityFound == NW_TRUE)
+ {
+ break;
+ }
+ }/*end if(valBuf != NULL)*/
+ }/*end if(strCmp == 0)*/
+
+ }/*end if(internalEntity->nameLen = entityNameByteCnt)*/
+
+ }/*end if(internalEntity != NULL)*/
+ } /*end for()*/
+
+
+ if(*entityFound == NW_FALSE)
+ {
+ /*If it is not a internal Entity */
+ *entityValStr = NULL;
+ }
+
+ ///SSS: This will be freed when Internal Entity Array is freed
+ /*
+ if(valBuf != NULL)
+ {
+ NW_Mem_Free(valBuf);
+ }
+ */
+ return NW_STAT_SUCCESS;
+ }/*end CXML_XML_Resolve_Internal_Entity() */
--- a/xml/legacyminidomparser/GROUP/syslibs_legacyminidomparser.mrp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/legacyminidomparser/GROUP/syslibs_legacyminidomparser.mrp Thu Jul 22 16:49:54 2010 +0100
@@ -1,19 +1,3 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
component syslibs_legacyminidomparser
source \sf\os\xmlsrv\xml\legacyminidomparser
binary \sf\os\xmlsrv\xml\legacyminidomparser\GROUP all
--- a/xml/legacyminidomparser/Rom/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/legacyminidomparser/Rom/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -19,7 +19,3 @@
../Rom/legacyminidomparser.iby /epoc32/rom/include/legacyminidomparser.iby
-PRJ_TESTEXPORTS
-
-../Rom/legacyminidomparsertest.iby /epoc32/rom/include/legacyminidomparsertest.iby
-
--- a/xml/legacyminidomparser/Rom/legacyminidomparser.iby Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/legacyminidomparser/Rom/legacyminidomparser.iby Thu Jul 22 16:49:54 2010 +0100
@@ -18,7 +18,7 @@
#ifndef __LEGACYMINIDOMPARSER_IBY__
#define __LEGACYMINIDOMPARSER_IBY__
-file=ABI_DIR\BUILD_DIR\XMLDOM.dll System\libs\XMLDOM.dll
-file=ABI_DIR\BUILD_DIR\xmlparser.dll System\libs\xmlparser.dll
+file=ABI_DIR\BUILD_DIR\XMLDOM.dll sys\bin\XMLDOM.dll
+file=ABI_DIR\BUILD_DIR\xmlparser.dll sys\bin\xmlparser.dll
#endif
--- a/xml/legacyminidomparser/Rom/legacyminidomparsertest.iby Fri Jun 11 16:29:19 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,367 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef __LEGACYMINIDOMPARSERTEST_IBY__
-#define __LEGACYMINIDOMPARSERTEST_IBY__
-
-#include <legacyminidomparser.iby>
-
-file=ABI_DIR\BUILD_DIR\t_gmxmlparser.exe test\t_gmxmlparser.exe
-file=ABI_DIR\BUILD_DIR\t_gmxmlfailure.exe test\t_gmxmlfailure.exe
-
-file=ABI_DIR\BUILD_DIR\t_smiltranslatortest.exe test\t_smiltranslatortest.exe
-
-
-data=DATAZ_\gmxmltest.txt gmxmltest.txt
-
-// SMIL Input Valid
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\anchor_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\anchor_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\anchor_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\anchor_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\anchor_att_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\anchor_att_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\anchor_att_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\anchor_att_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\anchor_att_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\anchor_att_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\animation_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\animation_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\animation_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\animation_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\animation_att_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\animation_att_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\animation_att_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\animation_att_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\animation_att_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\animation_att_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\area_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\area_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\area_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\area_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\area_att_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\area_att_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\area_att_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\area_att_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\area_att_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\area_att_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\ascii_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\ascii_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\att_order_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\att_order_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\att_order_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\att_order_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\att_var_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\att_var_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\audio_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\audio_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\audio_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\audio_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\audio_att_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\audio_att_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\audio_att_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\audio_att_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\audio_att_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\audio_att_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_att_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_att_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_att_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_att_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_att_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_att_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_struc_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_struc_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_struc_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_struc_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_struc_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_struc_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_struc_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_struc_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\body_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\body_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\body_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\body_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\body_struc_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\body_struc_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\body_struc_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\body_struc_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_10.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_10.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_11.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_11.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_12.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_12.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_13.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_13.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_14.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_14.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_15.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_15.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_16.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_16.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_17.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_17.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_18.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_18.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_19.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_19.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_20.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_20.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_21.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_21.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_22.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_22.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_23.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_23.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_24.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_24.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_25.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_25.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_26.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_26.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_27.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_27.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_28.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_28.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_29.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_29.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_30.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_30.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_6.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_6.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_7.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_7.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_8.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_8.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\comments_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\comments_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\doctype_variation.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\doctype_variation.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\Entitiy_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\Entitiy_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_10.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_10.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_11.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_11.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_12.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_12.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_13.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_13.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_14.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_14.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_15.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_15.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_17.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_17.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_18.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_18.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_19.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_19.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_20.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_20.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_21.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_21.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_22.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_22.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_24.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_24.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_26.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_26.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_27.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_27.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_30.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_30.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_31.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_31.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_6.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_6.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_7.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_7.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_8.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_8.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\head_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\head_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\head_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\head_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\img_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\img_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\img_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\img_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\img_att_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\img_att_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\img_att_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\img_att_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\img_att_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\img_att_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\INC021337.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\INC021337.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\INC022160.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\INC022160.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\INC025788.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\INC025788.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\layout_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\layout_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\layout_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\layout_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\newline_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\newline_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\par_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\par_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\par_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\par_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\par_att_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\par_att_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\par_att_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\par_att_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\par_att_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\par_att_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\ref_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\ref_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\ref_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\ref_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\ref_att_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\ref_att_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\ref_att_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\ref_att_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\ref_att_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\ref_att_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\region_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\region_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\region_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\region_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\region_att_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\region_att_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\region_att_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\region_att_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\region_att_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\region_att_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\region_att_6.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\region_att_6.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\root-layout_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\root-layout_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\root-layout_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\root-layout_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\root-layout_att_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\root-layout_att_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_att_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_att_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_att_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_att_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_att_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_att_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_struc_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_struc_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_struc_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_struc_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_struc_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_struc_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_struc_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_struc_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_struc_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_struc_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_struc_6.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_struc_6.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\smil_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\smil_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\smil_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\smil_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\switch_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\switch_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\switch_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\switch_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\switch_struc_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\switch_struc_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\switch_struc_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\switch_struc_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\switch_struc_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\switch_struc_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\textstream_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\textstream_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\textstream_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\textstream_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\textstream_att_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\textstream_att_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\textstream_att_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\textstream_att_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\textstream_att_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\textstream_att_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\text_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\text_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\text_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\text_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\text_att_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\text_att_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\text_att_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\text_att_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\text_att_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\text_att_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\utf8.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\utf8.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\video_att_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\video_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\video_att_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\video_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\video_att_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\video_att_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\video_att_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\video_att_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\video_att_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\video_att_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\whitespace_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\whitespace_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\whitespace_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\whitespace_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\xml_version_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\xml_version_1.txt
-
-
-// SMIL Input InValid
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\a_att_10.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\a_att_10.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\a_att_11.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\a_att_11.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\a_att_6.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\a_att_6.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\a_att_7.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\a_att_7.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\a_att_8.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\a_att_8.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\a_att_9.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\a_att_9.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\cdata_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\cdata_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\Entitiy_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\Entitiy_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\entity_ref_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\entity_ref_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\entity_ref_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\entity_ref_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\entity_ref_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\entity_ref_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\entity_ref_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\entity_ref_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_10.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_10.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_11.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_11.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_12.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_12.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_13.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_13.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_14.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_14.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_15.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_15.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_16.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_16.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_17.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_17.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_18.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_18.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_19.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_19.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_20.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_20.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_21.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_21.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_22.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_22.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_23.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_23.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_24.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_24.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_25.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_25.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_6.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_6.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_7.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_7.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_8.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_8.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_9.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_9.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\INC021591.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\INC021591.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\INC021675.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\INC021675.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_1.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_10.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_10.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_11.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_11.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_12.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_12.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_13.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_13.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_14.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_14.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_15.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_15.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_16.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_16.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_17.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_17.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_18.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_18.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_19.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_19.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_2.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_20.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_20.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_21.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_21.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_22.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_22.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_23.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_23.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_24.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_24.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_25.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_25.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_26.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_26.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_27.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_27.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_28.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_28.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_29.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_29.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_3.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_31.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_31.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_32.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_32.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_33.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_33.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_34.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_34.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_35.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_35.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_36.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_36.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_37.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_37.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_38.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_38.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_39.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_39.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_40.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_40.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_6.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_6.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_7.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_7.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_8.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_8.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_9.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_9.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\region_att_10.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\region_att_10.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\region_att_11.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\region_att_11.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\region_att_7.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\region_att_7.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\region_att_8.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\region_att_8.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\region_att_9.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\region_att_9.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\root-layout_att_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\root-layout_att_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\root-layout_att_5.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\root-layout_att_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\root-layout_att_6.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\root-layout_att_6.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\switch_struc_4.txt legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\switch_struc_4.txt
-
-
-
-// MMS Input valid
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\audio_att_1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\audio_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\audio_att_2.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\audio_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\audio_att_3.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\audio_att_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\body_struc_1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\body_struc_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\body_struc_2.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\body_struc_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\body_struc_3.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\body_struc_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\head_struct_4.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\body_struct_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\head_struct_5.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\body_struct_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\head_struc_1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\head_struc_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\head_struc_3.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\head_struc_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\img_att_1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\img_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\img_att_2.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\img_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\img_att_3.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\img_att_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\img_struc_1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\img_struc_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\layout_struc_1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\layout_struc_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\layout_struc_3.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\layout_struc_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\layout_struc_4.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\layout_struc_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\layout_struc_5.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\layout_struc_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\metadata_att1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\metadata_att1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\meta_att_1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\meta_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\meta_att_2.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\meta_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\par_att_1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\par_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\par_att_2.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\par_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\par_prefetch.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\par_prefetch.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\par_struc_1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\par_struc_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\par_struc_2.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\par_struc_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\par_struc_4.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\par_struc_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\prefetch_att1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\prefetch_att1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\prefetch_att2.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\prefetch_att2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\prefetch_att3.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\prefetch_att3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\prefetch_att4.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\prefetch_att4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\ref_att_1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\ref_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\ref_att_2.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\ref_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\ref_att_3.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\ref_att_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\ref_att_4.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\ref_att_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\ref_att_5.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\ref_att_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\ref_att_6.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\ref_att_6.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_att_1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_att_2.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_att_3.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_att_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_att_4.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_att_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_att_5.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_att_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_att_6.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_att_6.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_struc_1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_struc_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\root-layout_att_1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\root-layout_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\root-layout_att_2.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\root-layout_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\smil_struc_1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\smil_struc_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\smil_struc_3.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\smil_struc_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\smil_struc_4.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\smil_struc_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\smil_struc_5.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\smil_struc_5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\text_att_1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\text_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\text_att_2.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\text_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\transition_att_1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\transition_att_1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\transition_att_2.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\transition_att_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\transition_att_3.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\transition_att_3.txt
-
-
-
-// MMS Input invalid
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\body_struc_4.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\body_struc_4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\head_struc_2.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\head_struc_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid_metadata_att1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid_metadata_att1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid_meta_att1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid_meta_att1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid_transition_att2.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid_transition_att2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid_transition_att3.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid_transition_att3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid_transition_att4.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid_transition_att4.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid_transition_att5.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid_transition_att5.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid__prefetch_att1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid__prefetch_att1.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid__prefetch_att2.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid__prefetch_att2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid__prefetch_att3.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid__prefetch_att3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\layout_struc_2.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\layout_struc_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\layout_struc_6.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\layout_struc_6.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\layout_struc_7.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\layout_struc_7.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\par_struc_3.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\par_struc_3.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\region_att_7.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\region_att_7.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\smil_struc_2.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\smil_struc_2.txt
-data=DATAZ_\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\text_struc_1.txt legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\text_struc_1.txt
-
-#endif
--- a/xml/legacyminidomparser/XMLDom/GROUP/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/legacyminidomparser/XMLDom/GROUP/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -25,7 +25,7 @@
../INC/GMXMLCharacterData.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(gmxmlcharacterdata.h)
../INC/GMXMLComment.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(gmxmlcomment.h)
../INC/GMXMLDocument.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(gmxmldocument.h)
- ../INC/GMxmldomconstants.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(gmxmldomconstants.h)
+ ../INC/GMxmldomconstants.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(gmxmldomconstants.h)
../INC/GMXMLDocumentElement.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(gmxmldocumentelement.h)
../INC/GMXMLElement.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(gmxmlelement.h)
../INC/GMXMLNode.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(gmxmlnode.h)
--- a/xml/legacyminidomparser/XMLParser/GROUP/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/legacyminidomparser/XMLParser/GROUP/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -19,354 +19,10 @@
PRJ_EXPORTS
../INC/GMXMLComposer.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(gmxmlcomposer.h)
../INC/GMXMLParser.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(gmxmlparser.h)
- ../INC/GMXMLConstants.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(gmxmlconstants.h)
+ ../INC/GMXMLConstants.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(gmxmlconstants.h)
../INC/GMXMLEntityConverter.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(gmxmlentityconverter.h)
PRJ_MMPFILES
xmlparser.mmp
-PRJ_TESTMMPFILES
- ../test/t_GmxmlParser.mmp
- ../test/t_GmxmlFailure.mmp
- ../test/t_smiltranslatortest.mmp
-
-PRJ_TESTEXPORTS
-../test/GmxmlTest.txt z:/gmxmltest.txt
-
-
-
-
-
-// SMIL Input valid
-../test/SMIL_Test_Files/smil_input/valid/anchor_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/anchor_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/anchor_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/anchor_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/anchor_att_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/anchor_att_3.txt
-../test/SMIL_Test_Files/smil_input/valid/anchor_att_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/anchor_att_4.txt
-../test/SMIL_Test_Files/smil_input/valid/anchor_att_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/anchor_att_5.txt
-../test/SMIL_Test_Files/smil_input/valid/animation_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/animation_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/animation_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/animation_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/animation_att_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/animation_att_3.txt
-../test/SMIL_Test_Files/smil_input/valid/animation_att_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/animation_att_4.txt
-../test/SMIL_Test_Files/smil_input/valid/animation_att_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/animation_att_5.txt
-../test/SMIL_Test_Files/smil_input/valid/area_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/area_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/area_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/area_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/area_att_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/area_att_3.txt
-../test/SMIL_Test_Files/smil_input/valid/area_att_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/area_att_4.txt
-../test/SMIL_Test_Files/smil_input/valid/area_att_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/area_att_5.txt
-../test/SMIL_Test_Files/smil_input/valid/ascii_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/ascii_1.txt
-../test/SMIL_Test_Files/smil_input/valid/att_order_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/att_order_1.txt
-../test/SMIL_Test_Files/smil_input/valid/att_order_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/att_order_2.txt
-../test/SMIL_Test_Files/smil_input/valid/att_var_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/att_var_1.txt
-../test/SMIL_Test_Files/smil_input/valid/audio_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/audio_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/audio_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/audio_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/audio_att_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/audio_att_3.txt
-../test/SMIL_Test_Files/smil_input/valid/audio_att_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/audio_att_4.txt
-../test/SMIL_Test_Files/smil_input/valid/audio_att_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/audio_att_5.txt
-../test/SMIL_Test_Files/smil_input/valid/a_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/a_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/a_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/a_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/a_att_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/a_att_3.txt
-../test/SMIL_Test_Files/smil_input/valid/a_att_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/a_att_4.txt
-../test/SMIL_Test_Files/smil_input/valid/a_att_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/a_att_5.txt
-../test/SMIL_Test_Files/smil_input/valid/a_struc_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/a_struc_1.txt
-../test/SMIL_Test_Files/smil_input/valid/a_struc_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/a_struc_2.txt
-../test/SMIL_Test_Files/smil_input/valid/a_struc_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/a_struc_3.txt
-../test/SMIL_Test_Files/smil_input/valid/a_struc_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/a_struc_4.txt
-../test/SMIL_Test_Files/smil_input/valid/body_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/body_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/body_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/body_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/body_struc_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/body_struc_1.txt
-../test/SMIL_Test_Files/smil_input/valid/body_struc_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/body_struc_2.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_1.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_10.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_10.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_11.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_11.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_12.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_12.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_13.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_13.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_14.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_14.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_15.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_15.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_16.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_16.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_17.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_17.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_18.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_18.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_19.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_19.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_2.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_20.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_20.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_21.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_21.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_22.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_22.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_23.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_23.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_24.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_24.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_25.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_25.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_26.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_26.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_27.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_27.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_28.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_28.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_29.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_29.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_3.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_30.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_30.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_4.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_5.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_6.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_6.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_7.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_7.txt
-../test/SMIL_Test_Files/smil_input/valid/cdata_8.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_8.txt
-../test/SMIL_Test_Files/smil_input/valid/comments_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/comments_1.txt
-../test/SMIL_Test_Files/smil_input/valid/doctype_variation.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/doctype_variation.txt
-../test/SMIL_Test_Files/smil_input/valid/entitiy_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entitiy_1.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_1.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_10.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_10.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_11.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_11.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_12.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_12.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_13.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_13.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_14.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_14.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_15.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_15.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_17.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_17.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_18.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_18.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_19.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_19.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_2.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_20.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_20.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_21.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_21.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_22.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_22.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_24.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_24.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_26.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_26.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_27.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_27.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_3.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_30.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_30.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_31.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_31.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_4.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_5.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_6.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_6.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_7.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_7.txt
-../test/SMIL_Test_Files/smil_input/valid/entity_ref_8.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_8.txt
-../test/SMIL_Test_Files/smil_input/valid/head_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/head_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/head_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/head_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/img_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/img_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/img_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/img_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/img_att_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/img_att_3.txt
-../test/SMIL_Test_Files/smil_input/valid/img_att_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/img_att_4.txt
-../test/SMIL_Test_Files/smil_input/valid/img_att_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/img_att_5.txt
-../test/SMIL_Test_Files/smil_input/valid/inc021337.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/inc021337.txt
-../test/SMIL_Test_Files/smil_input/valid/inc022160.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/inc022160.txt
-../test/SMIL_Test_Files/smil_input/valid/inc025788.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/inc025788.txt
-../test/SMIL_Test_Files/smil_input/valid/layout_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/layout_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/layout_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/layout_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/newline_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/newline_1.txt
-../test/SMIL_Test_Files/smil_input/valid/par_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/par_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/par_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/par_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/par_att_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/par_att_3.txt
-../test/SMIL_Test_Files/smil_input/valid/par_att_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/par_att_4.txt
-../test/SMIL_Test_Files/smil_input/valid/par_att_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/par_att_5.txt
-../test/SMIL_Test_Files/smil_input/valid/ref_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/ref_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/ref_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/ref_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/ref_att_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/ref_att_3.txt
-../test/SMIL_Test_Files/smil_input/valid/ref_att_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/ref_att_4.txt
-../test/SMIL_Test_Files/smil_input/valid/ref_att_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/ref_att_5.txt
-../test/SMIL_Test_Files/smil_input/valid/region_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/region_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/region_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/region_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/region_att_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/region_att_3.txt
-../test/SMIL_Test_Files/smil_input/valid/region_att_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/region_att_4.txt
-../test/SMIL_Test_Files/smil_input/valid/region_att_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/region_att_5.txt
-../test/SMIL_Test_Files/smil_input/valid/region_att_6.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/region_att_6.txt
-../test/SMIL_Test_Files/smil_input/valid/root-layout_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/root-layout_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/root-layout_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/root-layout_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/root-layout_att_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/root-layout_att_3.txt
-../test/SMIL_Test_Files/smil_input/valid/seq_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/seq_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/seq_att_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_att_3.txt
-../test/SMIL_Test_Files/smil_input/valid/seq_att_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_att_4.txt
-../test/SMIL_Test_Files/smil_input/valid/seq_att_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_att_5.txt
-../test/SMIL_Test_Files/smil_input/valid/seq_struc_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_struc_1.txt
-../test/SMIL_Test_Files/smil_input/valid/seq_struc_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_struc_2.txt
-../test/SMIL_Test_Files/smil_input/valid/seq_struc_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_struc_3.txt
-../test/SMIL_Test_Files/smil_input/valid/seq_struc_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_struc_4.txt
-../test/SMIL_Test_Files/smil_input/valid/seq_struc_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_struc_5.txt
-../test/SMIL_Test_Files/smil_input/valid/seq_struc_6.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_struc_6.txt
-../test/SMIL_Test_Files/smil_input/valid/smil_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/smil_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/smil_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/smil_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/switch_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/switch_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/switch_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/switch_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/switch_struc_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/switch_struc_1.txt
-../test/SMIL_Test_Files/smil_input/valid/switch_struc_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/switch_struc_2.txt
-../test/SMIL_Test_Files/smil_input/valid/switch_struc_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/switch_struc_3.txt
-../test/SMIL_Test_Files/smil_input/valid/textstream_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/textstream_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/textstream_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/textstream_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/textstream_att_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/textstream_att_3.txt
-../test/SMIL_Test_Files/smil_input/valid/textstream_att_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/textstream_att_4.txt
-../test/SMIL_Test_Files/smil_input/valid/textstream_att_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/textstream_att_5.txt
-../test/SMIL_Test_Files/smil_input/valid/text_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/text_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/text_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/text_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/text_att_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/text_att_3.txt
-../test/SMIL_Test_Files/smil_input/valid/text_att_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/text_att_4.txt
-../test/SMIL_Test_Files/smil_input/valid/text_att_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/text_att_5.txt
-../test/SMIL_Test_Files/smil_input/valid/utf8.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/utf8.txt
-../test/SMIL_Test_Files/smil_input/valid/video_att_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/video_att_1.txt
-../test/SMIL_Test_Files/smil_input/valid/video_att_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/video_att_2.txt
-../test/SMIL_Test_Files/smil_input/valid/video_att_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/video_att_3.txt
-../test/SMIL_Test_Files/smil_input/valid/video_att_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/video_att_4.txt
-../test/SMIL_Test_Files/smil_input/valid/video_att_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/video_att_5.txt
-../test/SMIL_Test_Files/smil_input/valid/whitespace_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/whitespace_1.txt
-../test/SMIL_Test_Files/smil_input/valid/whitespace_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/whitespace_2.txt
-../test/SMIL_Test_Files/smil_input/valid/xml_version_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/valid/xml_version_1.txt
-
-// SMIL Input invalid
-../test/SMIL_Test_Files/smil_input/invalid/a_att_10.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/a_att_10.txt
-../test/SMIL_Test_Files/smil_input/invalid/a_att_11.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/a_att_11.txt
-../test/SMIL_Test_Files/smil_input/invalid/a_att_6.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/a_att_6.txt
-../test/SMIL_Test_Files/smil_input/invalid/a_att_7.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/a_att_7.txt
-../test/SMIL_Test_Files/smil_input/invalid/a_att_8.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/a_att_8.txt
-../test/SMIL_Test_Files/smil_input/invalid/a_att_9.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/a_att_9.txt
-../test/SMIL_Test_Files/smil_input/invalid/cdata_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/cdata_1.txt
-../test/SMIL_Test_Files/smil_input/invalid/empty.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/empty.txt
-../test/SMIL_Test_Files/smil_input/invalid/entitiy_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/entitiy_2.txt
-../test/SMIL_Test_Files/smil_input/invalid/entity_ref_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/entity_ref_1.txt
-../test/SMIL_Test_Files/smil_input/invalid/entity_ref_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/entity_ref_2.txt
-../test/SMIL_Test_Files/smil_input/invalid/entity_ref_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/entity_ref_3.txt
-../test/SMIL_Test_Files/smil_input/invalid/entity_ref_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/entity_ref_4.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_1.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_10.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_10.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_11.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_11.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_12.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_12.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_13.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_13.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_14.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_14.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_15.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_15.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_16.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_16.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_17.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_17.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_18.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_18.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_19.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_19.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_2.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_20.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_20.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_21.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_21.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_22.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_22.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_23.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_23.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_24.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_24.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_25.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_25.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_3.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_4.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_5.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_6.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_6.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_7.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_7.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_8.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_8.txt
-../test/SMIL_Test_Files/smil_input/invalid/further_invalid_9.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_9.txt
-../test/SMIL_Test_Files/smil_input/invalid/inc021591.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/inc021591.txt
-../test/SMIL_Test_Files/smil_input/invalid/inc021675.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/inc021675.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_1.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_1.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_10.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_10.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_11.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_11.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_12.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_12.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_13.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_13.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_14.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_14.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_15.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_15.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_16.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_16.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_17.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_17.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_18.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_18.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_19.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_19.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_2.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_2.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_20.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_20.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_21.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_21.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_22.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_22.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_23.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_23.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_24.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_24.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_25.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_25.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_26.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_26.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_27.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_27.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_28.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_28.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_29.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_29.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_3.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_3.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_31.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_31.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_32.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_32.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_33.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_33.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_34.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_34.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_35.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_35.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_36.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_36.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_37.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_37.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_38.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_38.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_39.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_39.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_4.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_40.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_40.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_5.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_6.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_6.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_7.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_7.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_8.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_8.txt
-../test/SMIL_Test_Files/smil_input/invalid/invalid_9.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_9.txt
-../test/SMIL_Test_Files/smil_input/invalid/region_att_10.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/region_att_10.txt
-../test/SMIL_Test_Files/smil_input/invalid/region_att_11.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/region_att_11.txt
-../test/SMIL_Test_Files/smil_input/invalid/region_att_7.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/region_att_7.txt
-../test/SMIL_Test_Files/smil_input/invalid/region_att_8.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/region_att_8.txt
-../test/SMIL_Test_Files/smil_input/invalid/region_att_9.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/region_att_9.txt
-../test/SMIL_Test_Files/smil_input/invalid/root-layout_att_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/root-layout_att_4.txt
-../test/SMIL_Test_Files/smil_input/invalid/root-layout_att_5.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/root-layout_att_5.txt
-../test/SMIL_Test_Files/smil_input/invalid/root-layout_att_6.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/root-layout_att_6.txt
-../test/SMIL_Test_Files/smil_input/invalid/switch_struc_4.txt z:/legacyminidomparsertest/smil_test_files/smil_input/invalid/switch_struc_4.txt
-
-// MMS Input valid
-../test/SMIL_Test_Files/mms_input/valid/audio_att_1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/audio_att_1.txt
-../test/SMIL_Test_Files/mms_input/valid/audio_att_2.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/audio_att_2.txt
-../test/SMIL_Test_Files/mms_input/valid/audio_att_3.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/audio_att_3.txt
-../test/SMIL_Test_Files/mms_input/valid/body_struc_1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/body_struc_1.txt
-../test/SMIL_Test_Files/mms_input/valid/body_struc_2.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/body_struc_2.txt
-../test/SMIL_Test_Files/mms_input/valid/body_struc_3.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/body_struc_3.txt
-../test/SMIL_Test_Files/mms_input/valid/head_struct_4.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/head_struct_4.txt
-../test/SMIL_Test_Files/mms_input/valid/head_struct_5.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/head_struct_5.txt
-../test/SMIL_Test_Files/mms_input/valid/head_struc_1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/head_struc_1.txt
-../test/SMIL_Test_Files/mms_input/valid/head_struc_3.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/head_struc_3.txt
-../test/SMIL_Test_Files/mms_input/valid/img_att_1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/img_att_1.txt
-../test/SMIL_Test_Files/mms_input/valid/img_att_2.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/img_att_2.txt
-../test/SMIL_Test_Files/mms_input/valid/img_att_3.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/img_att_3.txt
-../test/SMIL_Test_Files/mms_input/valid/img_struc_1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/img_struc_1.txt
-../test/SMIL_Test_Files/mms_input/valid/layout_struc_1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/layout_struc_1.txt
-../test/SMIL_Test_Files/mms_input/valid/layout_struc_3.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/layout_struc_3.txt
-../test/SMIL_Test_Files/mms_input/valid/layout_struc_4.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/layout_struc_4.txt
-../test/SMIL_Test_Files/mms_input/valid/layout_struc_5.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/layout_struc_5.txt
-../test/SMIL_Test_Files/mms_input/valid/metadata_att1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/metadata_att1.txt
-../test/SMIL_Test_Files/mms_input/valid/meta_att_1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/meta_att_1.txt
-../test/SMIL_Test_Files/mms_input/valid/meta_att_2.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/meta_att_2.txt
-../test/SMIL_Test_Files/mms_input/valid/par_att_1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/par_att_1.txt
-../test/SMIL_Test_Files/mms_input/valid/par_att_2.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/par_att_2.txt
-../test/SMIL_Test_Files/mms_input/valid/par_prefetch.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/par_prefetch.txt
-../test/SMIL_Test_Files/mms_input/valid/par_struc_1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/par_struc_1.txt
-../test/SMIL_Test_Files/mms_input/valid/par_struc_2.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/par_struc_2.txt
-../test/SMIL_Test_Files/mms_input/valid/par_struc_4.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/par_struc_4.txt
-../test/SMIL_Test_Files/mms_input/valid/prefetch_att1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/prefetch_att1.txt
-../test/SMIL_Test_Files/mms_input/valid/prefetch_att2.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/prefetch_att2.txt
-../test/SMIL_Test_Files/mms_input/valid/prefetch_att3.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/prefetch_att3.txt
-../test/SMIL_Test_Files/mms_input/valid/prefetch_att4.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/prefetch_att4.txt
-../test/SMIL_Test_Files/mms_input/valid/ref_att_1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/ref_att_1.txt
-../test/SMIL_Test_Files/mms_input/valid/ref_att_2.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/ref_att_2.txt
-../test/SMIL_Test_Files/mms_input/valid/ref_att_3.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/ref_att_3.txt
-../test/SMIL_Test_Files/mms_input/valid/ref_att_4.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/ref_att_4.txt
-../test/SMIL_Test_Files/mms_input/valid/ref_att_5.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/ref_att_5.txt
-../test/SMIL_Test_Files/mms_input/valid/ref_att_6.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/ref_att_6.txt
-../test/SMIL_Test_Files/mms_input/valid/region_att_1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/region_att_1.txt
-../test/SMIL_Test_Files/mms_input/valid/region_att_2.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/region_att_2.txt
-../test/SMIL_Test_Files/mms_input/valid/region_att_3.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/region_att_3.txt
-../test/SMIL_Test_Files/mms_input/valid/region_att_4.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/region_att_4.txt
-../test/SMIL_Test_Files/mms_input/valid/region_att_5.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/region_att_5.txt
-../test/SMIL_Test_Files/mms_input/valid/region_att_6.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/region_att_6.txt
-../test/SMIL_Test_Files/mms_input/valid/region_struc_1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/region_struc_1.txt
-../test/SMIL_Test_Files/mms_input/valid/root-layout_att_1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/root-layout_att_1.txt
-../test/SMIL_Test_Files/mms_input/valid/root-layout_att_2.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/root-layout_att_2.txt
-../test/SMIL_Test_Files/mms_input/valid/smil_struc_1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/smil_struc_1.txt
-../test/SMIL_Test_Files/mms_input/valid/smil_struc_3.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/smil_struc_3.txt
-../test/SMIL_Test_Files/mms_input/valid/smil_struc_4.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/smil_struc_4.txt
-../test/SMIL_Test_Files/mms_input/valid/smil_struc_5.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/smil_struc_5.txt
-../test/SMIL_Test_Files/mms_input/valid/text_att_1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/text_att_1.txt
-../test/SMIL_Test_Files/mms_input/valid/text_att_2.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/text_att_2.txt
-../test/SMIL_Test_Files/mms_input/valid/transition_att_1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/transition_att_1.txt
-../test/SMIL_Test_Files/mms_input/valid/transition_att_2.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/transition_att_2.txt
-../test/SMIL_Test_Files/mms_input/valid/transition_att_3.txt z:/legacyminidomparsertest/smil_test_files/mms_input/valid/transition_att_3.txt
-
-// MMS Input invalid
-../test/SMIL_Test_Files/mms_input/invalid/body_struc_4.txt z:/legacyminidomparsertest/smil_test_files/mms_input/invalid/body_struc_4.txt
-../test/SMIL_Test_Files/mms_input/invalid/head_struc_2.txt z:/legacyminidomparsertest/smil_test_files/mms_input/invalid/head_struc_2.txt
-../test/SMIL_Test_Files/mms_input/invalid/invalid_metadata_att1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/invalid/invalid_metadata_att1.txt
-../test/SMIL_Test_Files/mms_input/invalid/invalid_meta_att1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/invalid/invalid_meta_att1.txt
-../test/SMIL_Test_Files/mms_input/invalid/invalid_transition_att2.txt z:/legacyminidomparsertest/smil_test_files/mms_input/invalid/invalid_transition_att2.txt
-../test/SMIL_Test_Files/mms_input/invalid/invalid_transition_att3.txt z:/legacyminidomparsertest/smil_test_files/mms_input/invalid/invalid_transition_att3.txt
-../test/SMIL_Test_Files/mms_input/invalid/invalid_transition_att4.txt z:/legacyminidomparsertest/smil_test_files/mms_input/invalid/invalid_transition_att4.txt
-../test/SMIL_Test_Files/mms_input/invalid/invalid_transition_att5.txt z:/legacyminidomparsertest/smil_test_files/mms_input/invalid/invalid_transition_att5.txt
-../test/SMIL_Test_Files/mms_input/invalid/invalid__prefetch_att1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/invalid/invalid__prefetch_att1.txt
-../test/SMIL_Test_Files/mms_input/invalid/invalid__prefetch_att2.txt z:/legacyminidomparsertest/smil_test_files/mms_input/invalid/invalid__prefetch_att2.txt
-../test/SMIL_Test_Files/mms_input/invalid/invalid__prefetch_att3.txt z:/legacyminidomparsertest/smil_test_files/mms_input/invalid/invalid__prefetch_att3.txt
-../test/SMIL_Test_Files/mms_input/invalid/layout_struc_2.txt z:/legacyminidomparsertest/smil_test_files/mms_input/invalid/layout_struc_2.txt
-../test/SMIL_Test_Files/mms_input/invalid/layout_struc_6.txt z:/legacyminidomparsertest/smil_test_files/mms_input/invalid/layout_struc_6.txt
-../test/SMIL_Test_Files/mms_input/invalid/layout_struc_7.txt z:/legacyminidomparsertest/smil_test_files/mms_input/invalid/layout_struc_7.txt
-../test/SMIL_Test_Files/mms_input/invalid/par_struc_3.txt z:/legacyminidomparsertest/smil_test_files/mms_input/invalid/par_struc_3.txt
-../test/SMIL_Test_Files/mms_input/invalid/region_att_7.txt z:/legacyminidomparsertest/smil_test_files/mms_input/invalid/region_att_7.txt
-../test/SMIL_Test_Files/mms_input/invalid/smil_struc_2.txt z:/legacyminidomparsertest/smil_test_files/mms_input/invalid/smil_struc_2.txt
-../test/SMIL_Test_Files/mms_input/invalid/text_struc_1.txt z:/legacyminidomparsertest/smil_test_files/mms_input/invalid/text_struc_1.txt
-
-
+#include "../test/group/bld.inf"
\ No newline at end of file
--- a/xml/legacyminidomparser/XMLParser/SRC/GMXMLFileDataSource.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/legacyminidomparser/XMLParser/SRC/GMXMLFileDataSource.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -89,7 +89,7 @@
User::LeaveIfError(iXMLFile.Size(fileSize));
// make buffer
- iXMLFileBuffer = HBufC8::NewLC(fileSize);
+ iXMLFileBuffer = HBufC8::NewL(fileSize);
TPtr8 tmpbuffer(iXMLFileBuffer->Des());
// read file into buffer
@@ -98,7 +98,6 @@
iXMLFile.Close();
- CleanupStack::Pop(); // memory buffer
}
void CMDXMLParserFileDataSource::GetData(TPtrC8 &aPtr, TRequestStatus &aStatus)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/legacyminidomparser/XMLParser/test/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,361 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+PRJ_PLATFORMS
+ DEFAULT
+
+PRJ_TESTMMPFILES
+ t_GmxmlParser.mmp
+ t_GmxmlFailure.mmp
+ t_smiltranslatortest.mmp
+
+PRJ_TESTEXPORTS
+../GmxmlTest.txt c:/gmxmltest.txt
+legacyminidomparsertest.iby /epoc32/rom/include/legacyminidomparsertest.iby
+
+
+// SMIL Input valid
+../SMIL_Test_Files/smil_input/valid/anchor_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/anchor_att_1.txt
+../SMIL_Test_Files/smil_input/valid/anchor_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/anchor_att_2.txt
+../SMIL_Test_Files/smil_input/valid/anchor_att_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/anchor_att_3.txt
+../SMIL_Test_Files/smil_input/valid/anchor_att_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/anchor_att_4.txt
+../SMIL_Test_Files/smil_input/valid/anchor_att_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/anchor_att_5.txt
+../SMIL_Test_Files/smil_input/valid/animation_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/animation_att_1.txt
+../SMIL_Test_Files/smil_input/valid/animation_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/animation_att_2.txt
+../SMIL_Test_Files/smil_input/valid/animation_att_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/animation_att_3.txt
+../SMIL_Test_Files/smil_input/valid/animation_att_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/animation_att_4.txt
+../SMIL_Test_Files/smil_input/valid/animation_att_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/animation_att_5.txt
+../SMIL_Test_Files/smil_input/valid/area_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/area_att_1.txt
+../SMIL_Test_Files/smil_input/valid/area_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/area_att_2.txt
+../SMIL_Test_Files/smil_input/valid/area_att_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/area_att_3.txt
+../SMIL_Test_Files/smil_input/valid/area_att_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/area_att_4.txt
+../SMIL_Test_Files/smil_input/valid/area_att_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/area_att_5.txt
+../SMIL_Test_Files/smil_input/valid/ascii_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/ascii_1.txt
+../SMIL_Test_Files/smil_input/valid/att_order_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/att_order_1.txt
+../SMIL_Test_Files/smil_input/valid/att_order_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/att_order_2.txt
+../SMIL_Test_Files/smil_input/valid/att_var_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/att_var_1.txt
+../SMIL_Test_Files/smil_input/valid/audio_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/audio_att_1.txt
+../SMIL_Test_Files/smil_input/valid/audio_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/audio_att_2.txt
+../SMIL_Test_Files/smil_input/valid/audio_att_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/audio_att_3.txt
+../SMIL_Test_Files/smil_input/valid/audio_att_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/audio_att_4.txt
+../SMIL_Test_Files/smil_input/valid/audio_att_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/audio_att_5.txt
+../SMIL_Test_Files/smil_input/valid/a_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/a_att_1.txt
+../SMIL_Test_Files/smil_input/valid/a_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/a_att_2.txt
+../SMIL_Test_Files/smil_input/valid/a_att_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/a_att_3.txt
+../SMIL_Test_Files/smil_input/valid/a_att_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/a_att_4.txt
+../SMIL_Test_Files/smil_input/valid/a_att_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/a_att_5.txt
+../SMIL_Test_Files/smil_input/valid/a_struc_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/a_struc_1.txt
+../SMIL_Test_Files/smil_input/valid/a_struc_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/a_struc_2.txt
+../SMIL_Test_Files/smil_input/valid/a_struc_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/a_struc_3.txt
+../SMIL_Test_Files/smil_input/valid/a_struc_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/a_struc_4.txt
+../SMIL_Test_Files/smil_input/valid/body_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/body_att_1.txt
+../SMIL_Test_Files/smil_input/valid/body_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/body_att_2.txt
+../SMIL_Test_Files/smil_input/valid/body_struc_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/body_struc_1.txt
+../SMIL_Test_Files/smil_input/valid/body_struc_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/body_struc_2.txt
+../SMIL_Test_Files/smil_input/valid/cdata_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_1.txt
+../SMIL_Test_Files/smil_input/valid/cdata_10.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_10.txt
+../SMIL_Test_Files/smil_input/valid/cdata_11.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_11.txt
+../SMIL_Test_Files/smil_input/valid/cdata_12.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_12.txt
+../SMIL_Test_Files/smil_input/valid/cdata_13.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_13.txt
+../SMIL_Test_Files/smil_input/valid/cdata_14.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_14.txt
+../SMIL_Test_Files/smil_input/valid/cdata_15.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_15.txt
+../SMIL_Test_Files/smil_input/valid/cdata_16.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_16.txt
+../SMIL_Test_Files/smil_input/valid/cdata_17.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_17.txt
+../SMIL_Test_Files/smil_input/valid/cdata_18.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_18.txt
+../SMIL_Test_Files/smil_input/valid/cdata_19.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_19.txt
+../SMIL_Test_Files/smil_input/valid/cdata_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_2.txt
+../SMIL_Test_Files/smil_input/valid/cdata_20.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_20.txt
+../SMIL_Test_Files/smil_input/valid/cdata_21.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_21.txt
+../SMIL_Test_Files/smil_input/valid/cdata_22.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_22.txt
+../SMIL_Test_Files/smil_input/valid/cdata_23.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_23.txt
+../SMIL_Test_Files/smil_input/valid/cdata_24.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_24.txt
+../SMIL_Test_Files/smil_input/valid/cdata_25.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_25.txt
+../SMIL_Test_Files/smil_input/valid/cdata_26.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_26.txt
+../SMIL_Test_Files/smil_input/valid/cdata_27.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_27.txt
+../SMIL_Test_Files/smil_input/valid/cdata_28.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_28.txt
+../SMIL_Test_Files/smil_input/valid/cdata_29.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_29.txt
+../SMIL_Test_Files/smil_input/valid/cdata_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_3.txt
+../SMIL_Test_Files/smil_input/valid/cdata_30.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_30.txt
+../SMIL_Test_Files/smil_input/valid/cdata_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_4.txt
+../SMIL_Test_Files/smil_input/valid/cdata_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_5.txt
+../SMIL_Test_Files/smil_input/valid/cdata_6.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_6.txt
+../SMIL_Test_Files/smil_input/valid/cdata_7.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_7.txt
+../SMIL_Test_Files/smil_input/valid/cdata_8.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/cdata_8.txt
+../SMIL_Test_Files/smil_input/valid/comments_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/comments_1.txt
+../SMIL_Test_Files/smil_input/valid/doctype_variation.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/doctype_variation.txt
+../SMIL_Test_Files/smil_input/valid/entitiy_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entitiy_1.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_1.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_10.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_10.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_11.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_11.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_12.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_12.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_13.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_13.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_14.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_14.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_15.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_15.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_17.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_17.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_18.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_18.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_19.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_19.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_2.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_20.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_20.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_21.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_21.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_22.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_22.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_24.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_24.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_26.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_26.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_27.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_27.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_3.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_30.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_30.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_31.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_31.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_4.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_5.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_6.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_6.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_7.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_7.txt
+../SMIL_Test_Files/smil_input/valid/entity_ref_8.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/entity_ref_8.txt
+../SMIL_Test_Files/smil_input/valid/head_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/head_att_1.txt
+../SMIL_Test_Files/smil_input/valid/head_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/head_att_2.txt
+../SMIL_Test_Files/smil_input/valid/img_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/img_att_1.txt
+../SMIL_Test_Files/smil_input/valid/img_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/img_att_2.txt
+../SMIL_Test_Files/smil_input/valid/img_att_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/img_att_3.txt
+../SMIL_Test_Files/smil_input/valid/img_att_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/img_att_4.txt
+../SMIL_Test_Files/smil_input/valid/img_att_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/img_att_5.txt
+../SMIL_Test_Files/smil_input/valid/inc021337.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/inc021337.txt
+../SMIL_Test_Files/smil_input/valid/inc022160.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/inc022160.txt
+../SMIL_Test_Files/smil_input/valid/inc025788.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/inc025788.txt
+../SMIL_Test_Files/smil_input/valid/layout_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/layout_att_1.txt
+../SMIL_Test_Files/smil_input/valid/layout_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/layout_att_2.txt
+../SMIL_Test_Files/smil_input/valid/newline_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/newline_1.txt
+../SMIL_Test_Files/smil_input/valid/par_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/par_att_1.txt
+../SMIL_Test_Files/smil_input/valid/par_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/par_att_2.txt
+../SMIL_Test_Files/smil_input/valid/par_att_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/par_att_3.txt
+../SMIL_Test_Files/smil_input/valid/par_att_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/par_att_4.txt
+../SMIL_Test_Files/smil_input/valid/par_att_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/par_att_5.txt
+../SMIL_Test_Files/smil_input/valid/ref_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/ref_att_1.txt
+../SMIL_Test_Files/smil_input/valid/ref_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/ref_att_2.txt
+../SMIL_Test_Files/smil_input/valid/ref_att_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/ref_att_3.txt
+../SMIL_Test_Files/smil_input/valid/ref_att_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/ref_att_4.txt
+../SMIL_Test_Files/smil_input/valid/ref_att_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/ref_att_5.txt
+../SMIL_Test_Files/smil_input/valid/region_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/region_att_1.txt
+../SMIL_Test_Files/smil_input/valid/region_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/region_att_2.txt
+../SMIL_Test_Files/smil_input/valid/region_att_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/region_att_3.txt
+../SMIL_Test_Files/smil_input/valid/region_att_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/region_att_4.txt
+../SMIL_Test_Files/smil_input/valid/region_att_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/region_att_5.txt
+../SMIL_Test_Files/smil_input/valid/region_att_6.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/region_att_6.txt
+../SMIL_Test_Files/smil_input/valid/root-layout_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/root-layout_att_1.txt
+../SMIL_Test_Files/smil_input/valid/root-layout_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/root-layout_att_2.txt
+../SMIL_Test_Files/smil_input/valid/root-layout_att_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/root-layout_att_3.txt
+../SMIL_Test_Files/smil_input/valid/seq_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_att_1.txt
+../SMIL_Test_Files/smil_input/valid/seq_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_att_2.txt
+../SMIL_Test_Files/smil_input/valid/seq_att_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_att_3.txt
+../SMIL_Test_Files/smil_input/valid/seq_att_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_att_4.txt
+../SMIL_Test_Files/smil_input/valid/seq_att_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_att_5.txt
+../SMIL_Test_Files/smil_input/valid/seq_struc_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_struc_1.txt
+../SMIL_Test_Files/smil_input/valid/seq_struc_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_struc_2.txt
+../SMIL_Test_Files/smil_input/valid/seq_struc_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_struc_3.txt
+../SMIL_Test_Files/smil_input/valid/seq_struc_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_struc_4.txt
+../SMIL_Test_Files/smil_input/valid/seq_struc_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_struc_5.txt
+../SMIL_Test_Files/smil_input/valid/seq_struc_6.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/seq_struc_6.txt
+../SMIL_Test_Files/smil_input/valid/smil_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/smil_att_1.txt
+../SMIL_Test_Files/smil_input/valid/smil_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/smil_att_2.txt
+../SMIL_Test_Files/smil_input/valid/switch_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/switch_att_1.txt
+../SMIL_Test_Files/smil_input/valid/switch_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/switch_att_2.txt
+../SMIL_Test_Files/smil_input/valid/switch_struc_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/switch_struc_1.txt
+../SMIL_Test_Files/smil_input/valid/switch_struc_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/switch_struc_2.txt
+../SMIL_Test_Files/smil_input/valid/switch_struc_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/switch_struc_3.txt
+../SMIL_Test_Files/smil_input/valid/textstream_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/textstream_att_1.txt
+../SMIL_Test_Files/smil_input/valid/textstream_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/textstream_att_2.txt
+../SMIL_Test_Files/smil_input/valid/textstream_att_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/textstream_att_3.txt
+../SMIL_Test_Files/smil_input/valid/textstream_att_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/textstream_att_4.txt
+../SMIL_Test_Files/smil_input/valid/textstream_att_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/textstream_att_5.txt
+../SMIL_Test_Files/smil_input/valid/text_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/text_att_1.txt
+../SMIL_Test_Files/smil_input/valid/text_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/text_att_2.txt
+../SMIL_Test_Files/smil_input/valid/text_att_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/text_att_3.txt
+../SMIL_Test_Files/smil_input/valid/text_att_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/text_att_4.txt
+../SMIL_Test_Files/smil_input/valid/text_att_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/text_att_5.txt
+../SMIL_Test_Files/smil_input/valid/utf8.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/utf8.txt
+../SMIL_Test_Files/smil_input/valid/video_att_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/video_att_1.txt
+../SMIL_Test_Files/smil_input/valid/video_att_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/video_att_2.txt
+../SMIL_Test_Files/smil_input/valid/video_att_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/video_att_3.txt
+../SMIL_Test_Files/smil_input/valid/video_att_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/video_att_4.txt
+../SMIL_Test_Files/smil_input/valid/video_att_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/video_att_5.txt
+../SMIL_Test_Files/smil_input/valid/whitespace_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/whitespace_1.txt
+../SMIL_Test_Files/smil_input/valid/whitespace_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/whitespace_2.txt
+../SMIL_Test_Files/smil_input/valid/xml_version_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/valid/xml_version_1.txt
+
+// SMIL Input invalid
+../SMIL_Test_Files/smil_input/invalid/a_att_10.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/a_att_10.txt
+../SMIL_Test_Files/smil_input/invalid/a_att_11.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/a_att_11.txt
+../SMIL_Test_Files/smil_input/invalid/a_att_6.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/a_att_6.txt
+../SMIL_Test_Files/smil_input/invalid/a_att_7.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/a_att_7.txt
+../SMIL_Test_Files/smil_input/invalid/a_att_8.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/a_att_8.txt
+../SMIL_Test_Files/smil_input/invalid/a_att_9.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/a_att_9.txt
+../SMIL_Test_Files/smil_input/invalid/cdata_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/cdata_1.txt
+../SMIL_Test_Files/smil_input/invalid/empty.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/empty.txt
+../SMIL_Test_Files/smil_input/invalid/entitiy_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/entitiy_2.txt
+../SMIL_Test_Files/smil_input/invalid/entity_ref_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/entity_ref_1.txt
+../SMIL_Test_Files/smil_input/invalid/entity_ref_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/entity_ref_2.txt
+../SMIL_Test_Files/smil_input/invalid/entity_ref_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/entity_ref_3.txt
+../SMIL_Test_Files/smil_input/invalid/entity_ref_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/entity_ref_4.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_1.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_10.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_10.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_11.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_11.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_12.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_12.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_13.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_13.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_14.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_14.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_15.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_15.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_16.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_16.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_17.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_17.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_18.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_18.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_19.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_19.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_2.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_20.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_20.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_21.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_21.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_22.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_22.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_23.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_23.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_24.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_24.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_25.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_25.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_3.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_4.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_5.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_6.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_6.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_7.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_7.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_8.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_8.txt
+../SMIL_Test_Files/smil_input/invalid/further_invalid_9.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/further_invalid_9.txt
+../SMIL_Test_Files/smil_input/invalid/inc021591.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/inc021591.txt
+../SMIL_Test_Files/smil_input/invalid/inc021675.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/inc021675.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_1.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_1.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_10.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_10.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_11.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_11.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_12.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_12.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_13.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_13.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_14.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_14.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_15.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_15.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_16.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_16.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_17.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_17.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_18.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_18.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_19.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_19.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_2.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_2.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_20.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_20.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_21.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_21.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_22.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_22.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_23.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_23.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_24.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_24.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_25.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_25.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_26.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_26.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_27.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_27.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_28.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_28.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_29.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_29.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_3.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_3.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_31.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_31.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_32.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_32.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_33.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_33.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_34.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_34.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_35.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_35.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_36.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_36.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_37.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_37.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_38.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_38.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_39.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_39.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_4.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_40.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_40.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_5.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_6.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_6.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_7.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_7.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_8.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_8.txt
+../SMIL_Test_Files/smil_input/invalid/invalid_9.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/invalid_9.txt
+../SMIL_Test_Files/smil_input/invalid/region_att_10.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/region_att_10.txt
+../SMIL_Test_Files/smil_input/invalid/region_att_11.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/region_att_11.txt
+../SMIL_Test_Files/smil_input/invalid/region_att_7.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/region_att_7.txt
+../SMIL_Test_Files/smil_input/invalid/region_att_8.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/region_att_8.txt
+../SMIL_Test_Files/smil_input/invalid/region_att_9.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/region_att_9.txt
+../SMIL_Test_Files/smil_input/invalid/root-layout_att_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/root-layout_att_4.txt
+../SMIL_Test_Files/smil_input/invalid/root-layout_att_5.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/root-layout_att_5.txt
+../SMIL_Test_Files/smil_input/invalid/root-layout_att_6.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/root-layout_att_6.txt
+../SMIL_Test_Files/smil_input/invalid/switch_struc_4.txt c:/legacyminidomparsertest/smil_test_files/smil_input/invalid/switch_struc_4.txt
+
+// MMS Input valid
+../SMIL_Test_Files/mms_input/valid/audio_att_1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/audio_att_1.txt
+../SMIL_Test_Files/mms_input/valid/audio_att_2.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/audio_att_2.txt
+../SMIL_Test_Files/mms_input/valid/audio_att_3.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/audio_att_3.txt
+../SMIL_Test_Files/mms_input/valid/body_struc_1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/body_struc_1.txt
+../SMIL_Test_Files/mms_input/valid/body_struc_2.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/body_struc_2.txt
+../SMIL_Test_Files/mms_input/valid/body_struc_3.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/body_struc_3.txt
+../SMIL_Test_Files/mms_input/valid/head_struct_4.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/head_struct_4.txt
+../SMIL_Test_Files/mms_input/valid/head_struct_5.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/head_struct_5.txt
+../SMIL_Test_Files/mms_input/valid/head_struc_1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/head_struc_1.txt
+../SMIL_Test_Files/mms_input/valid/head_struc_3.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/head_struc_3.txt
+../SMIL_Test_Files/mms_input/valid/img_att_1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/img_att_1.txt
+../SMIL_Test_Files/mms_input/valid/img_att_2.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/img_att_2.txt
+../SMIL_Test_Files/mms_input/valid/img_att_3.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/img_att_3.txt
+../SMIL_Test_Files/mms_input/valid/img_struc_1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/img_struc_1.txt
+../SMIL_Test_Files/mms_input/valid/layout_struc_1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/layout_struc_1.txt
+../SMIL_Test_Files/mms_input/valid/layout_struc_3.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/layout_struc_3.txt
+../SMIL_Test_Files/mms_input/valid/layout_struc_4.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/layout_struc_4.txt
+../SMIL_Test_Files/mms_input/valid/layout_struc_5.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/layout_struc_5.txt
+../SMIL_Test_Files/mms_input/valid/metadata_att1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/metadata_att1.txt
+../SMIL_Test_Files/mms_input/valid/meta_att_1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/meta_att_1.txt
+../SMIL_Test_Files/mms_input/valid/meta_att_2.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/meta_att_2.txt
+../SMIL_Test_Files/mms_input/valid/par_att_1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/par_att_1.txt
+../SMIL_Test_Files/mms_input/valid/par_att_2.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/par_att_2.txt
+../SMIL_Test_Files/mms_input/valid/par_prefetch.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/par_prefetch.txt
+../SMIL_Test_Files/mms_input/valid/par_struc_1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/par_struc_1.txt
+../SMIL_Test_Files/mms_input/valid/par_struc_2.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/par_struc_2.txt
+../SMIL_Test_Files/mms_input/valid/par_struc_4.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/par_struc_4.txt
+../SMIL_Test_Files/mms_input/valid/prefetch_att1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/prefetch_att1.txt
+../SMIL_Test_Files/mms_input/valid/prefetch_att2.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/prefetch_att2.txt
+../SMIL_Test_Files/mms_input/valid/prefetch_att3.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/prefetch_att3.txt
+../SMIL_Test_Files/mms_input/valid/prefetch_att4.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/prefetch_att4.txt
+../SMIL_Test_Files/mms_input/valid/ref_att_1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/ref_att_1.txt
+../SMIL_Test_Files/mms_input/valid/ref_att_2.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/ref_att_2.txt
+../SMIL_Test_Files/mms_input/valid/ref_att_3.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/ref_att_3.txt
+../SMIL_Test_Files/mms_input/valid/ref_att_4.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/ref_att_4.txt
+../SMIL_Test_Files/mms_input/valid/ref_att_5.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/ref_att_5.txt
+../SMIL_Test_Files/mms_input/valid/ref_att_6.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/ref_att_6.txt
+../SMIL_Test_Files/mms_input/valid/region_att_1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/region_att_1.txt
+../SMIL_Test_Files/mms_input/valid/region_att_2.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/region_att_2.txt
+../SMIL_Test_Files/mms_input/valid/region_att_3.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/region_att_3.txt
+../SMIL_Test_Files/mms_input/valid/region_att_4.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/region_att_4.txt
+../SMIL_Test_Files/mms_input/valid/region_att_5.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/region_att_5.txt
+../SMIL_Test_Files/mms_input/valid/region_att_6.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/region_att_6.txt
+../SMIL_Test_Files/mms_input/valid/region_struc_1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/region_struc_1.txt
+../SMIL_Test_Files/mms_input/valid/root-layout_att_1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/root-layout_att_1.txt
+../SMIL_Test_Files/mms_input/valid/root-layout_att_2.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/root-layout_att_2.txt
+../SMIL_Test_Files/mms_input/valid/smil_struc_1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/smil_struc_1.txt
+../SMIL_Test_Files/mms_input/valid/smil_struc_3.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/smil_struc_3.txt
+../SMIL_Test_Files/mms_input/valid/smil_struc_4.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/smil_struc_4.txt
+../SMIL_Test_Files/mms_input/valid/smil_struc_5.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/smil_struc_5.txt
+../SMIL_Test_Files/mms_input/valid/text_att_1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/text_att_1.txt
+../SMIL_Test_Files/mms_input/valid/text_att_2.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/text_att_2.txt
+../SMIL_Test_Files/mms_input/valid/transition_att_1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/transition_att_1.txt
+../SMIL_Test_Files/mms_input/valid/transition_att_2.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/transition_att_2.txt
+../SMIL_Test_Files/mms_input/valid/transition_att_3.txt c:/legacyminidomparsertest/smil_test_files/mms_input/valid/transition_att_3.txt
+
+// MMS Input invalid
+../SMIL_Test_Files/mms_input/invalid/body_struc_4.txt c:/legacyminidomparsertest/smil_test_files/mms_input/invalid/body_struc_4.txt
+../SMIL_Test_Files/mms_input/invalid/head_struc_2.txt c:/legacyminidomparsertest/smil_test_files/mms_input/invalid/head_struc_2.txt
+../SMIL_Test_Files/mms_input/invalid/invalid_metadata_att1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/invalid/invalid_metadata_att1.txt
+../SMIL_Test_Files/mms_input/invalid/invalid_meta_att1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/invalid/invalid_meta_att1.txt
+../SMIL_Test_Files/mms_input/invalid/invalid_transition_att2.txt c:/legacyminidomparsertest/smil_test_files/mms_input/invalid/invalid_transition_att2.txt
+../SMIL_Test_Files/mms_input/invalid/invalid_transition_att3.txt c:/legacyminidomparsertest/smil_test_files/mms_input/invalid/invalid_transition_att3.txt
+../SMIL_Test_Files/mms_input/invalid/invalid_transition_att4.txt c:/legacyminidomparsertest/smil_test_files/mms_input/invalid/invalid_transition_att4.txt
+../SMIL_Test_Files/mms_input/invalid/invalid_transition_att5.txt c:/legacyminidomparsertest/smil_test_files/mms_input/invalid/invalid_transition_att5.txt
+../SMIL_Test_Files/mms_input/invalid/invalid__prefetch_att1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/invalid/invalid__prefetch_att1.txt
+../SMIL_Test_Files/mms_input/invalid/invalid__prefetch_att2.txt c:/legacyminidomparsertest/smil_test_files/mms_input/invalid/invalid__prefetch_att2.txt
+../SMIL_Test_Files/mms_input/invalid/invalid__prefetch_att3.txt c:/legacyminidomparsertest/smil_test_files/mms_input/invalid/invalid__prefetch_att3.txt
+../SMIL_Test_Files/mms_input/invalid/layout_struc_2.txt c:/legacyminidomparsertest/smil_test_files/mms_input/invalid/layout_struc_2.txt
+../SMIL_Test_Files/mms_input/invalid/layout_struc_6.txt c:/legacyminidomparsertest/smil_test_files/mms_input/invalid/layout_struc_6.txt
+../SMIL_Test_Files/mms_input/invalid/layout_struc_7.txt c:/legacyminidomparsertest/smil_test_files/mms_input/invalid/layout_struc_7.txt
+../SMIL_Test_Files/mms_input/invalid/par_struc_3.txt c:/legacyminidomparsertest/smil_test_files/mms_input/invalid/par_struc_3.txt
+../SMIL_Test_Files/mms_input/invalid/region_att_7.txt c:/legacyminidomparsertest/smil_test_files/mms_input/invalid/region_att_7.txt
+../SMIL_Test_Files/mms_input/invalid/smil_struc_2.txt c:/legacyminidomparsertest/smil_test_files/mms_input/invalid/smil_struc_2.txt
+../SMIL_Test_Files/mms_input/invalid/text_struc_1.txt c:/legacyminidomparsertest/smil_test_files/mms_input/invalid/text_struc_1.txt
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/legacyminidomparser/XMLParser/test/group/legacyminidomparsertest.iby Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __LEGACYMINIDOMPARSERTEST_IBY__
+#define __LEGACYMINIDOMPARSERTEST_IBY__
+
+#include <legacyminidomparser.iby>
+
+file=ABI_DIR\BUILD_DIR\t_gmxmlparser.exe sys\bin\t_gmxmlparser.exe
+file=ABI_DIR\BUILD_DIR\t_gmxmlfailure.exe sys\bin\t_gmxmlfailure.exe
+
+file=ABI_DIR\BUILD_DIR\t_smiltranslatortest.exe sys\bin\t_smiltranslatortest.exe
+
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/legacyminidomparser/XMLParser/test/group/legacyminidomparsertest.pkg Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,368 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;Legacyminidomparsertest.pkg
+
+; Languages -
+&EN
+
+; Installation header
+#{"Legacyminidomparsertest"}, (0x20032626), 1, 0, 0, TYPE=SA
+%{"Nokia Corporation"}
+:"Nokia Corporation"
+
+(0x101f7961),0, 0, 0 ,{"Series60ProductID"}
+; Install files
+;Test exes
+"\epoc32\release\armv5\urel\t_gmxmlparser.exe" - "c:\sys\bin\t_gmxmlparser.exe"
+"\epoc32\release\armv5\urel\t_gmxmlfailure.exe" - "c:\sys\bin\t_gmxmlfailure.exe"
+"\epoc32\release\armv5\urel\t_smiltranslatortest.exe" - "c:\sys\bin\t_smiltranslatortest.exe"
+
+"..\gmxmltest.txt" - "c:\gmxmltest.txt"
+
+;SMIL Input Valid
+"..\SMIL_Test_Files\smil_input\valid\anchor_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\anchor_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\anchor_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\anchor_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\anchor_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\anchor_att_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\anchor_att_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\anchor_att_4.txt"
+"..\SMIL_Test_Files\smil_input\valid\anchor_att_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\anchor_att_5.txt"
+"..\SMIL_Test_Files\smil_input\valid\animation_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\animation_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\animation_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\animation_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\animation_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\animation_att_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\animation_att_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\animation_att_4.txt"
+"..\SMIL_Test_Files\smil_input\valid\animation_att_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\animation_att_5.txt"
+"..\SMIL_Test_Files\smil_input\valid\area_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\area_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\area_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\area_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\area_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\area_att_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\area_att_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\area_att_4.txt"
+"..\SMIL_Test_Files\smil_input\valid\area_att_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\area_att_5.txt"
+"..\SMIL_Test_Files\smil_input\valid\ascii_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\ascii_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\att_order_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\att_order_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\att_order_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\att_order_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\att_var_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\att_var_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\audio_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\audio_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\audio_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\audio_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\audio_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\audio_att_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\audio_att_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\audio_att_4.txt"
+"..\SMIL_Test_Files\smil_input\valid\audio_att_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\audio_att_5.txt"
+"..\SMIL_Test_Files\smil_input\valid\a_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\a_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\a_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_att_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\a_att_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_att_4.txt"
+"..\SMIL_Test_Files\smil_input\valid\a_att_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_att_5.txt"
+"..\SMIL_Test_Files\smil_input\valid\a_struc_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_struc_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\a_struc_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_struc_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\a_struc_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_struc_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\a_struc_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\a_struc_4.txt"
+"..\SMIL_Test_Files\smil_input\valid\body_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\body_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\body_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\body_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\body_struc_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\body_struc_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\body_struc_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\body_struc_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_10.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_10.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_11.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_11.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_12.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_12.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_13.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_13.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_14.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_14.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_15.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_15.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_16.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_16.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_17.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_17.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_18.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_18.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_19.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_19.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_20.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_20.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_21.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_21.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_22.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_22.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_23.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_23.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_24.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_24.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_25.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_25.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_26.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_26.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_27.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_27.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_28.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_28.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_29.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_29.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_30.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_30.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_4.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_5.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_6.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_6.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_7.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_7.txt"
+"..\SMIL_Test_Files\smil_input\valid\cdata_8.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\cdata_8.txt"
+"..\SMIL_Test_Files\smil_input\valid\comments_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\comments_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\doctype_variation.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\doctype_variation.txt"
+"..\SMIL_Test_Files\smil_input\valid\Entitiy_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\Entitiy_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_10.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_10.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_11.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_11.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_12.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_12.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_13.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_13.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_14.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_14.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_15.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_15.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_17.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_17.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_18.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_18.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_19.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_19.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_20.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_20.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_21.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_21.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_22.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_22.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_24.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_24.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_26.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_26.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_27.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_27.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_30.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_30.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_31.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_31.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_4.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_5.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_6.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_6.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_7.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_7.txt"
+"..\SMIL_Test_Files\smil_input\valid\entity_ref_8.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\entity_ref_8.txt"
+"..\SMIL_Test_Files\smil_input\valid\head_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\head_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\head_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\head_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\img_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\img_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\img_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\img_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\img_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\img_att_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\img_att_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\img_att_4.txt"
+"..\SMIL_Test_Files\smil_input\valid\img_att_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\img_att_5.txt"
+"..\SMIL_Test_Files\smil_input\valid\INC021337.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\INC021337.txt"
+"..\SMIL_Test_Files\smil_input\valid\INC022160.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\INC022160.txt"
+"..\SMIL_Test_Files\smil_input\valid\INC025788.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\INC025788.txt"
+"..\SMIL_Test_Files\smil_input\valid\layout_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\layout_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\layout_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\layout_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\newline_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\newline_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\par_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\par_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\par_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\par_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\par_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\par_att_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\par_att_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\par_att_4.txt"
+"..\SMIL_Test_Files\smil_input\valid\par_att_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\par_att_5.txt"
+"..\SMIL_Test_Files\smil_input\valid\ref_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\ref_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\ref_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\ref_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\ref_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\ref_att_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\ref_att_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\ref_att_4.txt"
+"..\SMIL_Test_Files\smil_input\valid\ref_att_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\ref_att_5.txt"
+"..\SMIL_Test_Files\smil_input\valid\region_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\region_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\region_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\region_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\region_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\region_att_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\region_att_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\region_att_4.txt"
+"..\SMIL_Test_Files\smil_input\valid\region_att_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\region_att_5.txt"
+"..\SMIL_Test_Files\smil_input\valid\region_att_6.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\region_att_6.txt"
+"..\SMIL_Test_Files\smil_input\valid\root-layout_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\root-layout_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\root-layout_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\root-layout_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\root-layout_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\root-layout_att_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\seq_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\seq_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\seq_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_att_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\seq_att_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_att_4.txt"
+"..\SMIL_Test_Files\smil_input\valid\seq_att_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_att_5.txt"
+"..\SMIL_Test_Files\smil_input\valid\seq_struc_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_struc_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\seq_struc_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_struc_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\seq_struc_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_struc_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\seq_struc_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_struc_4.txt"
+"..\SMIL_Test_Files\smil_input\valid\seq_struc_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_struc_5.txt"
+"..\SMIL_Test_Files\smil_input\valid\seq_struc_6.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\seq_struc_6.txt"
+"..\SMIL_Test_Files\smil_input\valid\smil_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\smil_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\smil_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\smil_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\switch_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\switch_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\switch_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\switch_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\switch_struc_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\switch_struc_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\switch_struc_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\switch_struc_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\switch_struc_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\switch_struc_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\textstream_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\textstream_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\textstream_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\textstream_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\textstream_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\textstream_att_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\textstream_att_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\textstream_att_4.txt"
+"..\SMIL_Test_Files\smil_input\valid\textstream_att_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\textstream_att_5.txt"
+"..\SMIL_Test_Files\smil_input\valid\text_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\text_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\text_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\text_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\text_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\text_att_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\text_att_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\text_att_4.txt"
+"..\SMIL_Test_Files\smil_input\valid\text_att_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\text_att_5.txt"
+"..\SMIL_Test_Files\smil_input\valid\utf8.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\utf8.txt"
+"..\SMIL_Test_Files\smil_input\valid\video_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\video_att_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\video_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\video_att_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\video_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\video_att_3.txt"
+"..\SMIL_Test_Files\smil_input\valid\video_att_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\video_att_4.txt"
+"..\SMIL_Test_Files\smil_input\valid\video_att_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\video_att_5.txt"
+"..\SMIL_Test_Files\smil_input\valid\whitespace_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\whitespace_1.txt"
+"..\SMIL_Test_Files\smil_input\valid\whitespace_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\whitespace_2.txt"
+"..\SMIL_Test_Files\smil_input\valid\xml_version_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\valid\xml_version_1.txt"
+
+
+;SMIL Input InValid
+"..\SMIL_Test_Files\smil_input\invalid\a_att_10.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\a_att_10.txt"
+"..\SMIL_Test_Files\smil_input\invalid\a_att_11.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\a_att_11.txt"
+"..\SMIL_Test_Files\smil_input\invalid\a_att_6.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\a_att_6.txt"
+"..\SMIL_Test_Files\smil_input\invalid\a_att_7.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\a_att_7.txt"
+"..\SMIL_Test_Files\smil_input\invalid\a_att_8.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\a_att_8.txt"
+"..\SMIL_Test_Files\smil_input\invalid\a_att_9.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\a_att_9.txt"
+"..\SMIL_Test_Files\smil_input\invalid\cdata_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\cdata_1.txt"
+"..\SMIL_Test_Files\smil_input\invalid\Entitiy_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\Entitiy_2.txt"
+"..\SMIL_Test_Files\smil_input\invalid\entity_ref_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\entity_ref_1.txt"
+"..\SMIL_Test_Files\smil_input\invalid\entity_ref_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\entity_ref_2.txt"
+"..\SMIL_Test_Files\smil_input\invalid\entity_ref_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\entity_ref_3.txt"
+"..\SMIL_Test_Files\smil_input\invalid\entity_ref_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\entity_ref_4.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_1.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_10.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_10.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_11.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_11.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_12.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_12.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_13.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_13.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_14.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_14.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_15.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_15.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_16.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_16.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_17.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_17.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_18.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_18.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_19.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_19.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_2.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_20.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_20.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_21.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_21.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_22.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_22.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_23.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_23.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_24.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_24.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_25.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_25.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_3.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_4.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_5.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_6.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_6.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_7.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_7.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_8.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_8.txt"
+"..\SMIL_Test_Files\smil_input\invalid\further_invalid_9.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\further_invalid_9.txt"
+"..\SMIL_Test_Files\smil_input\invalid\INC021591.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\INC021591.txt"
+"..\SMIL_Test_Files\smil_input\invalid\INC021675.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\INC021675.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_1.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_10.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_10.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_11.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_11.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_12.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_12.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_13.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_13.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_14.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_14.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_15.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_15.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_16.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_16.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_17.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_17.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_18.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_18.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_19.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_19.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_2.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_20.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_20.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_21.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_21.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_22.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_22.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_23.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_23.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_24.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_24.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_25.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_25.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_26.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_26.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_27.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_27.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_28.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_28.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_29.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_29.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_3.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_31.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_31.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_32.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_32.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_33.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_33.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_34.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_34.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_35.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_35.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_36.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_36.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_37.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_37.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_38.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_38.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_39.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_39.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_4.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_40.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_40.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_5.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_6.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_6.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_7.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_7.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_8.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_8.txt"
+"..\SMIL_Test_Files\smil_input\invalid\invalid_9.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\invalid_9.txt"
+"..\SMIL_Test_Files\smil_input\invalid\region_att_10.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\region_att_10.txt"
+"..\SMIL_Test_Files\smil_input\invalid\region_att_11.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\region_att_11.txt"
+"..\SMIL_Test_Files\smil_input\invalid\region_att_7.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\region_att_7.txt"
+"..\SMIL_Test_Files\smil_input\invalid\region_att_8.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\region_att_8.txt"
+"..\SMIL_Test_Files\smil_input\invalid\region_att_9.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\region_att_9.txt"
+"..\SMIL_Test_Files\smil_input\invalid\root-layout_att_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\root-layout_att_4.txt"
+"..\SMIL_Test_Files\smil_input\invalid\root-layout_att_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\root-layout_att_5.txt"
+"..\SMIL_Test_Files\smil_input\invalid\root-layout_att_6.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\root-layout_att_6.txt"
+"..\SMIL_Test_Files\smil_input\invalid\switch_struc_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\smil_input\invalid\switch_struc_4.txt"
+
+
+
+;MMS Input valid
+"..\SMIL_Test_Files\mms_input\valid\audio_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\audio_att_1.txt"
+"..\SMIL_Test_Files\mms_input\valid\audio_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\audio_att_2.txt"
+"..\SMIL_Test_Files\mms_input\valid\audio_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\audio_att_3.txt"
+"..\SMIL_Test_Files\mms_input\valid\body_struc_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\body_struc_1.txt"
+"..\SMIL_Test_Files\mms_input\valid\body_struc_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\body_struc_2.txt"
+"..\SMIL_Test_Files\mms_input\valid\body_struc_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\body_struc_3.txt"
+"..\SMIL_Test_Files\mms_input\valid\head_struct_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\body_struct_4.txt"
+"..\SMIL_Test_Files\mms_input\valid\head_struct_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\body_struct_5.txt"
+"..\SMIL_Test_Files\mms_input\valid\head_struc_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\head_struc_1.txt"
+"..\SMIL_Test_Files\mms_input\valid\head_struc_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\head_struc_3.txt"
+"..\SMIL_Test_Files\mms_input\valid\img_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\img_att_1.txt"
+"..\SMIL_Test_Files\mms_input\valid\img_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\img_att_2.txt"
+"..\SMIL_Test_Files\mms_input\valid\img_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\img_att_3.txt"
+"..\SMIL_Test_Files\mms_input\valid\img_struc_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\img_struc_1.txt"
+"..\SMIL_Test_Files\mms_input\valid\layout_struc_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\layout_struc_1.txt"
+"..\SMIL_Test_Files\mms_input\valid\layout_struc_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\layout_struc_3.txt"
+"..\SMIL_Test_Files\mms_input\valid\layout_struc_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\layout_struc_4.txt"
+"..\SMIL_Test_Files\mms_input\valid\layout_struc_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\layout_struc_5.txt"
+"..\SMIL_Test_Files\mms_input\valid\metadata_att1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\metadata_att1.txt"
+"..\SMIL_Test_Files\mms_input\valid\meta_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\meta_att_1.txt"
+"..\SMIL_Test_Files\mms_input\valid\meta_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\meta_att_2.txt"
+"..\SMIL_Test_Files\mms_input\valid\par_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\par_att_1.txt"
+"..\SMIL_Test_Files\mms_input\valid\par_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\par_att_2.txt"
+"..\SMIL_Test_Files\mms_input\valid\par_prefetch.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\par_prefetch.txt"
+"..\SMIL_Test_Files\mms_input\valid\par_struc_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\par_struc_1.txt"
+"..\SMIL_Test_Files\mms_input\valid\par_struc_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\par_struc_2.txt"
+"..\SMIL_Test_Files\mms_input\valid\par_struc_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\par_struc_4.txt"
+"..\SMIL_Test_Files\mms_input\valid\prefetch_att1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\prefetch_att1.txt"
+"..\SMIL_Test_Files\mms_input\valid\prefetch_att2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\prefetch_att2.txt"
+"..\SMIL_Test_Files\mms_input\valid\prefetch_att3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\prefetch_att3.txt"
+"..\SMIL_Test_Files\mms_input\valid\prefetch_att4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\prefetch_att4.txt"
+"..\SMIL_Test_Files\mms_input\valid\ref_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\ref_att_1.txt"
+"..\SMIL_Test_Files\mms_input\valid\ref_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\ref_att_2.txt"
+"..\SMIL_Test_Files\mms_input\valid\ref_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\ref_att_3.txt"
+"..\SMIL_Test_Files\mms_input\valid\ref_att_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\ref_att_4.txt"
+"..\SMIL_Test_Files\mms_input\valid\ref_att_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\ref_att_5.txt"
+"..\SMIL_Test_Files\mms_input\valid\ref_att_6.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\ref_att_6.txt"
+"..\SMIL_Test_Files\mms_input\valid\region_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_att_1.txt"
+"..\SMIL_Test_Files\mms_input\valid\region_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_att_2.txt"
+"..\SMIL_Test_Files\mms_input\valid\region_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_att_3.txt"
+"..\SMIL_Test_Files\mms_input\valid\region_att_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_att_4.txt"
+"..\SMIL_Test_Files\mms_input\valid\region_att_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_att_5.txt"
+"..\SMIL_Test_Files\mms_input\valid\region_att_6.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_att_6.txt"
+"..\SMIL_Test_Files\mms_input\valid\region_struc_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\region_struc_1.txt"
+"..\SMIL_Test_Files\mms_input\valid\root-layout_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\root-layout_att_1.txt"
+"..\SMIL_Test_Files\mms_input\valid\root-layout_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\root-layout_att_2.txt"
+"..\SMIL_Test_Files\mms_input\valid\smil_struc_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\smil_struc_1.txt"
+"..\SMIL_Test_Files\mms_input\valid\smil_struc_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\smil_struc_3.txt"
+"..\SMIL_Test_Files\mms_input\valid\smil_struc_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\smil_struc_4.txt"
+"..\SMIL_Test_Files\mms_input\valid\smil_struc_5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\smil_struc_5.txt"
+"..\SMIL_Test_Files\mms_input\valid\text_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\text_att_1.txt"
+"..\SMIL_Test_Files\mms_input\valid\text_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\text_att_2.txt"
+"..\SMIL_Test_Files\mms_input\valid\transition_att_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\transition_att_1.txt"
+"..\SMIL_Test_Files\mms_input\valid\transition_att_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\transition_att_2.txt"
+"..\SMIL_Test_Files\mms_input\valid\transition_att_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\valid\transition_att_3.txt"
+
+
+
+;MMS Input invalid
+"..\SMIL_Test_Files\mms_input\invalid\body_struc_4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\body_struc_4.txt"
+"..\SMIL_Test_Files\mms_input\invalid\head_struc_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\head_struc_2.txt"
+"..\SMIL_Test_Files\mms_input\invalid\invalid_metadata_att1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid_metadata_att1.txt"
+"..\SMIL_Test_Files\mms_input\invalid\invalid_meta_att1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid_meta_att1.txt"
+"..\SMIL_Test_Files\mms_input\invalid\invalid_transition_att2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid_transition_att2.txt"
+"..\SMIL_Test_Files\mms_input\invalid\invalid_transition_att3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid_transition_att3.txt"
+"..\SMIL_Test_Files\mms_input\invalid\invalid_transition_att4.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid_transition_att4.txt"
+"..\SMIL_Test_Files\mms_input\invalid\invalid_transition_att5.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid_transition_att5.txt"
+"..\SMIL_Test_Files\mms_input\invalid\invalid__prefetch_att1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid__prefetch_att1.txt"
+"..\SMIL_Test_Files\mms_input\invalid\invalid__prefetch_att2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid__prefetch_att2.txt"
+"..\SMIL_Test_Files\mms_input\invalid\invalid__prefetch_att3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\invalid__prefetch_att3.txt"
+"..\SMIL_Test_Files\mms_input\invalid\layout_struc_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\layout_struc_2.txt"
+"..\SMIL_Test_Files\mms_input\invalid\layout_struc_6.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\layout_struc_6.txt"
+"..\SMIL_Test_Files\mms_input\invalid\layout_struc_7.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\layout_struc_7.txt"
+"..\SMIL_Test_Files\mms_input\invalid\par_struc_3.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\par_struc_3.txt"
+"..\SMIL_Test_Files\mms_input\invalid\region_att_7.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\region_att_7.txt"
+"..\SMIL_Test_Files\mms_input\invalid\smil_struc_2.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\smil_struc_2.txt"
+"..\SMIL_Test_Files\mms_input\invalid\text_struc_1.txt" - "c:\legacyminidomparsertest\SMIL_Test_Files\mms_input\invalid\text_struc_1.txt"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/legacyminidomparser/XMLParser/test/group/t_GmxmlFailure.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,35 @@
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+//RTEST
+
+TARGET t_gmxmlfailure.exe
+TARGETTYPE exe
+
+SOURCEPATH ../
+SOURCE t_GmxmlFailure.CPP
+SOURCE t_XMLParserLOG.CPP
+
+USERINCLUDE ../
+
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+
+LIBRARY efsrv.lib euser.lib xmlparser.lib
+EPOCSTACKSIZE 0x8000
+
+VENDORID 0x70000001
+
+SMPSAFE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/legacyminidomparser/XMLParser/test/group/t_GmxmlParser.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,41 @@
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// t_gmxmlparser.mmp
+//
+
+//RTEST
+
+TARGET t_gmxmlparser.exe
+TARGETTYPE exe
+
+SOURCEPATH ../
+SOURCE GmxmlTestUtils.cpp
+SOURCE t_GmxmlParser.CPP
+
+
+USERINCLUDE ../
+
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+
+LIBRARY euser.lib
+LIBRARY efsrv.lib
+LIBRARY xmlparser.lib
+
+
+EPOCSTACKSIZE 0x8000
+
+
+
+SMPSAFE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/legacyminidomparser/XMLParser/test/group/t_smiltranslatortest.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,53 @@
+// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// t_smiltranslatortest.mmp
+//
+
+//RTEST
+
+TARGET t_smiltranslatortest.exe
+TARGETTYPE exe
+
+SOURCEPATH ../
+SOURCE t_smiltranslatortest.cpp
+SOURCE t_Smildtd.cpp
+
+
+USERINCLUDE ../
+
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+
+
+LIBRARY euser.lib
+LIBRARY efsrv.lib
+LIBRARY xmlparser.lib
+LIBRARY bafl.lib
+
+SOURCEPATH ../../STRINGS
+START STRINGTABLE SMILElements.st
+ EXPORTPATH /epoc32/include
+END
+START STRINGTABLE SMILGenericElements.st
+ EXPORTPATH /epoc32/include
+END
+START STRINGTABLE SMILAttributes.st
+ EXPORTPATH /epoc32/include
+END
+
+EPOCSTACKSIZE 0x8000
+
+
+
+SMPSAFE
--- a/xml/legacyminidomparser/XMLParser/test/t_GmxmlFailure.mmp Fri Jun 11 16:29:19 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-target t_gmxmlfailure.exe
-targettype exe
-
-SOURCEPATH ../test
-SOURCE t_GmxmlFailure.CPP
-SOURCE t_XMLParserLOG.CPP
-
-USERINCLUDE ../test
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-
-LIBRARY efsrv.lib euser.lib xmlparser.lib
-EPOCSTACKSIZE 0x8000
-
-VENDORID 0x70000001
-
-SMPSAFE
--- a/xml/legacyminidomparser/XMLParser/test/t_GmxmlParser.mmp Fri Jun 11 16:29:19 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// t_gmxmlparser.mmp
-//
-
-TARGET t_gmxmlparser.exe
-TARGETTYPE exe
-
-SOURCEPATH .
-SOURCE GmxmlTestUtils.cpp
-SOURCE t_GmxmlParser.CPP
-
-
-USERINCLUDE .
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-
-
-
-
-
-LIBRARY euser.lib
-LIBRARY efsrv.lib
-LIBRARY xmlparser.lib
-
-
-EPOCSTACKSIZE 0x8000
-
-
-
-SMPSAFE
--- a/xml/legacyminidomparser/XMLParser/test/t_smiltranslatortest.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/legacyminidomparser/XMLParser/test/t_smiltranslatortest.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -1191,8 +1191,8 @@
CleanupStack::PushL(fileMan);
// Do the file copy
- User::LeaveIfError(fileMan->Copy(_L("z:\\gmxmltest.txt"),_L("c:\\gmxmltest.txt"),CFileMan::EOverWrite));
- User::LeaveIfError(fileMan->Copy(_L("z:\\legacyminidomparsertest"),_L("c:\\legacyminidomparsertest"),CFileMan::EOverWrite|CFileMan::ERecurse));
+ //User::LeaveIfError(fileMan->Copy(_L("z:\\gmxmltest.txt"),_L("c:\\gmxmltest.txt"),CFileMan::EOverWrite));
+ //User::LeaveIfError(fileMan->Copy(_L("z:\\legacyminidomparsertest"),_L("c:\\legacyminidomparsertest"),CFileMan::EOverWrite|CFileMan::ERecurse));
CleanupStack::PopAndDestroy(2);
}
--- a/xml/legacyminidomparser/XMLParser/test/t_smiltranslatortest.mmp Fri Jun 11 16:29:19 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// t_smiltranslatortest.mmp
-//
-
-TARGET t_smiltranslatortest.exe
-TARGETTYPE exe
-
-SOURCEPATH .
-SOURCE t_smiltranslatortest.cpp
-SOURCE t_Smildtd.cpp
-
-
-USERINCLUDE .
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-
-
-LIBRARY euser.lib
-LIBRARY efsrv.lib
-LIBRARY xmlparser.lib
-LIBRARY bafl.lib
-
-SOURCEPATH ../STRINGS
-START STRINGTABLE SMILElements.st
- EXPORTPATH /epoc32/include
-END
-START STRINGTABLE SMILGenericElements.st
- EXPORTPATH /epoc32/include
-END
-START STRINGTABLE SMILAttributes.st
- EXPORTPATH /epoc32/include
-END
-
-EPOCSTACKSIZE 0x8000
-
-
-
-SMPSAFE
--- a/xml/libxml2libs/group/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -74,7 +74,7 @@
#include "../test/common/group/bld.inf"
#include "../test/tef/def130695/group/bld.inf"
#include "../test/tef/xml2/group/bld.inf"
+#include "../test/xmlengtester/xmlengtester_target/group/bld.inf"
-
--- a/xml/libxml2libs/group/syslibs_libxml2.mrp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/group/syslibs_libxml2.mrp Thu Jul 22 16:49:54 2010 +0100
@@ -1,19 +1,3 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
component syslibs_libxml2
source \sf\os\xmlsrv\xml\libxml2libs
--- a/xml/libxml2libs/inc/libxml2/libxml2_chvalid.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/inc/libxml2/libxml2_chvalid.h Thu Jul 22 16:49:54 2010 +0100
@@ -24,7 +24,7 @@
#pragma warning(disable: 4127 4132 4510 4512 4610)
-#include "libxml2_xmlstring.h"
+#include <stdapis/libxml2/libxml2_xmlstring.h>
#ifdef __cplusplus
extern "C" {
--- a/xml/libxml2libs/inc/libxml2/libxml2_dict.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/inc/libxml2/libxml2_dict.h Thu Jul 22 16:49:54 2010 +0100
@@ -17,7 +17,7 @@
#ifndef XML_DICT_H
#define XML_DICT_H
-#include "libxml2_xmlstring.h"
+#include <stdapis/libxml2/libxml2_xmlstring.h>
#ifdef __cplusplus
extern "C" {
--- a/xml/libxml2libs/inc/libxml2/libxml2_encoding.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/inc/libxml2/libxml2_encoding.h Thu Jul 22 16:49:54 2010 +0100
@@ -29,7 +29,7 @@
#define XML_CHAR_ENCODING_H
//#include "libxml/Libxml2_xmlversion.h" // enable this when dependency on tree.h is removed
-#include "libxml2_tree.h"
+#include <stdapis/libxml2/libxml2_tree.h>
#ifdef LIBXML_ICONV_ENABLED
#include <iconv.h>
--- a/xml/libxml2libs/inc/libxml2/libxml2_errencoding.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/inc/libxml2/libxml2_errencoding.h Thu Jul 22 16:49:54 2010 +0100
@@ -15,9 +15,9 @@
-#include <libxml2_parser.h>
+#include <stdapis/libxml2/libxml2_parser.h>
-#include <libxml2_chvalid.h>
+#include <stdapis/libxml2/libxml2_chvalid.h>
--- a/xml/libxml2libs/inc/libxml2/libxml2_globals.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/inc/libxml2/libxml2_globals.h Thu Jul 22 16:49:54 2010 +0100
@@ -124,9 +124,9 @@
XMLPUBFUN void* XMLCALL realloc_impl(void *ptr, size_t size);
#ifdef LIBXML_XPATH_ENABLED
-# include "xmlengtriodef.h"
-# include "xmlengtrionan.h"
-# include "libxml2_xpathinternals.h"
+#include <stdapis/libxml2/xmlengtriodef.h>
+#include <stdapis/libxml2/xmlengtrionan.h>
+#include <stdapis/libxml2/libxml2_xpathinternals.h>
#endif
#ifdef LIBXML_CATALOG_ENABLED
--- a/xml/libxml2libs/inc/libxml2/libxml2_sax2.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/inc/libxml2/libxml2_sax2.h Thu Jul 22 16:49:54 2010 +0100
@@ -17,10 +17,10 @@
#ifndef XML_SAX2_H
#define XML_SAX2_H
-#include <libxml2_parser.h>
+#include <stdapis/libxml2/libxml2_parser.h>
#ifdef LIBXML_XPTR_ENABLED
-#include <libxml2_xlink.h>
+#include <stdapis/libxml2/libxml2_xlink.h>
#endif
#ifdef __cplusplus
--- a/xml/libxml2libs/inc/libxml2/libxml2_threads.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/inc/libxml2/libxml2_threads.h Thu Jul 22 16:49:54 2010 +0100
@@ -17,7 +17,7 @@
#ifndef XML_THREADS_H
#define XML_THREADS_H
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#ifdef __cplusplus
extern "C" {
--- a/xml/libxml2libs/inc/libxml2/libxml2_xlink.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/inc/libxml2/libxml2_xlink.h Thu Jul 22 16:49:54 2010 +0100
@@ -16,8 +16,8 @@
#ifndef XML_XLINK_H
#define XML_XLINK_H
-#include <libxml2_xmlversion.h>
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_xmlversion.h>
+#include <stdapis/libxml2/libxml2_tree.h>
#ifdef __cplusplus
extern "C" {
--- a/xml/libxml2libs/inc/libxml2/libxml2_xmlerror2.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/inc/libxml2/libxml2_xmlerror2.h Thu Jul 22 16:49:54 2010 +0100
@@ -14,7 +14,7 @@
-#include <libxml2_xmlerror.h>
+#include <stdapis/libxml2/libxml2_xmlerror.h>
--- a/xml/libxml2libs/inc/libxml2/libxml2_xmlreader.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/inc/libxml2/libxml2_xmlreader.h Thu Jul 22 16:49:54 2010 +0100
@@ -16,8 +16,8 @@
#ifndef XML_XMLREADER_H
#define XML_XMLREADER_H
-#include <libxml2_tree.h>
-#include <libxml2_xmlio.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_xmlio.h>
#ifdef LIBXML_SCHEMAS_ENABLED
#include "libxml2_relaxng.h"
--- a/xml/libxml2libs/inc/libxml2/libxml2_xmlschemasglobals.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/inc/libxml2/libxml2_xmlschemasglobals.h Thu Jul 22 16:49:54 2010 +0100
@@ -19,8 +19,7 @@
typedef struct _xmlSchemaTypesGlobalData xmlSchemaTypesGlobalData;
typedef xmlSchemaTypesGlobalData* xmlSchemaTypesGlobalDataPtr;
-#include <libxml2_schemasinternals.h>
-
+#include <stdapis/libxml2/libxml2_schemasinternals.h>
// xmlSchemaTypesInitialized is defined as separate global variable
struct _xmlSchemaTypesGlobalData{
--- a/xml/libxml2libs/inc/libxml2/xmlengtrionan.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/inc/libxml2/xmlengtrionan.h Thu Jul 22 16:49:54 2010 +0100
@@ -21,7 +21,7 @@
#ifndef TRIO_NAN_H
#define TRIO_NAN_H
-#include <xmlengtriodef.h>
+#include <stdapis/libxml2/xmlengtriodef.h>
#ifdef __cplusplus
extern "C" {
--- a/xml/libxml2libs/inc/libxml2_nonexport/libxml2_xmlio_private.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/inc/libxml2_nonexport/libxml2_xmlio_private.h Thu Jul 22 16:49:54 2010 +0100
@@ -17,7 +17,7 @@
#ifndef LIBXML2_TREE_PRIVATE_H
#define LIBXML2_TREE_PRIVATE_H
-#include <libxml2_xmlio.h>
+#include <stdapis/libxml2/libxml2_xmlio.h>
#ifdef __cplusplus
extern "C" {
--- a/xml/libxml2libs/src/libxml2/libxml2_triostr.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/src/libxml2/libxml2_triostr.h Thu Jul 22 16:49:54 2010 +0100
@@ -27,7 +27,7 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#include <xmlengtriodef.h>
+#include <stdapis/libxml2/xmlengtriodef.h>
#include "libxml2_triop.h"
enum {
--- a/xml/libxml2libs/src/libxml2/libxml2_xlink.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/src/libxml2/libxml2_xlink.c Thu Jul 22 16:49:54 2010 +0100
@@ -32,12 +32,12 @@
#include <zlib.h>
#endif
-#include <libxml2_xmlmemory.h>
-#include <libxml2_tree.h>
-#include <libxml2_parser.h>
-#include <libxml2_valid.h>
-#include <libxml2_xlink.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_xmlmemory.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_parser.h>
+#include <stdapis/libxml2/libxml2_valid.h>
+#include <stdapis/libxml2/libxml2_xlink.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#define XLINK_NAMESPACE (BAD_CAST "http://www.w3.org/1999/xlink/namespace/")
#define XHTML_NAMESPACE (BAD_CAST "http://www.w3.org/1999/xhtml/")
--- a/xml/libxml2libs/test/common/group/Te_XML_FTmgrsuite.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/common/group/Te_XML_FTmgrsuite.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -13,11 +13,9 @@
// Description:
//
- TARGET te_xml_ftmgrsuite.exe
- TARGETTYPE exe
- UID 0x1000007A 0x101F7784
-
-
+TARGET te_xml_ftmgrsuite.exe
+TARGETTYPE exe
+UID 0x1000007A 0x101F7784
//Please add any change under here
SOURCEPATH ../src
--- a/xml/libxml2libs/test/common/group/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/common/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -19,11 +19,11 @@
PRJ_EXPORTS
PRJ_TESTEXPORTS
-../scripts/te_XML_FTmgrSuite.script z:/testdata/scripts/te_xml_ftmgrsuite.script
-../testdata/te_XML_FTmgrsuite.ini z:/testdata/configs/te_xml_ftmgrsuite.ini
-./te_XML_FTmgrsuite.iby /epoc32/rom/include/te_xml_ftmgrsuite.iby
+../scripts/te_xml_ftmgrsuite.script c:/testdata/scripts/te_xml_ftmgrsuite.script
+../testdata/te_xml_ftmgrsuite.ini c:/testdata/configs/te_xml_ftmgrsuite.ini
+./te_xml_ftmgrsuite.iby /epoc32/rom/include/te_xml_ftmgrsuite.iby
PRJ_MMPFILES
PRJ_TESTMMPFILES
-Te_XML_FTmgrsuite.mmp manual
+te_xml_ftmgrsuite.mmp manual
--- a/xml/libxml2libs/test/common/group/te_XML_FTmgrsuite.iby Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/common/group/te_XML_FTmgrsuite.iby Thu Jul 22 16:49:54 2010 +0100
@@ -20,9 +20,6 @@
#include <testexecute.iby>
-file=ABI_DIR\BUILD_DIR\te_XML_FTmgrSuite.exe sys\bin\te_XML_FTmgrSuite.exe
-
-data=DATAZ_\TestData\configs\te_XML_FTmgrSuite.ini TestData\configs\te_XML_FTmgrSuite.ini
-data=DATAZ_\TestData\scripts\te_XML_FTmgrSuite.script TestData\Scripts\te_XML_FTmgrSuite.Script
+file=ABI_DIR\BUILD_DIR\te_xml_ftmgrsuite.exe sys\bin\te_xml_ftmgrsuite.exe
#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/libxml2libs/test/common/group/te_xml_ftmgrsuite.pkg Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,32 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;Te_xml_ftmgrsuite.pkg
+
+; Languages -
+&EN
+
+; Installation header
+#{"Te_xml_ftmgrsuite"}, (0x20032631), 1, 0, 0, TYPE=SA
+%{"Nokia Corporation"}
+:"Nokia Corporation"
+
+(0x101f7961),0, 0, 0 ,{"Series60ProductID"}
+; Install files
+;Test exes
+"\epoc32\release\armv5\urel\te_XML_FTmgrSuite.exe" - "c:\sys\bin\te_XML_FTmgrSuite.exe"
+
+;Scripts
+"\epoc32\data\c\testdata\scripts\te_xml_ftmgrsuite.script" - "c:\testdata\scripts\te_xml_ftmgrsuite.script"
+"..\TestData\te_xml_ftmgrsuite.ini" - "c:\TestData\configs\te_xml_ftmgrsuite.ini"
\ No newline at end of file
--- a/xml/libxml2libs/test/common/romkit_include/featuredatabase.xml Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/common/romkit_include/featuredatabase.xml Thu Jul 22 16:49:54 2010 +0100
@@ -46,19 +46,19 @@
<hrhmacro exclude="SYMBIAN_EXCLUDE_FAX"/>
</feature>
<feature name="Print" statusflags="0x00000001" uid="0x10279807">
- <hrhmacro exclude="SYMBIAN_EXCLUDE_PRINT"/>
+ <hrhmacro include="__UPNP_PRINT_FRAMEWORK"/>
</feature>
<feature name="Bluetooth" statusflags="0x00000001" uid="0x10279808">
- <hrhmacro exclude="SYMBIAN_EXCLUDE_BLUETOOTH"/>
+ <hrhmacro include="__BT"/>
</feature>
<feature name="Infrared" statusflags="0x00000001" uid="0x10279809">
- <hrhmacro exclude="SYMBIAN_EXCLUDE_INFRARED"/>
+ <hrhmacro include="__IRDA"/>
</feature>
<feature name="Mmc" statusflags="0x00000001" uid="0x1027980A">
- <hrhmacro exclude="SYMBIAN_EXCLUDE_MMC"/>
+ <hrhmacro include="__MMC"/>
</feature>
<feature name="Usb" statusflags="0x00000001" uid="0x1027980B">
- <hrhmacro exclude="SYMBIAN_EXCLUDE_USB"/>
+ <hrhmacro include="__USB"/>
</feature>
<feature name="Obex" statusflags="0x00000001" uid="0x1027980C">
<hrhmacro exclude="SYMBIAN_EXCLUDE_OBEX"/>
@@ -82,16 +82,16 @@
<hrhmacro exclude="SYMBIAN_EXCLUDE_QOS_PROTPLUGINS"/>
</feature>
<feature name="IPSec" statusflags="0x00000001" uid="0x10279814">
- <hrhmacro exclude="SYMBIAN_EXCLUDE_IPSEC"/>
+ <hrhmacro include="__IPSEC"/>
</feature>
<feature name="Dhcp" statusflags="0x00000001" uid="0x10279815">
- <hrhmacro exclude="SYMBIAN_EXCLUDE_DHCP"/>
+ <hrhmacro include="__DHCP"/>
</feature>
<feature name="Connectivity" statusflags="0x00000001" uid="0x10279816">
<hrhmacro exclude="SYMBIAN_EXCLUDE_PC_CONNECTIVITY_EXCEPT_SECURE_BACKUP"/>
</feature>
<feature name="MTP" statusflags="0x00000001" uid="0x10279817">
- <hrhmacro exclude="SYMBIAN_EXCLUDE_MTP"/>
+ <hrhmacro include="__MTP_PROTOCOL_SUPPORT"/>
</feature>
<feature name="Location" statusflags="0x00000001" uid="0x10281818"></feature>
<feature name="MobileIP" statusflags="0x00000001" uid="0x10281819"></feature>
@@ -101,16 +101,16 @@
<hrhmacro exclude="SYMBIAN_EXCLUDE_OMA_DS_HOSTSERVERS"/>
</feature>
<feature name="Vibra" statusflags="0x00000001" uid="0x102835AE">
- <hrhmacro exclude="SYMBIAN_EXCLUDE_VIBRA"/>
+ <hrhmacro include="__VIBRA"/>
</feature>
<feature name="AmbientLightSensor" statusflags="0x00000001" uid="0x102835AF">
- <hrhmacro exclude="SYMBIAN_EXCLUDE_AMBIENT_LIGHT_SENSOR"/>
+ <hrhmacro include="__SERIES60_AMBIENT_LIGHT_SENSOR"/>
</feature>
<feature name="CoverDisplay" statusflags="0x00000001" uid="0x102835B0">
- <hrhmacro exclude="SYMBIAN_EXCLUDE_COVER_DISPLAY"/>
+ <hrhmacro include="__COVER_DISPLAY"/>
</feature>
<feature name="KeypadNoSlider" statusflags="0x00000001" uid="0x102835B1">
- <hrhmacro exclude="SYMBIAN_EXCLUDE_KEYPAD_NO_SLIDER"/>
+ <hrhmacro include="__SERIES60_KEYPAD_NO_SLIDER"/>
</feature>
<feature name="LocationManagement" statusflags="0x00000001" uid="0x10279818">
<hrhmacro exclude="SYMBIAN_EXCLUDE_LOCATION_MANAGEMENT"/>
@@ -119,7 +119,7 @@
<hrhmacro include="SYMBIAN_INCLUDE_LOCATION_API_VARIANT2"/>
</feature>
<feature name="BluetoothGPSPositioningPlugin" statusflags="0x00000000" uid="0x10285D6A">
- <hrhmacro include="SYMBIAN_INCLUDE_BLUETOOTH_GPS_PM"/>
+ <hrhmacro include="__BLUETOOTHGPSPSY"/>
</feature>
<feature name="DefaultPositioningPlugin" statusflags="0x00000000" uid="0x10285D6B">
<hrhmacro include="SYMBIAN_INCLUDE_DEFAULT_PM"/>
@@ -134,16 +134,16 @@
<hrhmacro include="SYMBIAN_INCLUDE_LOCATION_ADVANCED_DIALOG"/>
</feature>
<feature name="CsVideoTelephony" statusflags="0x00000001" uid="0x10285A22">
- <hrhmacro exclude="SYMBIAN_EXCLUDE_CS_VIDEO_TELEPHONY"/>
+ <hrhmacro include="__CS_VIDEO_TELEPHONY"/>
</feature>
<feature name="EmergencyCallsEnabledInOfflineMode" statusflags="0x00000001" uid="0x10285A23">
- <hrhmacro exclude="SYMBIAN_EXCLUDE_EMERGENCY_CALLS_ENABLED_IN_OFFLINE_MODE"/>
+ <hrhmacro include="__COMMON_TSY__EMERGENCY_CALLS_ENABLED_IN_OFFLINE_MODE"/>
</feature>
<feature name="DriveModeCanRestrictMtCalls" statusflags="0x00000001" uid="0x10285A24">
- <hrhmacro exclude="SYMBIAN_EXCLUDE_DRIVE_MODE_CAN_RESTRICT_MT_CALLS"/>
+ <hrhmacro include="__DRIVE_MODE"/>
</feature>
<feature name="FmTx" statusflags="0x00000001" uid="0x10285DD6">
- <hrhmacro exclude="SYMBIAN_EXCLUDE_FMTX"/>
+ <hrhmacro include="FF_FMTX"/>
</feature>
<!-- PREQ 2051 - Variation Support - Start -->
<feature name="Libxml2" statusflags="0x00000001" uid="0x10286747">
--- a/xml/libxml2libs/test/tef/def130695/group/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/tef/def130695/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -19,9 +19,9 @@
PRJ_EXPORTS
PRJ_TESTEXPORTS
-../scripts/def130695_Suite.script z:/testdata/scripts/def130695_Suite.script
-../testdata/def130695_suite.ini z:/testdata/configs/def130695_Suite.ini
-./def130695_suite.iby /epoc32/rom/include/def130695_Suite.iby
+../scripts/def130695_suite.script c:/testdata/scripts/def130695_suite.script
+../testdata/def130695_suite.ini c:/testdata/configs/def130695_suite.ini
+./def130695_suite.iby /epoc32/rom/include/def130695_suite.iby
PRJ_MMPFILES
--- a/xml/libxml2libs/test/tef/def130695/group/def130695_suite.iby Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/tef/def130695/group/def130695_suite.iby Thu Jul 22 16:49:54 2010 +0100
@@ -20,9 +20,6 @@
#include <testexecute.iby>
-file=ABI_DIR\BUILD_DIR\def130695_Suite.exe sys\bin\def130695_Suite.exe
-
-data=DATAZ_\TestData\configs\def130695_Suite.ini TestData\configs\def130695_Suite.ini
-data=DATAZ_\TestData\scripts\def130695_Suite.script TestData\Scripts\def130695_Suite.Script
+file=ABI_DIR\BUILD_DIR\def130695_suite.exe sys\bin\def130695_suite.exe
#endif
--- a/xml/libxml2libs/test/tef/def130695/group/def130695_suite.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/tef/def130695/group/def130695_suite.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -13,9 +13,9 @@
// Description:
//
- TARGET def130695_Suite.exe
- TARGETTYPE exe
- UID 0x1000007A 0x101F7784
+TARGET def130695_suite.exe
+TARGETTYPE exe
+UID 0x1000007A 0x101F7784
//Please add any change under here
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/libxml2libs/test/tef/def130695/group/def130695_suite.pkg Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,33 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;Def130695_suite.pkg
+
+; Languages -
+&EN
+
+; Installation header
+#{"Def130695_suite"}, (0x20032629), 1, 0, 0, TYPE=SA
+%{"Nokia Corporation"}
+:"Nokia Corporation"
+
+(0x101f7961),0, 0, 0 ,{"Series60ProductID"}
+; Install files
+;Test exes
+"\epoc32\release\armv5\urel\def130695_suite.exe" - "c:\sys\bin\def130695_suite.exe"
+
+;Scripts
+"..\scripts\def130695_suite.script" - "c:\testdata\scripts\def130695_suite.script"
+"..\TestData\def130695_suite.ini" - "c:\testdata\configs\def130695_suite.ini"
--- a/xml/libxml2libs/test/tef/def130695/scripts/def130695_Suite.script Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/tef/def130695/scripts/def130695_Suite.script Thu Jul 22 16:49:54 2010 +0100
@@ -25,7 +25,7 @@
//!@SYMTestActions Pass NULL to XmlBufferResize( )
//!@SYMTestExpectedResults The API should recognize the NULL and report back in case of such vulnerable situations.
//!@SYMDEF DEF130695
-RUN_TEST_STEP 100 def130695_Suite def130695_Step1 z:\testdata\configs\def130695_Suite.ini Section0
+RUN_TEST_STEP 100 def130695_Suite def130695_Step1 c:\testdata\configs\def130695_Suite.ini Section0
END_TESTCASE BASESRVCS-XML-CT-4925 // Libmxl2 vulnerability test
START_TESTCASE BASESRVCS-XML-CT-4926 // Libmxl2 vulnerability test
@@ -35,7 +35,7 @@
//!@SYMTestActions Pass NULL to XmlSax2Characters( )
//!@SYMTestExpectedResults The API should recognize the NULL and report back in case of such vulnerable situations.
//!@SYMDEF DEF130695
-RUN_TEST_STEP 100 def130695_Suite def130695_Step2 z:\testdata\configs\def130695_Suite.ini Section1
+RUN_TEST_STEP 100 def130695_Suite def130695_Step2 c:\testdata\configs\def130695_Suite.ini Section1
END_TESTCASE BASESRVCS-XML-CT-4926 // Libmxl2 vulnerability test
PRINT Complate_def130695__Tests
--- a/xml/libxml2libs/test/tef/group/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/tef/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -18,6 +18,6 @@
xmlengutilssmoketesttefsuite.mmp
PRJ_TESTEXPORTS
-../xmlengutilssmoketest/scripts/xmlengutilssmoketest.script z:/xml/scripts/xmlengutilssmoketest.script
+../xmlengutilssmoketest/scripts/xmlengutilssmoketest.script c:/xml/scripts/xmlengutilssmoketest.script
xmlengutilssmoketesttefsuite.iby /epoc32/rom/include/xmlengutilssmoketesttefsuite.iby
--- a/xml/libxml2libs/test/tef/group/te_headerstests.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/tef/group/te_headerstests.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -18,10 +18,11 @@
TARGET t_xmlheaderstest.exe
TARGETTYPE exe
-SYSTEMINCLUDE /epoc32/include
-SYSTEMINCLUDE /epoc32/include/libc
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+OS_LAYER_LIBXML2_SYSTEMINCLUDE
+OS_LAYER_ESTLIB_SYSTEMINCLUDE
+
SYSTEMINCLUDE /epoc32/include/bafl
-SYSTEMINCLUDE /epoc32/include/stdapis/libxml2
SYSTEMINCLUDE /epoc32/include/xml
SYSTEMINCLUDE /epoc32/include/xml/dom
SYSTEMINCLUDE /epoc32/include/xml/plugins
--- a/xml/libxml2libs/test/tef/headerstests/src/te_headersteststep.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/tef/headerstests/src/te_headersteststep.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -16,7 +16,7 @@
#include <e32std.h>
#include "te_headersteststep.h"
-#include <xmlengxestrings.h>
+#include <xml/utils/xmlengxestrings.h>
//test S60_header_files
--- a/xml/libxml2libs/test/tef/xml2/group/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/tef/xml2/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -23,5 +23,5 @@
PRJ_TESTEXPORTS
xml2teftests.iby /epoc32/rom/include/xml2teftests.iby
-../scripts/xml2tefsuite.script z:/tef_xml2/xml2tefsuite.script
+../scripts/xml2tefsuite.script c:/tef_xml2/xml2tefsuite.script
--- a/xml/libxml2libs/test/tef/xml2/group/xml2teftests.iby Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/tef/xml2/group/xml2teftests.iby Thu Jul 22 16:49:54 2010 +0100
@@ -22,6 +22,6 @@
#include <xmlengineutils.iby>
data=ABI_DIR\BUILD_DIR\texml2.exe sys\bin\texml2.exe
-data=DATAZ_\tef_xml2\xml2tefsuite.script tef_xml2\xml2tefsuite.script
+data=DATAC_\tef_xml2\xml2tefsuite.script tef_xml2\xml2tefsuite.script
#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/libxml2libs/test/tef/xml2/group/xml2teftests.pkg Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,32 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;Xml2teftests.pkg
+
+; Languages -
+&EN
+
+; Installation header
+#{"Xml2teftests"}, (0x2003262A), 1, 0, 0, TYPE=SA
+%{"Nokia Corporation"}
+:"Nokia Corporation"
+
+(0x101f7961),0, 0, 0 ,{"Series60ProductID"}
+; Install files
+;Test exes
+"\epoc32\release\armv5\urel\texml2.exe" - "c:\Sys\Bin\texml2.exe"
+
+;Scripts
+"\epoc32\data\c\tef_xml2\xml2tefsuite.script" - "c:\tef_xml2\xml2tefsuite.script"
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/inc/testcontenthandler.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/inc/testcontenthandler.h Thu Jul 22 16:49:54 2010 +0100
@@ -18,7 +18,7 @@
#ifndef __TESTCONTENTHANDLER_H__
#define __TESTCONTENTHANDLER_H__
-#include "XmlEngExtendedContentHandler.h"
+#include <xml/dom/xmlengextendedcontenthandler.h>
#include <Xml\DocumentParameters.h>
#include <Xml\ContentHandler.h>
#include <f32file.h>
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/inc/testfileoutputstream.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/inc/testfileoutputstream.h Thu Jul 22 16:49:54 2010 +0100
@@ -21,8 +21,7 @@
#define CTestFileOutputStream_H_INCLUDED
#include <f32file.h>
-#include "XmlEngOutputStream.h"
-
+#include <xml/dom/xmlengoutputstream.h>
/**
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/inc/xmlengtester.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/inc/xmlengtester.h Thu Jul 22 16:49:54 2010 +0100
@@ -26,16 +26,16 @@
#include <f32file.h>
#include <Xml\XmlParserErrors.h>
-#include <xmlengdom.h>
-#include <XmlEngErrors.h>
+#include <xml/dom/xmlengdom.h>
+#include <xml/dom/xmlengerrors.h>
// This include is not required anymore.
// #include <XmlEngXPathObject.h>
-#include <XmlEngDOMParser.h>
+#include <xml/dom/xmlengdomparser.h>
-#include "XmlEngDeserializer.h"
-#include "XmlEngDeserializerDOM.h"
-#include "XmlEngSerializer.h"
-#include <XmlEngXPathResult.h>
+#include <xml/dom/xmlengdeserializer.h>
+#include <xml/dom/xmlengdeserializerdom.h>
+#include <xml/dom/xmlengserializer.h>
+#include <xml/dom/xmlengxpathresult.h>
// CONSTANTS
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtester.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtester.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -17,7 +17,7 @@
// INCLUDE FILES
#include "xmlengtester.h"
#include "xmlengtesterdef.h"
-#include <XmlEngxestd.h>
+#include <xml/utils/xmlengxestd.h>
#include <Stiftestinterface.h>
#include <sys/reent.h>
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksaddfun.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksaddfun.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -23,14 +23,14 @@
#include <StifParser.h>
#include <Stiftestinterface.h>
-#include <XmlEngBinaryContainer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
#include "xmlengtesterdef.h"
#include <InetProtTextUtils.h>
#include <libc\string.h>
#include <charconv.h>
#include <UTF.H>
-#include <XmlEngSerializer.h>
+#include <xml/dom/xmlengserializer.h>
/************************************** AddFun ****************************************/
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksbincont.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksbincont.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -22,8 +22,9 @@
#include <StifParser.h>
#include <Stiftestinterface.h>
-#include <XmlEngBinaryContainer.h>
-#include <XmlEngFileContainer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+
#include "xmlengtesterdef.h"
#include <InetProtTextUtils.h>
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblockschunkcont.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblockschunkcont.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -18,10 +18,12 @@
#include "TestContentHandler.h"
#include "xmlengtester.h"
//#include "XmlEngDOMChunkParser.h"
-#include "XmlEngChunkContainer.h"
-#include "XmlEngBinaryContainer.h"
-#include "XmlEngFileContainer.h"
-#include "XmlEngNode.h"
+
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+
+#include <xml/dom/xmlengnode.h>
#include <e32svr.h>
#include <StifParser.h>
#include <Stiftestinterface.h>
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksdeserialize.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksdeserialize.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -23,7 +23,7 @@
#include <StifParser.h>
#include <Stiftestinterface.h>
-#include <XmlEngDeserializer.h>
+#include <xml/dom/xmlengserializer.h>
#include <Xml\ParserFeature.h>
#include "xmlengtesterdef.h"
@@ -32,11 +32,13 @@
#include <charconv.h>
#include <UTF.H>
-#include "XmlEngBinaryContainer.h"
-#include "XmlEngChunkContainer.h"
-#include "XmlEngFileContainer.h"
-#include "XmlEngDataContainer.h"
-#include <xmlengparsingoptions.h>
+
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengdatacontainer.h>
+
+#include <xml/dom/xmlengparsingoptions.h>
// -----------------------------------------------------------------------------
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksdeserializedom.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksdeserializedom.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -23,8 +23,8 @@
#include <StifParser.h>
#include <Stiftestinterface.h>
-#include <XmlEngDeserializer.h>
-#include <XmlEngDeserializerDOM.h>
+#include <xml/dom/xmlengdeserializer.h>
+#include <xml/dom/xmlengdeserializerdom.h>
#include "xmlengtesterdef.h"
#include <InetProtTextUtils.h>
@@ -32,10 +32,11 @@
#include <charconv.h>
#include <UTF.H>
-#include "XmlEngBinaryContainer.h"
-#include "XmlEngChunkContainer.h"
-#include "XmlEngFileContainer.h"
-#include "XmlEngDataContainer.h"
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengdatacontainer.h>
+
TInt CLibxml2Tester::DOMDeserializeL( CStifItemParser& aItem)
{
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksdesinfoset.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksdesinfoset.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -22,8 +22,7 @@
#include <e32std.h>
#include <StifParser.h>
#include <Stiftestinterface.h>
-
-#include <XmlEngDeserializer.h>
+#include <xml/dom/xmlengdeserializer.h>
#include <Xml\ParserFeature.h>
#include "xmlengtesterdef.h"
@@ -32,10 +31,10 @@
#include <charconv.h>
#include <UTF.H>
-#include "XmlEngBinaryContainer.h"
-#include "XmlEngChunkContainer.h"
-#include "XmlEngFileContainer.h"
-#include "XmlEngDataContainer.h"
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengdatacontainer.h>
// -----------------------------------------------------------------------------
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksdom.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksdom.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -24,7 +24,7 @@
#include <Xml\Parser.h>
#include <Xml\ParserFeature.h>
-#include <XmlEngNodeFilter.h>
+#include <xml/dom/xmlengnodefilter.h>
#include <libc\string.h>
#include <charconv.h>
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksfilecont.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksfilecont.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -18,9 +18,9 @@
#include "TestContentHandler.h"
#include "xmlengtester.h"
//#include "XmlEngDOMChunkParser.h"
-#include "XmlEngFileContainer.h"
-#include "XmlEngBinaryContainer.h"
-#include "XmlEngNode.h"
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengnode.h>
#include <e32svr.h>
#include <StifParser.h>
#include <Stiftestinterface.h>
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksserdefault.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksserdefault.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -22,18 +22,18 @@
#include <e32std.h>
#include <StifParser.h>
#include <Stiftestinterface.h>
-#include "XmlEngBinaryContainer.h"
-#include "XmlEngChunkContainer.h"
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
#include "xmlengtesterdef.h"
-#include <XmlEngSerializer.h>
-#include <XmlEngDeserializer.h>
+#include <xml/dom/xmlengserializer.h>
+#include <xml/dom/xmlengdeserializer.h>
#include <InetProtTextUtils.h>
#include <libc\string.h>
#include <charconv.h>
#include <UTF.H>
-#include <XmlEngDOMParser.h>
+#include <xml/dom/xmlengdomparser.h>
/************************************** SerXOP ****************************************/
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblockssergzip.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblockssergzip.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -23,8 +23,9 @@
#include <StifParser.h>
#include <Stiftestinterface.h>
-#include <XmlEngSerializer.h>
-#include <XmlEngBinaryContainer.h>
+
+#include <xml/dom/xmlengserializer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
#include "xmlengtesterdef.h"
#include <InetProtTextUtils.h>
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksserializer.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksserializer.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -22,10 +22,10 @@
#include <StifParser.h>
#include <Stiftestinterface.h>
-#include <XmlEngSerializer.h>
-#include <XmlEngBinaryContainer.h>
-#include <XmlEngChunkContainer.h>
-#include <XmlEngFileContainer.h>
+#include <xml/dom/xmlengserializer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
#include "xmlengtesterdef.h"
#include "TestFileOutputStream.h"
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksserxop.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksserxop.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -22,19 +22,22 @@
#include <e32std.h>
#include <StifParser.h>
#include <Stiftestinterface.h>
-#include "XmlEngBinaryContainer.h"
-#include "XmlEngChunkContainer.h"
-#include "XmlEngFileContainer.h"
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+
#include "xmlengtesterdef.h"
-#include <XmlEngSerializer.h>
-#include <XmlEngDeserializer.h>
+#include <xml/dom/xmlengserializer.h>
+#include <xml/dom/xmlengdeserializer.h>
+
#include <InetProtTextUtils.h>
#include <libc\string.h>
#include <charconv.h>
#include <UTF.H>
-#include <XmlEngDOMParser.h>
+#include <xml/dom/xmlengdomparser.h>
+
/************************************** SerXOP ****************************************/
// -----------------------------------------------------------------------------
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksutils.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksutils.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -29,7 +29,7 @@
#include <libc\string.h>
#include <charconv.h>
#include <UTF.H>
-#include <XmlEngutils.h>
+#include <xml/utils/xmlengutils.h>
using namespace Xml;
/************************************** Utils **************************************/
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksxpath.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_emulator/src/xmlengtesterblocksxpath.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -22,12 +22,12 @@
#include <StifParser.h>
#include <Stiftestinterface.h>
-#include <XmlEngXPathExtensionFunction.h>
-#include <XmlEngXPathEvaluationContext.h>
-#include <xmlengxpathconfiguration.h>
-#include <XmlEngXPathEvaluator.h>
-#include <XmlEngXPathExpression.h>
-#include <xmlengxpatherrors.h>
+#include <xml/dom/xmlengxpathextensionfunction.h>
+#include <xml/dom/xmlengxpathevaluationcontext.h>
+#include <xml/dom/xmlengxpathconfiguration.h>
+#include <xml/dom/xmlengxpathevaluator.h>
+#include <xml/dom/xmlengxpathexpression.h>
+#include <xml/dom/xmlengxpatherrors.h>
#include <Xml\Parser.h>
#include <Xml\ParserFeature.h>
@@ -35,7 +35,7 @@
#include <libc\string.h>
#include <charconv.h>
#include <UTF.H>
-#include <xmlengxpathutils.h>
+#include <xml/dom/xmlengxpathutils.h>
using namespace Xml;
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/TestConfigfiles/TestFramework/TestFramework.ini Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/TestConfigfiles/TestFramework/TestFramework.ini Thu Jul 22 16:49:54 2010 +0100
@@ -48,7 +48,7 @@
CreateTestReport= YES # Possible values: YES or NO
-TestReportFilePath= e:\LOGS\TestFramework\
+TestReportFilePath= f:\LOGS\TestFramework\
TestReportFileName= TestReport
TestReportFormat= TXT # Possible values: TXT, HTML or XML
@@ -94,49 +94,41 @@
[New_Module]
ModuleName= TestScripter
#################### Part-1 ####################
-#TestCaseFile= e:\TestFramework\conf\xmleng\Deserializer.cfg
-#TestCaseFile= e:\TestFramework\conf\xmleng\DomBinCont.cfg
-#TestCaseFile= e:\TestFramework\conf\xmleng\DomChunkCont.cfg
-#TestCaseFile= e:\TestFramework\conf\xmleng\DomChunkParser.cfg
-#TestCaseFile= e:\TestFramework\conf\xmleng\DOMDeserializer.cfg
-#TestCaseFile= e:\TestFramework\conf\xmleng\DomElem.cfg
-#TestCaseFile= e:\TestFramework\conf\xmleng\DomEncoding.cfg
-#TestCaseFile= e:\TestFramework\conf\xmleng\DomFileCont.cfg
-#TestCaseFile= e:\TestFramework\conf\xmleng\DomModif.cfg
-#
-
+TestCaseFile= f:\TestFramework\conf\xmleng\Deserializer.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\DomBinCont.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\DomChunkCont.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\DomChunkParser.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\DOMDeserializer.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\DomElem.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\DomEncoding.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\DomFileCont.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\DomModif.cfg
#################### Part-2 ####################
-#TestCaseFile= e:\TestFramework\conf\xmleng\DomNodeFilter.cfg
-#TestCaseFile= e:\TestFramework\conf\xmleng\DomNotWF.cfg
-#TestCaseFile= e:\TestFramework\conf\xmleng\DomWF.cfg //// SSG -- divided in 2 to remove a crash
- #TestCaseFile= e:\TestFramework\conf\xmleng\DomWF_part1.cfg
- #TestCaseFile= e:\TestFramework\conf\xmleng\DomWF_part2.cfg
-#TestCaseFile= e:\TestFramework\conf\xmleng\DomXmlId.cfg
-#TestCaseFile= e:\TestFramework\conf\xmleng\DomXPath.cfg
-#TestCaseFile= e:\TestFramework\conf\xmleng\IdoBat.cfg //SSG -- divided in 2 to remove crash
- #TestCaseFile= e:\TestFramework\conf\xmleng\IdoBat_part1.cfg
- #TestCaseFile= e:\TestFramework\conf\xmleng\IdoBat_part2.cfg
- #TestCaseFile= e:\TestFramework\conf\xmleng\IdoBat_part3.cfg
-#
-
-
+TestCaseFile= f:\TestFramework\conf\xmleng\DomNodeFilter.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\DomNotWF.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\DomWF.cfg //// SSG -- divided in 2 to remove a crash
+TestCaseFile= f:\TestFramework\conf\xmleng\DomWF_part1.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\DomWF_part2.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\DomXmlId.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\DomXPath.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\IdoBat.cfg //SSG -- divided in 2 to remove crash
+TestCaseFile= f:\TestFramework\conf\xmleng\IdoBat_part1.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\IdoBat_part2.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\IdoBat_part3.cfg
#################### Part-3 ####################
-#TestCaseFile= e:\TestFramework\conf\xmleng\SaxCorrect.cfg /////SSG -- divided in 3 to remove a crash
- #TestCaseFile= e:\TestFramework\conf\xmleng\SaxCorrect_part1.cfg
- #TestCaseFile= e:\TestFramework\conf\xmleng\SaxCorrect_part2.cfg
- #TestCaseFile= e:\TestFramework\conf\xmleng\SaxCorrect_part3.cfg
-#TestCaseFile= e:\TestFramework\conf\xmleng\SaxEncoding.cfg
-#TestCaseFile= e:\TestFramework\conf\xmleng\SaxNotWF.cfg
-
-
-
+TestCaseFile= f:\TestFramework\conf\xmleng\SaxCorrect.cfg /////SSG -- divided in 3 to remove a crash
+TestCaseFile= f:\TestFramework\conf\xmleng\SaxCorrect_part1.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\SaxCorrect_part2.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\SaxCorrect_part3.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\SaxEncoding.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\SaxNotWF.cfg
#################### Part-4 ####################
-TestCaseFile= e:\TestFramework\conf\xmleng\SaxWF.cfg
-TestCaseFile= e:\TestFramework\conf\xmleng\Serializer.cfg
-TestCaseFile= e:\TestFramework\conf\xmleng\Utils.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\SaxWF.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\Serializer.cfg
+TestCaseFile= f:\TestFramework\conf\xmleng\Utils.cfg
[End_Module]
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/TestConfigfiles/TestFramework/conf/xmleng/Deserializer.cfg Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/TestConfigfiles/TestFramework/conf/xmleng/Deserializer.cfg Thu Jul 22 16:49:54 2010 +0100
@@ -2,336 +2,336 @@
[Test]
title DesDefault-BufferConvinience
create xmlengtester test
-test TestDesBufferConvinience default E:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml E:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_002.xml E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-BufferConvinience_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-BufferConvinience_002.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-BufferConvinience_001.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-BufferConvinience_002.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized_002.ref
+test TestDesBufferConvinience default f:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml f:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_002.xml f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-BufferConvinience_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-BufferConvinience_002.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-BufferConvinience_001.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-BufferConvinience_002.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized_002.ref
delete test
[Endtest]
[Test]
title DesDefault-DeserializeL-Buffer1
create xmlengtester test
-test Deserialize2 default E:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializeL-Buffer1.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializeL-Buffer1.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
+test Deserialize2 default f:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializeL-Buffer1.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializeL-Buffer1.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
delete test
[Endtest]
[Test]
title DesDefault-DeserializeL-Buffer2
create xmlengtester test
-test DeserializeFromBuffer default E:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializeL-Buffer2.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializeL-Buffer2.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
+test DeserializeFromBuffer default f:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializeL-Buffer2.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializeL-Buffer2.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
delete test
[Endtest]
[Test]
title DesDefault-DeserializeL-File1
create xmlengtester test
-test Deserialize default E:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializeL-File1.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializeL-File1.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
+test Deserialize default f:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializeL-File1.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializeL-File1.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
delete test
[Endtest]
[Test]
title DesDefault-DeserializeL-File2
create xmlengtester test
-test DeserializeFromFile default E:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializeL-File2.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializeL-File2.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
+test DeserializeFromFile default f:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializeL-File2.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializeL-File2.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
delete test
[Endtest]
[Test]
title DesDefault-DeserializerBuffer
create xmlengtester test
-test TestDeserializerBuffer default E:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializerBuffer.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializerBuffer.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-DeserializerL.ref
+test TestDeserializerBuffer default f:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializerBuffer.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializerBuffer.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-DeserializerL.ref
delete test
[Endtest]
[Test]
title DesDefault-DeserializerL
create xmlengtester test
-test TestDeserializer default E:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializerL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializerL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-DeserializerL.ref
+test TestDeserializer default f:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializerL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DeserializerL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-DeserializerL.ref
delete test
[Endtest]
[Test]
title DesDefault-DisableFeatureL
create xmlengtester test
-test TestDisableFeature default E:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DisableFeatureL_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DisableFeatureL_002.out
+test TestDisableFeature default f:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DisableFeatureL_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-DisableFeatureL_002.out
delete test
[Endtest]
[Test]
title DesDefault-EnableFeatureL
create xmlengtester test
-test TestEnableFeature default E:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-EnableFeatureL_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-EnableFeatureL_002.out
+test TestEnableFeature default f:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-EnableFeatureL_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-EnableFeatureL_002.out
delete test
[Endtest]
[Test]
title DesDefault-FileConvinience
create xmlengtester test
-test TestDesFileConvinience default E:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml E:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_002.xml E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-FileConvinience_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-FileConvinience_002.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-FileConvinience_001.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-FileConvinience_002.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized_002.ref
+test TestDesFileConvinience default f:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml f:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_002.xml f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-FileConvinience_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-FileConvinience_002.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-FileConvinience_001.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-FileConvinience_002.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized_002.ref
delete test
[Endtest]
[Test]
title DesDefault-IsFeatureEnabledL
create xmlengtester test
-test TestIsFeatureEnabled default E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-IsFeatureEnabledL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-IsFeatureEnabledL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-IsFeatureEnabledL.ref
+test TestIsFeatureEnabled default f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-IsFeatureEnabledL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-IsFeatureEnabledL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-IsFeatureEnabledL.ref
delete test
[Endtest]
[Test]
title DesDefault-SetContentHandlerL
create xmlengtester test
-test TestSetContentHandler default E:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-SetContentHandlerL_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-SetContentHandlerL_002.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-SetContentHandlerL_001.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-SetContentHandlerL_002.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
+test TestSetContentHandler default f:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-SetContentHandlerL_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-SetContentHandlerL_002.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-SetContentHandlerL_001.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-SetContentHandlerL_002.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
delete test
[Endtest]
[Test]
title DesDefault-SetInputBufferL
create xmlengtester test
-test TestSetInputBuffer default E:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-SetInputBufferL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-SetInputBufferL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
+test TestSetInputBuffer default f:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-SetInputBufferL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-SetInputBufferL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
delete test
[Endtest]
[Test]
title DesDefault-SetInputFileL
create xmlengtester test
-test TestSetInputFile default E:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-SetInputFileL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-SetInputFileL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
+test TestSetInputFile default f:\testing\data\xmleng\efute\input\deserializer\correct\default\SerDefault_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-SetInputFileL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\default\DesDefault-SetInputFileL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\default\DesDefault-deserialized.ref
delete test
[Endtest]
[Test]
title DesGZIP-BufferConvinience
create xmlengtester test
-test TestDesBufferConvinience gzip E:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-Buffer_001.gz E:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-Buffer_002.gz E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-BufferConvinience_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-BufferConvinience_002.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-BufferConvinience_001.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-BufferConvinience_002.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-BufferConvinience_002.ref
+test TestDesBufferConvinience gzip f:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-Buffer_001.gz f:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-Buffer_002.gz f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-BufferConvinience_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-BufferConvinience_002.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-BufferConvinience_001.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-BufferConvinience_002.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-BufferConvinience_002.ref
delete test
[Endtest]
[Test]
title DesGZIP-DeserializeL-Buffer1
create xmlengtester test
-test Deserialize2 gzip E:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-Buffer_001.gz E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializeL-Buffer1.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializeL-Buffer1.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
+test Deserialize2 gzip f:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-Buffer_001.gz f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializeL-Buffer1.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializeL-Buffer1.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
delete test
[Endtest]
[Test]
title DesGZIP-DeserializeL-Buffer2
create xmlengtester test
-test DeserializeFromBuffer gzip E:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-Buffer_001.gz E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializeL-Buffer2.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializeL-Buffer2.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
+test DeserializeFromBuffer gzip f:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-Buffer_001.gz f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializeL-Buffer2.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializeL-Buffer2.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
delete test
[Endtest]
[Test]
title DesGZIP-DeserializeL-File1
create xmlengtester test
-test Deserialize gzip E:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-File_001.gz E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializeL-File1.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializeL-File1.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
+test Deserialize gzip f:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-File_001.gz f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializeL-File1.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializeL-File1.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
delete test
[Endtest]
[Test]
title DesGZIP-DeserializeL-File2
create xmlengtester test
-test DeserializeFromFile gzip E:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-File_001.gz E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializeL-File2.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializeL-File2.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
+test DeserializeFromFile gzip f:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-File_001.gz f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializeL-File2.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializeL-File2.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
delete test
[Endtest]
[Test]
title DesGZIP-DeserializerBuffer
create xmlengtester test
-test TestDeserializerBuffer gzip E:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-Buffer_001.gz E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializerBuffer.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializerBuffer.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-DeserializerL.ref
+test TestDeserializerBuffer gzip f:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-Buffer_001.gz f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializerBuffer.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializerBuffer.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-DeserializerL.ref
delete test
[Endtest]
[Test]
title DesGZIP-DeserializerL
create xmlengtester test
-test TestDeserializer gzip E:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-File_001.gz E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializerL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializerL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-DeserializerL.ref
+test TestDeserializer gzip f:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-File_001.gz f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializerL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DeserializerL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-DeserializerL.ref
delete test
[Endtest]
[Test]
title DesGZIP-DisableFeatureL
create xmlengtester test
-test TestDisableFeature gzip E:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-File_001.gz E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DisableFeatureL_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DisableFeatureL_002.out
+test TestDisableFeature gzip f:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-File_001.gz f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DisableFeatureL_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-DisableFeatureL_002.out
delete test
[Endtest]
[Test]
title DesGZIP-EnableFeatureL
create xmlengtester test
-test TestEnableFeature gzip E:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-File_001.gz E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-EnableFeatureL_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-EnableFeatureL_002.out
+test TestEnableFeature gzip f:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-File_001.gz f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-EnableFeatureL_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-EnableFeatureL_002.out
delete test
[Endtest]
[Test]
title DesGZIP-FileConvinience
create xmlengtester test
-test TestDesFileConvinience gzip E:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-File_001.gz E:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-File_002.gz E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-FileConvinience_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-FileConvinience_002.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-FileConvinience_001.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-FileConvinience_002.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-FileConvinience_002.ref
+test TestDesFileConvinience gzip f:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-File_001.gz f:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-File_002.gz f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-FileConvinience_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-FileConvinience_002.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-FileConvinience_001.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-FileConvinience_002.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-FileConvinience_002.ref
delete test
[Endtest]
[Test]
title DesGZIP-IsFeatureEnabledL
create xmlengtester test
-test TestIsFeatureEnabled gzip E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-IsFeatureEnabledL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-IsFeatureEnabledL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-IsFeatureEnabledL.ref
+test TestIsFeatureEnabled gzip f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-IsFeatureEnabledL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-IsFeatureEnabledL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-IsFeatureEnabledL.ref
delete test
[Endtest]
[Test]
title DesGZIP-SetContentHandlerL
create xmlengtester test
-test TestSetContentHandler gzip E:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-File_001.gz E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-SetContentHandlerL_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-SetContentHandlerL_002.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-SetContentHandlerL_001.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-SetContentHandlerL_002.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
+test TestSetContentHandler gzip f:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-File_001.gz f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-SetContentHandlerL_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-SetContentHandlerL_002.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-SetContentHandlerL_001.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-SetContentHandlerL_002.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
delete test
[Endtest]
[Test]
title DesGZIP-SetInputBufferL
create xmlengtester test
-test TestSetInputBuffer gzip E:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-Buffer_001.gz E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-SetInputBufferL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-SetInputBufferL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
+test TestSetInputBuffer gzip f:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-Buffer_001.gz f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-SetInputBufferL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-SetInputBufferL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
delete test
[Endtest]
[Test]
title DesGZIP-SetInputFileL
create xmlengtester test
-test TestSetInputFile gzip E:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-File_001.gz E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-SetInputFileL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-SetInputFileL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
+test TestSetInputFile gzip f:\testing\data\xmleng\efute\input\deserializer\correct\gzip\SerGZIP-File_001.gz f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-SetInputFileL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\gzip\DesGZIP-SetInputFileL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\gzip\DesGZIP-deserialized.ref
delete test
[Endtest]
[Test]
title DesXOP-BufferConvinience
create xmlengtester test
-test TestDesBufferConvinience xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml E:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_003.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-BufferConvinience_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-BufferConvinience_002.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-BufferConvinience_001.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-BufferConvinience_002.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized_003.ref
+test TestDesBufferConvinience xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml f:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_003.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-BufferConvinience_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-BufferConvinience_002.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-BufferConvinience_001.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-BufferConvinience_002.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized_003.ref
delete test
[Endtest]
[Test]
title DesXOP-DefaultNamespace
create xmlengtester test
-test Deserialize xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\DefaultNamespace.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DefaultNamespace.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DefaultNamespace.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-DefaultNamespace.ref
+test Deserialize xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\DefaultNamespace.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DefaultNamespace.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DefaultNamespace.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-DefaultNamespace.ref
delete test
[Endtest]
[Test]
title DesXOP-DeserializeL-Buffer1
create xmlengtester test
-test Deserialize2 xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializeL-Buffer1.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializeL-Buffer1.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
+test Deserialize2 xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializeL-Buffer1.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializeL-Buffer1.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
delete test
[Endtest]
[Test]
title DesXOP-DeserializeL-Buffer2
create xmlengtester test
-test DeserializeFromBuffer xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializeL-Buffer2.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializeL-Buffer2.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
+test DeserializeFromBuffer xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializeL-Buffer2.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializeL-Buffer2.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
delete test
[Endtest]
[Test]
title DesXOP-DeserializeL-File1
create xmlengtester test
-test Deserialize xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializeL-File1.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializeL-File1.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
+test Deserialize xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializeL-File1.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializeL-File1.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
delete test
[Endtest]
[Test]
title DesXOP-DeserializeL-File2
create xmlengtester test
-test DeserializeFromFile xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializeL-File2.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializeL-File2.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
+test DeserializeFromFile xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializeL-File2.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializeL-File2.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
delete test
[Endtest]
[Test]
title DesXOP-DeserializerBuffer
create xmlengtester test
-test TestDeserializerBuffer xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializerBuffer.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializerBuffer.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-DeserializerL.ref
+test TestDeserializerBuffer xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializerBuffer.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializerBuffer.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-DeserializerL.ref
delete test
[Endtest]
[Test]
title DesXOP-DeserializerL
create xmlengtester test
-test TestDeserializer xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializerL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializerL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-DeserializerL.ref
+test TestDeserializer xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializerL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DeserializerL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-DeserializerL.ref
delete test
[Endtest]
[Test]
title DesXOP-DisableFeatureL
create xmlengtester test
-test TestDisableFeature xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DisableFeatureL_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DisableFeatureL_002.out
+test TestDisableFeature xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DisableFeatureL_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-DisableFeatureL_002.out
delete test
[Endtest]
[Test]
title DesXOP-EnableFeatureL
create xmlengtester test
-test TestEnableFeature xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-EnableFeatureL_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-EnableFeatureL_002.out
+test TestEnableFeature xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-EnableFeatureL_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-EnableFeatureL_002.out
delete test
[Endtest]
[Test]
title DesXOP-ExternalDataL
create xmlengtester test
-test TestExternalData xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_002.xml E:\testing\data\xmleng\efute\input\containers\login.gif E:\testing\data\xmleng\efute\input\containers\text.zip E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-ExternalDataL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-ExternalDataL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-external-data.ref
+test TestExternalData xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_002.xml f:\testing\data\xmleng\efute\input\containers\login.gif f:\testing\data\xmleng\efute\input\containers\text.zip f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-ExternalDataL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-ExternalDataL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-external-data.ref
delete test
[Endtest]
[Test]
title DesXOP-FileConvinience
create xmlengtester test
-test TestDesFileConvinience xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml E:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_003.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-FileConvinience_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-FileConvinience_002.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-FileConvinience_001.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-FileConvinience_002.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized_003.ref
+test TestDesFileConvinience xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml f:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_003.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-FileConvinience_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-FileConvinience_002.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-FileConvinience_001.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-FileConvinience_002.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized_003.ref
delete test
[Endtest]
[Test]
title DesXOP-IdNotMatchData
create xmlengtester test
-test DeserializeFromBuffer xop E:\testing\data\xmleng\efute\input\deserializer\dirty\xop\IdNotMatchData.xml E:\testing\data\xmleng\efute\output\deserializer\dirty\xop\DesXOP-IdNotMatchData.out -32385
+test DeserializeFromBuffer xop f:\testing\data\xmleng\efute\input\deserializer\dirty\xop\IdNotMatchData.xml f:\testing\data\xmleng\efute\output\deserializer\dirty\xop\DesXOP-IdNotMatchData.out -32385
delete test
[Endtest]
[Test]
title DesXOP-IdNotUnique
create xmlengtester test
-test DeserializeFromBuffer xop E:\testing\data\xmleng\efute\input\deserializer\dirty\xop\IdNotUnique.xml E:\testing\data\xmleng\efute\output\deserializer\dirty\xop\DesXOP-IdNotUnique.out -11
+test DeserializeFromBuffer xop f:\testing\data\xmleng\efute\input\deserializer\dirty\xop\IdNotUnique.xml f:\testing\data\xmleng\efute\output\deserializer\dirty\xop\DesXOP-IdNotUnique.out -11
delete test
[Endtest]
@@ -340,81 +340,81 @@
[Test]
title DesXOP-IncludeChildrens
create xmlengtester test
-test Deserialize xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\IncludeChildrens.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-IncludeChildrens.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-IncludeChildrens.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-IncludeChildrens.ref
+test Deserialize xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\IncludeChildrens.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-IncludeChildrens.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-IncludeChildrens.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-IncludeChildrens.ref
delete test
[Endtest]
[Test]
title DesXOP-IsFeatureEnabledL
create xmlengtester test
-test TestIsFeatureEnabled xop E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-IsFeatureEnabledL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-IsFeatureEnabledL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-IsFeatureEnabledL.ref
+test TestIsFeatureEnabled xop f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-IsFeatureEnabledL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-IsFeatureEnabledL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-IsFeatureEnabledL.ref
delete test
[Endtest]
[Test]
title DesXOP-NamespaceHref
create xmlengtester test
-test Deserialize xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\NamespaceHref.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-NamespaceHref.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-NamespaceHref.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-NamespaceHref.ref
+test Deserialize xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\NamespaceHref.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-NamespaceHref.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-NamespaceHref.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-NamespaceHref.ref
delete test
[Endtest]
[Test]
title DesXOP-NamespaceOnHref
create xmlengtester test
-test Deserialize xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\NamespaceOnHref.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-NamespaceOnHref.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-NamespaceOnHref.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-NamespaceOnHref.ref
+test Deserialize xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\NamespaceOnHref.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-NamespaceOnHref.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-NamespaceOnHref.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-NamespaceOnHref.ref
delete test
[Endtest]
[Test]
title DesXOP-NoHref
create xmlengtester test
-test Deserialize xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\NoHref.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-NoHref.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-NoHref.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-NoHref.ref
+test Deserialize xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\NoHref.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-NoHref.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-NoHref.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-NoHref.ref
delete test
[Endtest]
[Test]
title DesXOP-PrefixXop
create xmlengtester test
-test Deserialize xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\PrefixXop.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-PrefixXop.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-PrefixXop.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-PrefixXop.ref
+test Deserialize xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\PrefixXop.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-PrefixXop.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-PrefixXop.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-PrefixXop.ref
delete test
[Endtest]
[Test]
title DesXOP-SetContentHandlerL
create xmlengtester test
-test TestSetContentHandler xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetContentHandlerL_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetContentHandlerL_002.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetContentHandlerL_001.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetContentHandlerL_002.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
+test TestSetContentHandler xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetContentHandlerL_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetContentHandlerL_002.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetContentHandlerL_001.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetContentHandlerL_002.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
delete test
[Endtest]
[Test]
title DesXOP-SetInputBufferL
create xmlengtester test
-test TestSetInputBuffer xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetInputBufferL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetInputBufferL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
+test TestSetInputBuffer xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetInputBufferL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetInputBufferL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
delete test
[Endtest]
[Test]
title DesXOP-SetInputFileL
create xmlengtester test
-test TestSetInputFile xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetInputFileL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetInputFileL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
+test TestSetInputFile xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetInputFileL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetInputFileL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-deserialized.ref
delete test
[Endtest]
[Test]
title DesXOP-SetParsingOptions1L
create xmlengtester test
-test TestSetParsingOptions1 xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetParsingOptions1L.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetParsingOptions1L.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-SetParsingOptions1L.ref
+test TestSetParsingOptions1 xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetParsingOptions1L.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-SetParsingOptions1L.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-SetParsingOptions1L.ref
delete test
[Endtest]
@@ -422,7 +422,7 @@
[Test]
title DesXOP-SpaceInHref
create xmlengtester test
-test DeserializeFromBuffer xop E:\testing\data\xmleng\efute\input\deserializer\dirty\xop\SpaceInHref.xml E:\testing\data\xmleng\efute\output\deserializer\dirty\xop\DesXOP-SpaceInHref.out -32385
+test DeserializeFromBuffer xop f:\testing\data\xmleng\efute\input\deserializer\dirty\xop\SpaceInHref.xml f:\testing\data\xmleng\efute\output\deserializer\dirty\xop\DesXOP-SpaceInHref.out -32385
delete test
[Endtest]
@@ -431,184 +431,184 @@
[Test]
title DesXOP-UseExternalDataL
create xmlengtester test
-test TestUseExternalData xop E:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_002.xml E:\testing\data\xmleng\efute\input\containers\login.gif E:\testing\data\xmleng\efute\input\containers\text.zip E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-UseExternalDataL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-UseExternalDataL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-external-data.ref
+test TestUseExternalData xop f:\testing\data\xmleng\efute\input\deserializer\correct\xop\SerXOP_002.xml f:\testing\data\xmleng\efute\input\containers\login.gif f:\testing\data\xmleng\efute\input\containers\text.zip f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-UseExternalDataL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\xop\DesXOP-UseExternalDataL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\xop\DesXOP-external-data.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-BufferConvinience
create xmlengtester test
-test TestDesBufferConvinienceInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_003.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-BufferConvinience_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-BufferConvinience_002.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-BufferConvinience_001.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-BufferConvinience_002.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized_003.ref
+test TestDesBufferConvinienceInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_003.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-BufferConvinience_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-BufferConvinience_002.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-BufferConvinience_001.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-BufferConvinience_002.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized_003.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-DefaultNamespace
create xmlengtester test
-test DeserializeInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\DefaultNamespace.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DefaultNamespace.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DefaultNamespace.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-DefaultNamespace.ref
+test DeserializeInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\DefaultNamespace.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DefaultNamespace.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DefaultNamespace.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-DefaultNamespace.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-DeserializeL-Buffer1
create xmlengtester test
-test Deserialize2Infoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializeL-Buffer1.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializeL-Buffer1.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
+test Deserialize2Infoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializeL-Buffer1.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializeL-Buffer1.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-DeserializeL-Buffer2
create xmlengtester test
-test DeserializeFromBufferInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializeL-Buffer2.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializeL-Buffer2.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
+test DeserializeFromBufferInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializeL-Buffer2.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializeL-Buffer2.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-DeserializeL-File1
create xmlengtester test
-test DeserializeInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializeL-File1.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializeL-File1.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
+test DeserializeInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializeL-File1.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializeL-File1.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-DeserializeL-File2
create xmlengtester test
-test DeserializeFromFileInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializeL-File2.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializeL-File2.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
+test DeserializeFromFileInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializeL-File2.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializeL-File2.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-DeserializerBuffer
create xmlengtester test
-test TestDeserializerBufferInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializerBuffer.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializerBuffer.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-DeserializerL.ref
+test TestDeserializerBufferInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializerBuffer.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializerBuffer.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-DeserializerL.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-DeserializerL
create xmlengtester test
-test TestDeserializerInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializerL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializerL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-DeserializerL.ref
+test TestDeserializerInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializerL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DeserializerL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-DeserializerL.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-DisableFeatureL
create xmlengtester test
-test TestDisableFeatureInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DisableFeatureL_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DisableFeatureL_002.out
+test TestDisableFeatureInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DisableFeatureL_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-DisableFeatureL_002.out
delete test
[Endtest]
[Test]
title DesInfosetXOP-EnableFeatureL
create xmlengtester test
-test TestEnableFeatureInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-EnableFeatureL_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-EnableFeatureL_002.out
+test TestEnableFeatureInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-EnableFeatureL_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-EnableFeatureL_002.out
delete test
[Endtest]
[Test]
title DesInfosetXOP-ExternalDataL
create xmlengtester test
-test TestExternalDataInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_002.xml E:\testing\data\xmleng\efute\input\containers\login.gif E:\testing\data\xmleng\efute\input\containers\text.zip E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-ExternalDataL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-ExternalDataL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-external-data.ref
+test TestExternalDataInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_002.xml f:\testing\data\xmleng\efute\input\containers\login.gif f:\testing\data\xmleng\efute\input\containers\text.zip f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-ExternalDataL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-ExternalDataL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-external-data.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-FileConvinience
create xmlengtester test
-test TestDesFileConvinienceInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_003.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-FileConvinience_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-FileConvinience_002.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-FileConvinience_001.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-FileConvinience_002.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized_003.ref
+test TestDesFileConvinienceInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_003.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-FileConvinience_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-FileConvinience_002.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-FileConvinience_001.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-FileConvinience_002.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized_003.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-IncludeChildrens
create xmlengtester test
-test DeserializeInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\IncludeChildrens.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-IncludeChildrens.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-IncludeChildrens.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-IncludeChildrens.ref
+test DeserializeInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\IncludeChildrens.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-IncludeChildrens.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-IncludeChildrens.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-IncludeChildrens.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-IsFeatureEnabledL
create xmlengtester test
-test TestIsFeatureEnabledInfoset infoset E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-IsFeatureEnabledL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-IsFeatureEnabledL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-IsFeatureEnabledL.ref
+test TestIsFeatureEnabledInfoset infoset f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-IsFeatureEnabledL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-IsFeatureEnabledL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-IsFeatureEnabledL.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-NamespaceHref
create xmlengtester test
-test DeserializeInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\NamespaceHref.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-NamespaceHref.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-NamespaceHref.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-NamespaceHref.ref
+test DeserializeInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\NamespaceHref.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-NamespaceHref.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-NamespaceHref.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-NamespaceHref.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-NamespaceOnHref
create xmlengtester test
-test DeserializeInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\NamespaceOnHref.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-NamespaceOnHref.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-NamespaceOnHref.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-NamespaceOnHref.ref
+test DeserializeInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\NamespaceOnHref.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-NamespaceOnHref.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-NamespaceOnHref.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-NamespaceOnHref.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-NoHref
create xmlengtester test
-test DeserializeInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\NoHref.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-NoHref.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-NoHref.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-NoHref.ref
+test DeserializeInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\NoHref.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-NoHref.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-NoHref.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-NoHref.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-PrefixXop
create xmlengtester test
-test DeserializeInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\PrefixXop.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-PrefixXop.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-PrefixXop.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-PrefixXop.ref
+test DeserializeInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\PrefixXop.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-PrefixXop.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-PrefixXop.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-PrefixXop.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-SetContentHandlerL
create xmlengtester test
-test TestSetContentHandlerInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-SetContentHandlerL_001.out E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-SetContentHandlerL_002.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-SetContentHandlerL_001.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-SetContentHandlerL_002.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
+test TestSetContentHandlerInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-SetContentHandlerL_001.out f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-SetContentHandlerL_002.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-SetContentHandlerL_001.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-SetContentHandlerL_002.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-SetInputBufferL
create xmlengtester test
-test TestSetInputBufferInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-SetInputBufferL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-SetInputBufferL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
+test TestSetInputBufferInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-SetInputBufferL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-SetInputBufferL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-SetInputFileL
create xmlengtester test
-test TestSetInputFileInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-SetInputFileL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-SetInputFileL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
+test TestSetInputFileInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_001.xml f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-SetInputFileL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-SetInputFileL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-deserialized.ref
delete test
[Endtest]
[Test]
title DesInfosetXOP-UseExternalDataL
create xmlengtester test
-test TestUseExternalDataInfoset infoset E:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_002.xml E:\testing\data\xmleng\efute\input\containers\login.gif E:\testing\data\xmleng\efute\input\containers\text.zip E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-UseExternalDataL.out
-test CompareFiles E:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-UseExternalDataL.out E:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-external-data.ref
+test TestUseExternalDataInfoset infoset f:\testing\data\xmleng\efute\input\deserializer\correct\infosetxop\SerInfosetXOP_002.xml f:\testing\data\xmleng\efute\input\containers\login.gif f:\testing\data\xmleng\efute\input\containers\text.zip f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-UseExternalDataL.out
+test CompareFiles f:\testing\data\xmleng\efute\output\deserializer\correct\infosetxop\DesInfosetXOP-UseExternalDataL.out f:\testing\data\xmleng\efute\pattern\deserializer\correct\infosetxop\DesInfosetXOP-external-data.ref
delete test
[Endtest]
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/group/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -20,4 +20,4 @@
PRJ_TESTEXPORTS
../rom/xmlengtester.iby /epoc32/rom/include/xmlengtester.iby
-../rom/stifftests.iby /epoc32/rom/include/stifftests.iby
\ No newline at end of file
+../rom/stifftests.iby /epoc32/rom/include/stifftests.iby
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/group/xmlengtester.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/group/xmlengtester.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -28,27 +28,27 @@
CAPABILITY ALL -TCB
SOURCEPATH ../src
-SOURCE xmlengtester.cpp
-SOURCE xmlengtesterblocks.cpp
-SOURCE xmlengtesterblocksutils.cpp
-SOURCE xmlengtesterblockssax.cpp
-SOURCE xmlengtesterblocksdom.cpp
-SOURCE xmlengtesterblocksxpath.cpp
-SOURCE xmlengtesterblockschunkcont.cpp
-SOURCE xmlengtesterblocksfilecont.cpp
-SOURCE xmlengtesterblocksbincont.cpp
-SOURCE xmlengtesterblocksserializer.cpp
-SOURCE xmlengtesterblocksserdefault.cpp
-SOURCE xmlengtesterblocksserxop.cpp
-SOURCE xmlengtesterblockssergzip.cpp
-SOURCE xmlengtesterblocksaddfun.cpp
-SOURCE xmlengtesterblocksdeserialize.cpp
-SOURCE xmlengtesterblocksdesinfoset.cpp
-SOURCE xmlengtesterblocksdeserializedom.cpp
-SOURCE testcontenthandler.cpp
-SOURCE xmloutputcontenthandler.cpp
-SOURCE testfileoutputstream.cpp
-SOURCE testbuffermanager.cpp
+SOURCE xmlengtester.cpp
+SOURCE xmlengtesterblocks.cpp
+SOURCE xmlengtesterblocksutils.cpp
+SOURCE xmlengtesterblockssax.cpp
+SOURCE xmlengtesterblocksdom.cpp
+SOURCE xmlengtesterblocksxpath.cpp
+SOURCE xmlengtesterblockschunkcont.cpp
+SOURCE xmlengtesterblocksfilecont.cpp
+SOURCE xmlengtesterblocksbincont.cpp
+SOURCE xmlengtesterblocksserializer.cpp
+SOURCE xmlengtesterblocksserdefault.cpp
+SOURCE xmlengtesterblocksserxop.cpp
+SOURCE xmlengtesterblockssergzip.cpp
+SOURCE xmlengtesterblocksaddfun.cpp
+SOURCE xmlengtesterblocksdeserialize.cpp
+SOURCE xmlengtesterblocksdesinfoset.cpp
+SOURCE xmlengtesterblocksdeserializedom.cpp
+SOURCE testcontenthandler.cpp
+SOURCE xmloutputcontenthandler.cpp
+SOURCE testfileoutputstream.cpp
+SOURCE testbuffermanager.cpp
USERINCLUDE ../inc
//USERINCLUDE ../../../../../../../unref/orphan/comgen/syslibs/xml/inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/group/xmlengtester.pkg Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,31 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;Xmlengtester.pkg
+
+; Languages -
+&EN
+
+; Installation header
+#{"Xmlengtester"}, (0x2003262B), 1, 0, 0, TYPE=SA
+%{"Nokia Corporation"}
+:"Nokia Corporation"
+
+(0x101f7961),0, 0, 0 ,{"Series60ProductID"}
+
+; Test DLL's
+"\epoc32\release\armv5\urel\xmlengtester.dll" - "c:\sys\bin\xmlengtester.dll"
+
+"..\TestConfigfiles\Testframework\testframework.ini" - "c:\testframework\testframework.ini"
+
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/inc/testcontenthandler.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/inc/testcontenthandler.h Thu Jul 22 16:49:54 2010 +0100
@@ -16,7 +16,7 @@
#ifndef __TESTCONTENTHANDLER_H__
#define __TESTCONTENTHANDLER_H__
-#include "XmlEngExtendedContentHandler.h"
+#include <xml/dom/xmlengextendedcontenthandler.h>
#include <Xml\DocumentParameters.h>
#include <Xml\ContentHandler.h>
#include <f32file.h>
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/inc/testfileoutputstream.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/inc/testfileoutputstream.h Thu Jul 22 16:49:54 2010 +0100
@@ -19,7 +19,7 @@
#define CTestFileOutputStream_H_INCLUDED
#include <f32file.h>
-#include "XmlEngOutputStream.h"
+#include <xml/dom/xmlengoutputstream.h>
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/inc/xmlengtester.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/inc/xmlengtester.h Thu Jul 22 16:49:54 2010 +0100
@@ -25,16 +25,16 @@
#include <f32file.h>
#include <Xml\XmlParserErrors.h>
-#include <xmlengdom.h>
-#include <XmlEngErrors.h>
+#include <xml/dom/xmlengdom.h>
+#include <xml/dom/xmlengerrors.h>
// This include is not required anymore.
// #include <XmlEngXPathObject.h>
-#include <XmlEngDOMParser.h>
+#include <xml/dom/xmlengdomparser.h>
-#include "XmlEngDeserializer.h"
-#include "XmlEngDeserializerDOM.h"
-#include "XmlEngSerializer.h"
-#include <XmlEngXPathResult.h>
+#include <xml/dom/xmlengdeserializer.h>
+#include <xml/dom/xmlengdeserializerdom.h>
+#include <xml/dom/xmlengserializer.h>
+#include <xml/dom/xmlengxpathresult.h>
// CONSTANTS
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/rom/xmlengtester.iby Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/rom/xmlengtester.iby Thu Jul 22 16:49:54 2010 +0100
@@ -19,4 +19,5 @@
file=ABI_DIR\BUILD_DIR\xmlengtester.dll SHARED_LIB_DIR\xmlengtester.dll
+
#endif //__XMLENGTESTER_IBY__
\ No newline at end of file
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/testcontenthandler.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/testcontenthandler.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -264,7 +264,7 @@
User::LeaveIfError(fs.Connect());
RFile f;
CleanupClosePushL(f);
- TInt err = f.Replace(fs, _L("c:\\xmlengine\\deserializer\\output\\bin.doc"), EFileWrite);
+ TInt err = f.Replace(fs, _L("f:\\xmlengine\\deserializer\\output\\bin.doc"), EFileWrite);
err = f.Write(aBytes);
CleanupStack::PopAndDestroy(2); //f fs
*/
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtester.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtester.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -17,7 +17,7 @@
// INCLUDE FILES
#include "xmlengtester.h"
#include "xmlengtesterdef.h"
-#include <XmlEngxestd.h>
+#include <xml/utils/xmlengxestd.h>
#include <Stiftestinterface.h>
#include <sys/reent.h>
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksaddfun.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksaddfun.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -23,14 +23,14 @@
#include <StifParser.h>
#include <Stiftestinterface.h>
-#include <XmlEngBinaryContainer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
#include "xmlengtesterdef.h"
#include <InetProtTextUtils.h>
#include <libc\string.h>
#include <charconv.h>
#include <UTF.H>
-#include <XmlEngSerializer.h>
+#include <xml/dom/xmlengserializer.h>
/************************************** AddFun ****************************************/
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksbincont.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksbincont.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -22,8 +22,9 @@
#include <StifParser.h>
#include <Stiftestinterface.h>
-#include <XmlEngBinaryContainer.h>
-#include <XmlEngFileContainer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+
#include "xmlengtesterdef.h"
#include <InetProtTextUtils.h>
@@ -494,7 +495,7 @@
_LIT(KBinaryError,"BinaryContainer Error GetList..");
_LIT(KEndParsing,"Checking BinaryContainer GetList end.");
TBufC8<100> cid(_L8("123456789@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -576,7 +577,7 @@
_LIT(KBinaryError,"BinaryContainer Error GetList..");
_LIT(KEndParsing,"Checking BinaryContainer GetList end.");
TBufC8<100> cid(_L8("123456789@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -618,9 +619,9 @@
_LIT(KEndParsing,"Checking BinaryContainer end.");
TBufC8<100> cid(_L8("123456789@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -704,9 +705,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -792,9 +793,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -879,9 +880,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -955,9 +956,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -1035,9 +1036,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -1135,9 +1136,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -1254,9 +1255,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -1363,9 +1364,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -1468,9 +1469,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -1597,9 +1598,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -1704,9 +1705,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -1779,9 +1780,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -1906,9 +1907,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -2062,9 +2063,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -2193,9 +2194,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -2323,9 +2324,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -2456,9 +2457,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -2588,9 +2589,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -2720,9 +2721,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblockschunkcont.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblockschunkcont.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -18,10 +18,12 @@
#include "TestContentHandler.h"
#include "xmlengtester.h"
//#include "XmlEngDOMChunkParser.h"
-#include "XmlEngChunkContainer.h"
-#include "XmlEngBinaryContainer.h"
-#include "XmlEngFileContainer.h"
-#include "XmlEngNode.h"
+
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+
+#include <xml/dom/xmlengnode.h>
#include <e32svr.h>
#include <StifParser.h>
#include <Stiftestinterface.h>
@@ -627,7 +629,7 @@
el.AppendChildL(binData2);
// (3.) some other data
- _LIT(KInputFile1, "E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile1, "f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
_LIT8(KCid, "111");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksdeserialize.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksdeserialize.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -23,7 +23,7 @@
#include <StifParser.h>
#include <Stiftestinterface.h>
-#include <XmlEngDeserializer.h>
+#include <xml/dom/xmlengserializer.h>
#include <Xml\ParserFeature.h>
#include "xmlengtesterdef.h"
@@ -32,11 +32,13 @@
#include <charconv.h>
#include <UTF.H>
-#include "XmlEngBinaryContainer.h"
-#include "XmlEngChunkContainer.h"
-#include "XmlEngFileContainer.h"
-#include "XmlEngDataContainer.h"
-#include <xmlengparsingoptions.h>
+
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengdatacontainer.h>
+
+#include <xml/dom/xmlengparsingoptions.h>
// -----------------------------------------------------------------------------
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksdeserializedom.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksdeserializedom.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -23,8 +23,8 @@
#include <StifParser.h>
#include <Stiftestinterface.h>
-#include <XmlEngDeserializer.h>
-#include <XmlEngDeserializerDOM.h>
+#include <xml/dom/xmlengdeserializer.h>
+#include <xml/dom/xmlengdeserializerdom.h>
#include "xmlengtesterdef.h"
#include <InetProtTextUtils.h>
@@ -32,10 +32,11 @@
#include <charconv.h>
#include <UTF.H>
-#include "XmlEngBinaryContainer.h"
-#include "XmlEngChunkContainer.h"
-#include "XmlEngFileContainer.h"
-#include "XmlEngDataContainer.h"
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengdatacontainer.h>
+
TInt CLibxml2Tester::DOMDeserializeL( CStifItemParser& aItem)
{
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksdesinfoset.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksdesinfoset.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -22,8 +22,7 @@
#include <e32std.h>
#include <StifParser.h>
#include <Stiftestinterface.h>
-
-#include <XmlEngDeserializer.h>
+#include <xml/dom/xmlengdeserializer.h>
#include <Xml\ParserFeature.h>
#include "xmlengtesterdef.h"
@@ -32,10 +31,10 @@
#include <charconv.h>
#include <UTF.H>
-#include "XmlEngBinaryContainer.h"
-#include "XmlEngChunkContainer.h"
-#include "XmlEngFileContainer.h"
-#include "XmlEngDataContainer.h"
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengdatacontainer.h>
// -----------------------------------------------------------------------------
@@ -81,7 +80,7 @@
aRFs.Connect();
CleanupClosePushL( aRFs );
RFile fp;
- User::LeaveIfError( fp.Open(aRFs, _L("E:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
+ User::LeaveIfError( fp.Open(aRFs, _L("f:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
CleanupClosePushL(fp);
TXmlEngBinaryContainer bincont = iDoc.CreateBinaryContainerL(CID_1(), contbuff);
TXmlEngChunkContainer chunkcont = iDoc.CreateChunkContainerL(CID_2(), chunk, offset, binarySize);
@@ -178,7 +177,7 @@
aRFs.Connect();
CleanupClosePushL( aRFs );
RFile fp;
- User::LeaveIfError( fp.Open(aRFs, _L("E:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
+ User::LeaveIfError( fp.Open(aRFs, _L("f:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
CleanupClosePushL(fp);
TXmlEngBinaryContainer bincont = iDoc.CreateBinaryContainerL(CID_1(), contbuff);
TXmlEngChunkContainer chunkcont = iDoc.CreateChunkContainerL(CID_2(), chunk, offset, binarySize);
@@ -279,7 +278,7 @@
aRFs.Connect();
CleanupClosePushL( aRFs );
RFile fp;
- User::LeaveIfError( fp.Open(aRFs, _L("E:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
+ User::LeaveIfError( fp.Open(aRFs, _L("f:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
CleanupClosePushL(fp);
TXmlEngBinaryContainer bincont = iDoc.CreateBinaryContainerL(CID_1(), contbuff);
TXmlEngChunkContainer chunkcont = iDoc.CreateChunkContainerL(CID_2(), chunk, offset, binarySize);
@@ -379,7 +378,7 @@
aRFs.Connect();
CleanupClosePushL( aRFs );
RFile fp;
- User::LeaveIfError( fp.Open(aRFs, _L("E:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
+ User::LeaveIfError( fp.Open(aRFs, _L("f:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
CleanupClosePushL(fp);
TXmlEngBinaryContainer bincont = iDoc.CreateBinaryContainerL(CID_1(), contbuff);
TXmlEngChunkContainer chunkcont = iDoc.CreateChunkContainerL(CID_2(), chunk, offset, binarySize);
@@ -465,7 +464,7 @@
aRFs.Connect();
CleanupClosePushL( aRFs );
RFile fp;
- User::LeaveIfError( fp.Open(aRFs, _L("E:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
+ User::LeaveIfError( fp.Open(aRFs, _L("f:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
CleanupClosePushL(fp);
TXmlEngBinaryContainer bincont = iDoc.CreateBinaryContainerL(CID_1(), contbuff);
TXmlEngChunkContainer chunkcont = iDoc.CreateChunkContainerL(CID_2(), chunk, offset, binarySize);
@@ -544,7 +543,7 @@
aRFs.Connect();
CleanupClosePushL( aRFs );
RFile fp;
- User::LeaveIfError( fp.Open(aRFs, _L("E:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
+ User::LeaveIfError( fp.Open(aRFs, _L("f:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
CleanupClosePushL(fp);
TXmlEngBinaryContainer bincont = iDoc.CreateBinaryContainerL(CID_1(), contbuff);
TXmlEngChunkContainer chunkcont = iDoc.CreateChunkContainerL(CID_2(), chunk, offset, binarySize);
@@ -609,7 +608,7 @@
aRFs.Connect();
CleanupClosePushL( aRFs );
RFile fp;
- User::LeaveIfError( fp.Open(aRFs, _L("E:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
+ User::LeaveIfError( fp.Open(aRFs, _L("f:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
CleanupClosePushL(fp);
TXmlEngBinaryContainer bincont = iDoc.CreateBinaryContainerL(CID_1(), contbuff);
TXmlEngChunkContainer chunkcont = iDoc.CreateChunkContainerL(CID_2(), chunk, offset, binarySize);
@@ -680,7 +679,7 @@
aRFs.Connect();
CleanupClosePushL( aRFs );
RFile fp;
- User::LeaveIfError( fp.Open(aRFs, _L("E:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
+ User::LeaveIfError( fp.Open(aRFs, _L("f:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
CleanupClosePushL(fp);
TXmlEngBinaryContainer bincont = iDoc.CreateBinaryContainerL(CID_1(), contbuff);
TXmlEngChunkContainer chunkcont = iDoc.CreateChunkContainerL(CID_2(), chunk, offset, binarySize);
@@ -760,7 +759,7 @@
aRFs.Connect();
CleanupClosePushL( aRFs );
RFile fp;
- User::LeaveIfError( fp.Open(aRFs, _L("E:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
+ User::LeaveIfError( fp.Open(aRFs, _L("f:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
CleanupClosePushL(fp);
TXmlEngBinaryContainer bincont = iDoc.CreateBinaryContainerL(CID_1(), contbuff);
TXmlEngChunkContainer chunkcont = iDoc.CreateChunkContainerL(CID_2(), chunk, offset, binarySize);
@@ -841,7 +840,7 @@
aRFs.Connect();
CleanupClosePushL( aRFs );
RFile fp;
- User::LeaveIfError( fp.Open(aRFs, _L("E:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
+ User::LeaveIfError( fp.Open(aRFs, _L("f:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
CleanupClosePushL(fp);
TXmlEngBinaryContainer bincont = iDoc.CreateBinaryContainerL(CID_1(), contbuff);
TXmlEngChunkContainer chunkcont = iDoc.CreateChunkContainerL(CID_2(), chunk, offset, binarySize);
@@ -1186,7 +1185,7 @@
aRFs.Connect();
CleanupClosePushL( aRFs );
RFile fp;
- User::LeaveIfError( fp.Open(aRFs, _L("E:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
+ User::LeaveIfError( fp.Open(aRFs, _L("f:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
CleanupClosePushL(fp);
TXmlEngBinaryContainer bincont = iDoc.CreateBinaryContainerL(CID_1(), contbuff);
TXmlEngChunkContainer chunkcont = iDoc.CreateChunkContainerL(CID_2(), chunk, offset, binarySize);
@@ -1270,7 +1269,7 @@
aRFs.Connect();
CleanupClosePushL( aRFs );
RFile fp;
- User::LeaveIfError( fp.Open(aRFs, _L("E:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
+ User::LeaveIfError( fp.Open(aRFs, _L("f:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
CleanupClosePushL(fp);
TXmlEngBinaryContainer bincont = iDoc.CreateBinaryContainerL(CID_1(), contbuff);
TXmlEngChunkContainer chunkcont = iDoc.CreateChunkContainerL(CID_2(), chunk, offset, binarySize);
@@ -1355,7 +1354,7 @@
aRFs.Connect();
CleanupClosePushL( aRFs );
RFile fp;
- User::LeaveIfError( fp.Open(aRFs, _L("E:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
+ User::LeaveIfError( fp.Open(aRFs, _L("f:\\testing\\data\\xmleng\\efute\\input\\containers\\petit.jpg"), EFileRead) );
CleanupClosePushL(fp);
TXmlEngBinaryContainer bincont = iDoc.CreateBinaryContainerL(CID_1(), contbuff);
TXmlEngChunkContainer chunkcont = iDoc.CreateChunkContainerL(CID_2(), chunk, offset, binarySize);
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksdom.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksdom.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -24,7 +24,7 @@
#include <Xml\Parser.h>
#include <Xml\ParserFeature.h>
-#include <XmlEngNodeFilter.h>
+#include <xml/dom/xmlengnodefilter.h>
#include <libc\string.h>
#include <charconv.h>
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksfilecont.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksfilecont.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -18,9 +18,9 @@
#include "TestContentHandler.h"
#include "xmlengtester.h"
//#include "XmlEngDOMChunkParser.h"
-#include "XmlEngFileContainer.h"
-#include "XmlEngBinaryContainer.h"
-#include "XmlEngNode.h"
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengnode.h>
#include <e32svr.h>
#include <StifParser.h>
#include <Stiftestinterface.h>
@@ -47,7 +47,7 @@
_LIT(KFileError,"FileContainer Error GetList..");
_LIT(KEndParsing,"Checking FileContainer GetList end.");
TBufC8<100> cid(_L8("123456789@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -116,7 +116,7 @@
iLog->Log((TDesC)KEndParsing);
CleanupStack::PopAndDestroy(3);//list, rfs,file
return KErrNone;
- }
+ }
// -----------------------------------------------------------------------------
// CLibxml2Tester::FileContainer_CidL
// test method function.
@@ -129,7 +129,7 @@
_LIT(KFileError,"File Cid() Error.");
_LIT(KEndParsing,"Checking FileContainer end.");
TBufC8<100> cid(_L8("123456789@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -176,9 +176,9 @@
_LIT(KEndParsing,"Checking FileContainer end.");
TBufC8<100> cid(_L8("123456789@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -265,7 +265,7 @@
_LIT(KFileError,"File Size() Error.");
_LIT(KEndParsing,"Checking FileContainer end.");
TBufC8<100> cid(_L8("123456789@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -310,7 +310,7 @@
_LIT(KFileError,"File File().Name() Error.");
_LIT(KEndParsing,"Checking FileContainer end.");
TBufC8<100> cid(_L8("123456789@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -358,7 +358,7 @@
_LIT(KFileError,"File NodeType() Error.");
_LIT(KEndParsing,"Checking FileContainer end.");
TBufC8<100> cid(_L8("123456789@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -406,9 +406,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -479,9 +479,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -559,9 +559,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
HBufC8* str1=ReadFileL(KInputFile1);
CleanupStack::PushL(str1);
@@ -639,9 +639,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -732,9 +732,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -804,9 +804,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -905,9 +905,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -1025,9 +1025,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -1149,9 +1149,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -1243,9 +1243,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -1368,9 +1368,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -1456,9 +1456,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -1548,9 +1548,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -1669,9 +1669,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -1764,9 +1764,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -1859,9 +1859,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -1954,9 +1954,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -2050,9 +2050,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
@@ -2145,9 +2145,9 @@
TBufC8<100> cid1(_L8("11111111@123456789") );
TBufC8<100> cid2(_L8("22222222@123456789") );
TBufC8<100> cid3(_L8("33333333@123456789") );
- _LIT(KInputFile1,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
- _LIT(KInputFile2,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
- _LIT(KInputFile3,"E:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
+ _LIT(KInputFile1,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.jpg");
+ _LIT(KInputFile2,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\icon.gif");
+ _LIT(KInputFile3,"f:\\testing\\data\\xmleng\\efute\\input\\filecontainer\\test.doc");
RFs rfs;
User::LeaveIfError(rfs.Connect());
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksserdefault.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksserdefault.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -22,18 +22,18 @@
#include <e32std.h>
#include <StifParser.h>
#include <Stiftestinterface.h>
-#include "XmlEngBinaryContainer.h"
-#include "XmlEngChunkContainer.h"
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
#include "xmlengtesterdef.h"
-#include <XmlEngSerializer.h>
-#include <XmlEngDeserializer.h>
+#include <xml/dom/xmlengserializer.h>
+#include <xml/dom/xmlengdeserializer.h>
#include <InetProtTextUtils.h>
#include <libc\string.h>
#include <charconv.h>
#include <UTF.H>
-#include <XmlEngDOMParser.h>
+#include <xml/dom/xmlengdomparser.h>
/************************************** SerXOP ****************************************/
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblockssergzip.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblockssergzip.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -23,8 +23,9 @@
#include <StifParser.h>
#include <Stiftestinterface.h>
-#include <XmlEngSerializer.h>
-#include <XmlEngBinaryContainer.h>
+
+#include <xml/dom/xmlengserializer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
#include "xmlengtesterdef.h"
#include <InetProtTextUtils.h>
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksserializer.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksserializer.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -22,10 +22,10 @@
#include <StifParser.h>
#include <Stiftestinterface.h>
-#include <XmlEngSerializer.h>
-#include <XmlEngBinaryContainer.h>
-#include <XmlEngChunkContainer.h>
-#include <XmlEngFileContainer.h>
+#include <xml/dom/xmlengserializer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
#include "xmlengtesterdef.h"
#include "TestFileOutputStream.h"
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksserxop.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksserxop.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -22,19 +22,21 @@
#include <e32std.h>
#include <StifParser.h>
#include <Stiftestinterface.h>
-#include "XmlEngBinaryContainer.h"
-#include "XmlEngChunkContainer.h"
-#include "XmlEngFileContainer.h"
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+
#include "xmlengtesterdef.h"
-#include <XmlEngSerializer.h>
-#include <XmlEngDeserializer.h>
+#include <xml/dom/xmlengserializer.h>
+#include <xml/dom/xmlengdeserializer.h>
#include <InetProtTextUtils.h>
#include <libc\string.h>
#include <charconv.h>
#include <UTF.H>
-#include <XmlEngDOMParser.h>
+#include <xml/dom/xmlengdomparser.h>
+
/************************************** SerXOP ****************************************/
// -----------------------------------------------------------------------------
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksutils.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksutils.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -29,7 +29,7 @@
#include <libc\string.h>
#include <charconv.h>
#include <UTF.H>
-#include <XmlEngutils.h>
+#include <xml/utils/xmlengutils.h>
using namespace Xml;
/************************************** Utils **************************************/
--- a/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksxpath.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/libxml2libs/test/xmlengtester/xmlengtester_target/src/xmlengtesterblocksxpath.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -23,12 +23,12 @@
#include <StifParser.h>
#include <Stiftestinterface.h>
-#include <XmlEngXPathExtensionFunction.h>
-#include <XmlEngXPathEvaluationContext.h>
-#include <xmlengxpathconfiguration.h>
-#include <XmlEngXPathEvaluator.h>
-#include <XmlEngXPathExpression.h>
-#include <xmlengxpatherrors.h>
+#include <xml/dom/xmlengxpathextensionfunction.h>
+#include <xml/dom/xmlengxpathevaluationcontext.h>
+#include <xml/dom/xmlengxpathconfiguration.h>
+#include <xml/dom/xmlengxpathevaluator.h>
+#include <xml/dom/xmlengxpathexpression.h>
+#include <xml/dom/xmlengxpatherrors.h>
#include <Xml\Parser.h>
#include <Xml\ParserFeature.h>
@@ -36,7 +36,7 @@
#include <libc\string.h>
#include <charconv.h>
#include <UTF.H>
-#include <xmlengxpathutils.h>
+#include <xml/dom/xmlengxpathutils.h>
using namespace Xml;
--- a/xml/wbxmlparser/group/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -31,35 +31,4 @@
wml1_1stringdictionary00.mmp
emn1_0stringdict00.mmp
-PRJ_TESTEXPORTS
-../test/rtest/group/wbxmlparsertests.bat /epoc32/data/z/system/test/wbxmlparsertests.bat
-../test/rtest/group/wbxmlparsertests.iby /epoc32/rom/include/wbxmlparsertests.iby
-../test/rtest/data/defects/00000036.emnc z:/system/xmltest/defects/00000036.emnc
-../test/rtest/data/defects/00000036b.emnc z:/system/xmltest/defects/00000036b.emnc
-../test/rtest/data/defects/00000060.emnc z:/system/xmltest/defects/00000060.emnc
-../test/rtest/data/defects/00000104.emnc z:/system/xmltest/defects/00000104.emnc
-
-
-PRJ_TESTEXTENSIONS
-start extension syslibs/test/xml_syncmltestfiledist
-end
-start extension syslibs/test/xml_wmltestfiledist
-end
-start extension syslibs/test/xml_sitestfiledist
-end
-
-PRJ_TESTMMPFILES
-../test/rtest/group/t_wbxmlbehaviourparsertests.mmp
-../test/rtest/group/t_wbxmlcorruptparsertests.mmp
-../test/rtest/group/t_wbxmldefects.mmp
-../test/rtest/group/t_wbxmloomparsertests.mmp
-../test/rtest/group/t_wbxmloomsiparserstabilitytests.mmp
-../test/rtest/group/t_wbxmloomsyncmlparserstabilitytests.mmp
-../test/rtest/group/t_wbxmloomwmlparserstabilitytests.mmp
-../test/rtest/group/t_wbxmlparsertests.mmp
-../test/rtest/group/t_wbxmlparserucs4testspartone.mmp
-../test/rtest/group/t_wbxmlsiparserstabilitytests.mmp
-../test/rtest/group/t_wbxmlsyncmlparserstabilitytests.mmp
-../test/rtest/group/t_wbxmlunknownparsertests.mmp
-../test/rtest/group/t_wbxmlwmlparserstabilitytests.mmp
-../test/rtest/group/wml1_1stringdictionary255.mmp support
+#include "../test/rtest/group/bld.inf"
\ No newline at end of file
--- a/xml/wbxmlparser/group/syslibs_wbxmlparser.mrp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/group/syslibs_wbxmlparser.mrp Thu Jul 22 16:49:54 2010 +0100
@@ -1,19 +1,3 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
component syslibs_wbxmlparser
source \sf\os\xmlsrv\xml\wbxmlparser
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/wbxmlparser/test/rtest/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,47 @@
+// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+
+PRJ_TESTEXPORTS
+wbxmlparsertests.bat /epoc32/data/z/system/test/wbxmlparsertests.bat
+wbxmlparsertests.iby /epoc32/rom/include/wbxmlparsertests.iby
+../data/defects/00000036.emnc c:/system/xmltest/defects/00000036.emnc
+../data/defects/00000036b.emnc c:/system/xmltest/defects/00000036b.emnc
+../data/defects/00000060.emnc c:/system/xmltest/defects/00000060.emnc
+../data/defects/00000104.emnc c:/system/xmltest/defects/00000104.emnc
+
+PRJ_TESTEXTENSIONS
+start extension syslibs/test/xml_syncmltestfiledist
+end
+start extension syslibs/test/xml_wmltestfiledist
+end
+start extension syslibs/test/xml_sitestfiledist
+end
+
+PRJ_TESTMMPFILES
+t_wbxmlbehaviourparsertests.mmp
+t_wbxmlcorruptparsertests.mmp
+t_wbxmldefects.mmp
+t_wbxmloomparsertests.mmp
+t_wbxmloomsiparserstabilitytests.mmp
+t_wbxmloomsyncmlparserstabilitytests.mmp
+t_wbxmloomwmlparserstabilitytests.mmp
+t_wbxmlparsertests.mmp
+t_wbxmlparserucs4testspartone.mmp
+t_wbxmlsiparserstabilitytests.mmp
+t_wbxmlsyncmlparserstabilitytests.mmp
+t_wbxmlunknownparsertests.mmp
+t_wbxmlwmlparserstabilitytests.mmp
+wml1_1stringdictionary255.mmp support
--- a/xml/wbxmlparser/test/rtest/group/t_wbxmlbehaviourparsertests.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/group/t_wbxmlbehaviourparsertests.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -13,6 +13,7 @@
// Description:
//
+//RTEST
TARGET t_wbxmlbehaviourparsertests.exe
TARGETTYPE exe
--- a/xml/wbxmlparser/test/rtest/group/t_wbxmlcorruptparsertests.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/group/t_wbxmlcorruptparsertests.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -13,6 +13,7 @@
// Description:
//
+//RTEST
TARGET t_wbxmlcorruptparsertests.exe
TARGETTYPE exe
--- a/xml/wbxmlparser/test/rtest/group/t_wbxmldefects.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/group/t_wbxmldefects.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -13,6 +13,7 @@
// Description:
//
+//RTEST
TARGET t_wbxmldefects.exe
TARGETTYPE exe
--- a/xml/wbxmlparser/test/rtest/group/t_wbxmloomparsertests.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/group/t_wbxmloomparsertests.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -13,6 +13,7 @@
// Description:
//
+//RTEST
MACRO __SHOW_MANUAL_OUTPUT__
MACRO __COMPARE_OUTPUT__
--- a/xml/wbxmlparser/test/rtest/group/t_wbxmloomsiparserstabilitytests.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/group/t_wbxmloomsiparserstabilitytests.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -13,6 +13,7 @@
// Description:
//
+//RTEST
//default stack size(8K) is too small and cause stack overflow
//in the hardware test udeb
EPOCSTACKSIZE 16384
--- a/xml/wbxmlparser/test/rtest/group/t_wbxmloomsyncmlparserstabilitytests.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/group/t_wbxmloomsyncmlparserstabilitytests.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -13,6 +13,7 @@
// Description:
//
+//RTEST
//default stack size(8K) is too small and cause stack overflow
//in the hardware test udeb
EPOCSTACKSIZE 16384
--- a/xml/wbxmlparser/test/rtest/group/t_wbxmloomwmlparserstabilitytests.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/group/t_wbxmloomwmlparserstabilitytests.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -18,6 +18,7 @@
//
//
+//RTEST
TARGET t_wbxmloomwmlparserstabilitytests.exe
TARGETTYPE exe
--- a/xml/wbxmlparser/test/rtest/group/t_wbxmlparsertests.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/group/t_wbxmlparsertests.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -13,6 +13,8 @@
// Description:
//
+//RTEST
+
MACRO __SHOW_MANUAL_OUTPUT__
MACRO __COMPARE_OUTPUT__
--- a/xml/wbxmlparser/test/rtest/group/t_wbxmlparserucs4testspartone.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/group/t_wbxmlparserucs4testspartone.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -13,6 +13,8 @@
// Description:
//
+//RTEST
+
MACRO __SHOW_MANUAL_OUTPUT__
MACRO __COMPARE_OUTPUT__
--- a/xml/wbxmlparser/test/rtest/group/t_wbxmlsiparserstabilitytests.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/group/t_wbxmlsiparserstabilitytests.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -18,6 +18,7 @@
//
//
+//RTEST
EPOCSTACKSIZE 0x3000 // 12K
TARGET t_wbxmlsiparserstabilitytests.exe
--- a/xml/wbxmlparser/test/rtest/group/t_wbxmlsyncmlparserstabilitytests.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/group/t_wbxmlsyncmlparserstabilitytests.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -18,6 +18,7 @@
//
//
+//RTEST
TARGET t_wbxmlsyncmlparserstabilitytests.exe
TARGETTYPE exe
--- a/xml/wbxmlparser/test/rtest/group/t_wbxmlunknownparsertests.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/group/t_wbxmlunknownparsertests.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -13,8 +13,9 @@
// Description:
//
-target t_wbxmlunknownparsertests.exe
-targettype exe
+//RTEST
+TARGET t_wbxmlunknownparsertests.exe
+TARGETTYPE exe
VENDORID 0x70000001
--- a/xml/wbxmlparser/test/rtest/group/t_wbxmlwmlparserstabilitytests.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/group/t_wbxmlwmlparserstabilitytests.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -18,6 +18,7 @@
//
//
+//RTEST
TARGET t_wbxmlwmlparserstabilitytests.exe
TARGETTYPE exe
--- a/xml/wbxmlparser/test/rtest/group/wbxmlparsertests.iby Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/group/wbxmlparsertests.iby Thu Jul 22 16:49:54 2010 +0100
@@ -26,22 +26,22 @@
#include <wbxmlparser.iby>
// batch file that runs all automatic WBxml parser tests
-data=ZSYSTEM\test\wbxmlparsertests.bat test\wbxmlparsertests.bat
+data=CSYSTEM\test\wbxmlparsertests.bat test\wbxmlparsertests.bat
// WBXML test parser exe
-file=ABI_DIR\BUILD_DIR\t_wbxmlsyncmlparserstabilitytests.exe test\t_wbxmlsyncmlparserstabilitytests.exe
-file=ABI_DIR\BUILD_DIR\t_wbxmlwmlparserstabilitytests.exe test\t_wbxmlwmlparserstabilitytests.exe
-file=ABI_DIR\BUILD_DIR\t_wbxmlsiparserstabilitytests.exe test\t_wbxmlsiparserstabilitytests.exe
-file=ABI_DIR\BUILD_DIR\t_wbxmloomsyncmlparserstabilitytests.exe test\t_wbxmloomsyncmlparserstabilitytests.exe
-file=ABI_DIR\BUILD_DIR\t_wbxmloomwmlparserstabilitytests.exe test\t_wbxmloomwmlparserstabilitytests.exe
-file=ABI_DIR\BUILD_DIR\t_wbxmloomsiparserstabilitytests.exe test\t_wbxmloomsiparserstabilitytests.exe
-file=ABI_DIR\BUILD_DIR\t_wbxmlparsertests.exe test\t_wbxmlparsertests.exe
-file=ABI_DIR\BUILD_DIR\t_wbxmloomparsertests.exe test\t_wbxmloomparsertests.exe
-file=ABI_DIR\BUILD_DIR\t_wbxmlcorruptparsertests.exe test\t_wbxmlcorruptparsertests.exe
-file=ABI_DIR\BUILD_DIR\t_wbxmlunknownparsertests.exe test\t_wbxmlunknownparsertests.exe
-file=ABI_DIR\BUILD_DIR\t_wbxmlbehaviourparsertests.exe test\t_wbxmlbehaviourparsertests.exe
-file=ABI_DIR\BUILD_DIR\t_wbxmlparserucs4testspartone.exe test\t_wbxmlparserucs4testspartone.exe
-file=ABI_DIR\BUILD_DIR\t_wbxmldefects.exe test\t_wbxmldefects.exe
+file=ABI_DIR\BUILD_DIR\t_wbxmlsyncmlparserstabilitytests.exe sys\bin\t_wbxmlsyncmlparserstabilitytests.exe
+file=ABI_DIR\BUILD_DIR\t_wbxmlwmlparserstabilitytests.exe sys\bin\t_wbxmlwmlparserstabilitytests.exe
+file=ABI_DIR\BUILD_DIR\t_wbxmlsiparserstabilitytests.exe sys\bin\t_wbxmlsiparserstabilitytests.exe
+file=ABI_DIR\BUILD_DIR\t_wbxmloomsyncmlparserstabilitytests.exe sys\bin\t_wbxmloomsyncmlparserstabilitytests.exe
+file=ABI_DIR\BUILD_DIR\t_wbxmloomwmlparserstabilitytests.exe sys\bin\t_wbxmloomwmlparserstabilitytests.exe
+file=ABI_DIR\BUILD_DIR\t_wbxmloomsiparserstabilitytests.exe sys\bin\t_wbxmloomsiparserstabilitytests.exe
+file=ABI_DIR\BUILD_DIR\t_wbxmlparsertests.exe sys\bin\t_wbxmlparsertests.exe
+file=ABI_DIR\BUILD_DIR\t_wbxmloomparsertests.exe sys\bin\t_wbxmloomparsertests.exe
+file=ABI_DIR\BUILD_DIR\t_wbxmlcorruptparsertests.exe sys\bin\t_wbxmlcorruptparsertests.exe
+file=ABI_DIR\BUILD_DIR\t_wbxmlunknownparsertests.exe sys\bin\t_wbxmlunknownparsertests.exe
+file=ABI_DIR\BUILD_DIR\t_wbxmlbehaviourparsertests.exe sys\bin\t_wbxmlbehaviourparsertests.exe
+file=ABI_DIR\BUILD_DIR\t_wbxmlparserucs4testspartone.exe sys\bin\t_wbxmlparserucs4testspartone.exe
+file=ABI_DIR\BUILD_DIR\t_wbxmldefects.exe sys\bin\t_wbxmldefects.exe
// Test String Dictionary plugin DLLs
@@ -49,222 +49,222 @@
ECOM_PLUGIN(wml1_1stringdictionary255.dll,101fd308.rsc)
// Test data
-data=ZSYSTEM\xmltest\syncml\1.1\add-to-client\FromServer0.wbxml System\XmlTest\SyncML\1.1\add-to-client\FromServer0.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\add-to-client\FromServer1.wbxml System\XmlTest\SyncML\1.1\add-to-client\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\add-to-client\FromServer2.wbxml System\XmlTest\SyncML\1.1\add-to-client\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\add-to-client\FromServer3.wbxml System\XmlTest\SyncML\1.1\add-to-client\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\add-to-server\FromServer1.wbxml System\XmlTest\SyncML\1.1\add-to-server\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\add-to-server\FromServer2.wbxml System\XmlTest\SyncML\1.1\add-to-server\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\add-to-server\FromServer3.wbxml System\XmlTest\SyncML\1.1\add-to-server\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\atomic\FromServer1.wbxml System\XmlTest\SyncML\1.1\Atomic\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\atomic\FromServer2.wbxml System\XmlTest\SyncML\1.1\Atomic\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\atomic\FromServer3.wbxml System\XmlTest\SyncML\1.1\Atomic\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\authbasicfail\FromServer1.wbxml System\XmlTest\SyncML\1.1\AuthBasicFail\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\authbasicfail\FromServer2.wbxml System\XmlTest\SyncML\1.1\AuthBasicFail\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\authbasicfail\FromServer3.wbxml System\XmlTest\SyncML\1.1\AuthBasicFail\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\authbasicfailfirst\FromServer1.wbxml System\XmlTest\SyncML\1.1\AuthBasicFailFirst\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\authbasicfailfirst\FromServer2.wbxml System\XmlTest\SyncML\1.1\AuthBasicFailFirst\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\authbasicfailfirst\FromServer3.wbxml System\XmlTest\SyncML\1.1\AuthBasicFailFirst\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\authmd5fail\FromServer1.wbxml System\XmlTest\SyncML\1.1\AuthMD5Fail\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\authmd5fail\FromServer2.wbxml System\XmlTest\SyncML\1.1\AuthMD5Fail\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\authmd5fail\FromServer3.wbxml System\XmlTest\SyncML\1.1\AuthMD5Fail\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\authmd5failfirst\FromServer1.wbxml System\XmlTest\SyncML\1.1\AuthMD5FailFirst\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\authmd5failfirst\FromServer2.wbxml System\XmlTest\SyncML\1.1\AuthMD5FailFirst\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\authmd5failfirst\FromServer3.wbxml System\XmlTest\SyncML\1.1\AuthMD5FailFirst\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\client-large\FromServer1.wbxml System\XmlTest\SyncML\1.1\client-large\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\client-large\FromServer2.wbxml System\XmlTest\SyncML\1.1\client-large\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\client-large\FromServer3.wbxml System\XmlTest\SyncML\1.1\client-large\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\client-large\FromServer4.wbxml System\XmlTest\SyncML\1.1\client-large\FromServer4.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\client-large-multiple\FromServer1.wbxml System\XmlTest\SyncML\1.1\client-large-multiple\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\client-large-multiple\FromServer2.wbxml System\XmlTest\SyncML\1.1\client-large-multiple\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\client-large-multiple\FromServer3.wbxml System\XmlTest\SyncML\1.1\client-large-multiple\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\client-large-multiple\FromServer4.wbxml System\XmlTest\SyncML\1.1\client-large-multiple\FromServer4.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanadd\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManAdd\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanadd\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManAdd\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanalertdisplay\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManAlertDisplay\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanalertdisplay\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManAlertDisplay\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanalertmultichoice\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManAlertMultiChoice\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanalertmultichoice\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManAlertMultiChoice\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanalertsinglechoice\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManAlertSingleChoice\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanalertsinglechoice\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManAlertSingleChoice\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanalerttextinput\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManAlertTextInput\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanalerttextinput\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManAlertTextInput\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanalertuseraccept\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManAlertUserAccept\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanalertuseraccept\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManAlertUserAccept\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanalertuserreject\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManAlertUserReject\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanalertuserreject\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManAlertUserReject\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanatomic\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManAtomic\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanatomic\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManAtomic\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanatomicAlertUserAccept\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManAtomicAlertUserAccept\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanatomicAlertUserAccept\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManAtomicAlertUserAccept\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanatomicAlertUserReject\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManAtomicAlertUserReject\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanatomicAlertUserReject\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManAtomicAlertUserReject\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanatomicFail\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManAtomicFail\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanatomicFail\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManAtomicFail\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmandelete\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManDelete\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmandelete\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManDelete\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanget\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManGet\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanget\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManGet\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanlargeobjectadd\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManLargeObjectAdd\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanlargeobjectadd\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManLargeObjectAdd\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanlargeobjectadd\FromServer3.wbxml System\XmlTest\SyncML\1.1\DevManLargeObjectAdd\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanlargeobjectadd\FromServer4.wbxml System\XmlTest\SyncML\1.1\DevManLargeObjectAdd\FromServer4.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanlargeobjectget\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManLargeObjectGet\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanlargeobjectget\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManLargeObjectGet\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanlargeobjectget\FromServer3.wbxml System\XmlTest\SyncML\1.1\DevManLargeObjectGet\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanlargeobjectget\FromServer4.wbxml System\XmlTest\SyncML\1.1\DevManLargeObjectGet\FromServer4.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanlargeobjectget\FromServer5.wbxml System\XmlTest\SyncML\1.1\DevManLargeObjectGet\FromServer5.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanreplace\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManReplace\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmanreplace\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManReplace\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmansequence\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManSequence\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmansequence\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManSequence\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmansequencealertuseraccept\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManSequenceAlertUserAccept\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmansequencealertuseraccept\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManSequenceAlertUserAccept\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmansequencealertuserreject\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManSequenceAlertUserReject\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmansequencealertuserreject\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManSequenceAlertUserReject\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmansequencefail\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManSequenceFail\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmansequencefail\FromServer2.wbxml System\XmlTest\SyncML\1.1\DevManSequenceFail\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\devmansimple\FromServer1.wbxml System\XmlTest\SyncML\1.1\DevManSimple\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\large-object-from-client\FromServer1.wbxml System\XmlTest\SyncML\1.1\Large-object-from-client\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\large-object-from-client\FromServer2.wbxml System\XmlTest\SyncML\1.1\Large-object-from-client\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\large-object-from-client\FromServer3.wbxml System\XmlTest\SyncML\1.1\Large-object-from-client\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\large-object-from-client\FromServer4.wbxml System\XmlTest\SyncML\1.1\Large-object-from-client\FromServer4.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\large-object-from-server\FromServer1.wbxml System\XmlTest\SyncML\1.1\Large-object-from-server\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\large-object-from-server\FromServer2.wbxml System\XmlTest\SyncML\1.1\Large-object-from-server\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\large-object-from-server\FromServer3.wbxml System\XmlTest\SyncML\1.1\Large-object-from-server\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\large-object-from-server\FromServer4.wbxml System\XmlTest\SyncML\1.1\Large-object-from-server\FromServer4.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\large-object-from-server2\FromServer1.wbxml System\XmlTest\SyncML\1.1\Large-object-from-server2\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\large-object-from-server2\FromServer2.wbxml System\XmlTest\SyncML\1.1\Large-object-from-server2\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\large-object-from-server2\FromServer3.wbxml System\XmlTest\SyncML\1.1\Large-object-from-server2\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\large-object-from-server2\FromServer4.wbxml System\XmlTest\SyncML\1.1\Large-object-from-server2\FromServer4.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\multiple-db-sync\FromServer1.wbxml System\XmlTest\SyncML\1.1\Multiple-Db-Sync\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\multiple-db-sync\FromServer2.wbxml System\XmlTest\SyncML\1.1\Multiple-Db-Sync\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\multiple-db-sync\FromServer3.wbxml System\XmlTest\SyncML\1.1\Multiple-Db-Sync\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\one-way-client-refresh-sync\FromServer1.wbxml System\XmlTest\SyncML\1.1\One-way-client-refresh-sync\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\one-way-client-refresh-sync\FromServer2.wbxml System\XmlTest\SyncML\1.1\One-way-client-refresh-sync\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\one-way-client-refresh-sync\FromServer3.wbxml System\XmlTest\SyncML\1.1\One-way-client-refresh-sync\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\one-way-client-sync\FromServer1.wbxml System\XmlTest\SyncML\1.1\One-way-client-sync\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\one-way-client-sync\FromServer2.wbxml System\XmlTest\SyncML\1.1\One-way-client-sync\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\one-way-client-sync\FromServer3.wbxml System\XmlTest\SyncML\1.1\One-way-client-sync\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\one-way-server-refresh-sync\FromServer1.wbxml System\XmlTest\SyncML\1.1\One-way-server-refresh-sync\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\one-way-server-refresh-sync\FromServer2.wbxml System\XmlTest\SyncML\1.1\One-way-server-refresh-sync\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\one-way-server-refresh-sync\FromServer3.wbxml System\XmlTest\SyncML\1.1\One-way-server-refresh-sync\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\one-way-server-sync\FromServer1.wbxml System\XmlTest\SyncML\1.1\One-way-server-sync\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\one-way-server-sync\FromServer2.wbxml System\XmlTest\SyncML\1.1\One-way-server-sync\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\one-way-server-sync\FromServer3.wbxml System\XmlTest\SyncML\1.1\One-way-server-sync\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\pref-tx-rx\FromServer1.wbxml System\XmlTest\SyncML\1.1\Pref-Tx-Rx\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\pref-tx-rx\FromServer2.wbxml System\XmlTest\SyncML\1.1\Pref-Tx-Rx\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\pref-tx-rx\FromServer3.wbxml System\XmlTest\SyncML\1.1\Pref-Tx-Rx\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\server-busy\FromServer1.wbxml System\XmlTest\SyncML\1.1\server-busy\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\server-large\FromServer1.wbxml System\XmlTest\SyncML\1.1\server-large\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\server-large\FromServer2.wbxml System\XmlTest\SyncML\1.1\server-large\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\server-large\FromServer3.wbxml System\XmlTest\SyncML\1.1\server-large\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\server-large\FromServer4.wbxml System\XmlTest\SyncML\1.1\server-large\FromServer4.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\server-large-multiple\FromServer1.wbxml System\XmlTest\SyncML\1.1\server-large-multiple\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\server-large-multiple\FromServer2.wbxml System\XmlTest\SyncML\1.1\server-large-multiple\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\server-large-multiple\FromServer3.wbxml System\XmlTest\SyncML\1.1\server-large-multiple\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\server-large-multiple\FromServer4.wbxml System\XmlTest\SyncML\1.1\server-large-multiple\FromServer4.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\server-large-multiple\FromServer5.wbxml System\XmlTest\SyncML\1.1\server-large-multiple\FromServer5.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\slow-sync\FromServer1.wbxml System\XmlTest\SyncML\1.1\slow-sync\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\slow-sync\FromServer2.wbxml System\XmlTest\SyncML\1.1\slow-sync\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\slow-sync\FromServer3.wbxml System\XmlTest\SyncML\1.1\slow-sync\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\two-way-add\FromServer1.wbxml System\XmlTest\SyncML\1.1\two-way-add\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\two-way-add\FromServer2.wbxml System\XmlTest\SyncML\1.1\two-way-add\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\two-way-add\FromServer3.wbxml System\XmlTest\SyncML\1.1\two-way-add\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\two-way-delete\FromServer1.wbxml System\XmlTest\SyncML\1.1\two-way-delete\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\two-way-delete\FromServer2.wbxml System\XmlTest\SyncML\1.1\two-way-delete\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\two-way-delete\FromServer3.wbxml System\XmlTest\SyncML\1.1\two-way-delete\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\two-way-replace\FromServer1.wbxml System\XmlTest\SyncML\1.1\two-way-replace\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\two-way-replace\FromServer2.wbxml System\XmlTest\SyncML\1.1\two-way-replace\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\two-way-replace\FromServer3.wbxml System\XmlTest\SyncML\1.1\two-way-replace\FromServer3.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\two-way-sync\FromServer1.wbxml System\XmlTest\SyncML\1.1\two-way-sync\FromServer1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.1\two-way-sync\FromServer2.wbxml System\XmlTest\SyncML\1.1\two-way-sync\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\add-to-client\FromServer0.wbxml system\xmltest\syncml\1.1\add-to-client\FromServer0.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\add-to-client\FromServer1.wbxml system\xmltest\syncml\1.1\add-to-client\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\add-to-client\FromServer2.wbxml system\xmltest\syncml\1.1\add-to-client\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\add-to-client\FromServer3.wbxml system\xmltest\syncml\1.1\add-to-client\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\add-to-server\FromServer1.wbxml system\xmltest\syncml\1.1\add-to-server\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\add-to-server\FromServer2.wbxml system\xmltest\syncml\1.1\add-to-server\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\add-to-server\FromServer3.wbxml system\xmltest\syncml\1.1\add-to-server\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\atomic\FromServer1.wbxml system\xmltest\syncml\1.1\atomic\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\atomic\FromServer2.wbxml system\xmltest\syncml\1.1\atomic\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\atomic\FromServer3.wbxml system\xmltest\syncml\1.1\atomic\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\authbasicfail\FromServer1.wbxml system\xmltest\syncml\1.1\authbasicfail\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\authbasicfail\FromServer2.wbxml system\xmltest\syncml\1.1\authbasicfail\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\authbasicfail\FromServer3.wbxml system\xmltest\syncml\1.1\authbasicfail\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\authbasicfailfirst\FromServer1.wbxml system\xmltest\syncml\1.1\authbasicfailfirst\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\authbasicfailfirst\FromServer2.wbxml system\xmltest\syncml\1.1\authbasicfailfirst\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\authbasicfailfirst\FromServer3.wbxml system\xmltest\syncml\1.1\authbasicfailfirst\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\authmd5fail\FromServer1.wbxml system\xmltest\syncml\1.1\authmd5fail\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\authmd5fail\FromServer2.wbxml system\xmltest\syncml\1.1\authmd5fail\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\authmd5fail\FromServer3.wbxml system\xmltest\syncml\1.1\authmd5fail\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\authmd5failfirst\FromServer1.wbxml system\xmltest\syncml\1.1\authmd5failfirst\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\authmd5failfirst\FromServer2.wbxml system\xmltest\syncml\1.1\authmd5failfirst\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\authmd5failfirst\FromServer3.wbxml system\xmltest\syncml\1.1\authmd5failfirst\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\client-large\FromServer1.wbxml system\xmltest\syncml\1.1\client-large\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\client-large\FromServer2.wbxml system\xmltest\syncml\1.1\client-large\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\client-large\FromServer3.wbxml system\xmltest\syncml\1.1\client-large\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\client-large\FromServer4.wbxml system\xmltest\syncml\1.1\client-large\FromServer4.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\client-large-multiple\FromServer1.wbxml system\xmltest\syncml\1.1\client-large-multiple\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\client-large-multiple\FromServer2.wbxml system\xmltest\syncml\1.1\client-large-multiple\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\client-large-multiple\FromServer3.wbxml system\xmltest\syncml\1.1\client-large-multiple\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\client-large-multiple\FromServer4.wbxml system\xmltest\syncml\1.1\client-large-multiple\FromServer4.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanadd\FromServer1.wbxml system\xmltest\syncml\1.1\devmanadd\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanadd\FromServer2.wbxml system\xmltest\syncml\1.1\devmanadd\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanalertdisplay\FromServer1.wbxml system\xmltest\syncml\1.1\devmanalertdisplay\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanalertdisplay\FromServer2.wbxml system\xmltest\syncml\1.1\devmanalertdisplay\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanalertmultichoice\FromServer1.wbxml system\xmltest\syncml\1.1\devmanalertmultichoice\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanalertmultichoice\FromServer2.wbxml system\xmltest\syncml\1.1\devmanalertmultichoice\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanalertsinglechoice\FromServer1.wbxml system\xmltest\syncml\1.1\devmanalertsinglechoice\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanalertsinglechoice\FromServer2.wbxml system\xmltest\syncml\1.1\devmanalertsinglechoice\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanalerttextinput\FromServer1.wbxml system\xmltest\syncml\1.1\devmanalerttextinput\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanalerttextinput\FromServer2.wbxml system\xmltest\syncml\1.1\devmanalerttextinput\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanalertuseraccept\FromServer1.wbxml system\xmltest\syncml\1.1\devmanalertuseraccept\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanalertuseraccept\FromServer2.wbxml system\xmltest\syncml\1.1\devmanalertuseraccept\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanalertuserreject\FromServer1.wbxml system\xmltest\syncml\1.1\devmanalertuserreject\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanalertuserreject\FromServer2.wbxml system\xmltest\syncml\1.1\devmanalertuserreject\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanatomic\FromServer1.wbxml system\xmltest\syncml\1.1\devmanatomic\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanatomic\FromServer2.wbxml system\xmltest\syncml\1.1\devmanatomic\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanatomicAlertUserAccept\FromServer1.wbxml system\xmltest\syncml\1.1\devmanatomicalertuseraccept\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanatomicAlertUserAccept\FromServer2.wbxml system\xmltest\syncml\1.1\devmanatomicalertuseraccept\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanatomicAlertUserReject\FromServer1.wbxml system\xmltest\syncml\1.1\devmanatomicalertuserreject\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanatomicAlertUserReject\FromServer2.wbxml system\xmltest\syncml\1.1\devmanatomicalertuserreject\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanatomicFail\FromServer1.wbxml system\xmltest\syncml\1.1\devmanatomicfail\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanatomicFail\FromServer2.wbxml system\xmltest\syncml\1.1\devmanatomicfail\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmandelete\FromServer1.wbxml system\xmltest\syncml\1.1\devmandelete\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmandelete\FromServer2.wbxml system\xmltest\syncml\1.1\devmandelete\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanget\FromServer1.wbxml system\xmltest\syncml\1.1\devmanget\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanget\FromServer2.wbxml system\xmltest\syncml\1.1\devmanget\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanlargeobjectadd\FromServer1.wbxml system\xmltest\syncml\1.1\devmanlargeobjectadd\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanlargeobjectadd\FromServer2.wbxml system\xmltest\syncml\1.1\devmanlargeobjectadd\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanlargeobjectadd\FromServer3.wbxml system\xmltest\syncml\1.1\devmanlargeobjectadd\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanlargeobjectadd\FromServer4.wbxml system\xmltest\syncml\1.1\devmanlargeobjectadd\FromServer4.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanlargeobjectget\FromServer1.wbxml system\xmltest\syncml\1.1\devmanlargeobjectget\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanlargeobjectget\FromServer2.wbxml system\xmltest\syncml\1.1\devmanlargeobjectget\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanlargeobjectget\FromServer3.wbxml system\xmltest\syncml\1.1\devmanlargeobjectget\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanlargeobjectget\FromServer4.wbxml system\xmltest\syncml\1.1\devmanlargeobjectget\FromServer4.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanlargeobjectget\FromServer5.wbxml system\xmltest\syncml\1.1\devmanlargeobjectget\FromServer5.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanreplace\FromServer1.wbxml system\xmltest\syncml\1.1\devmanreplace\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmanreplace\FromServer2.wbxml system\xmltest\syncml\1.1\devmanreplace\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmansequence\FromServer1.wbxml system\xmltest\syncml\1.1\devmansequence\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmansequence\FromServer2.wbxml system\xmltest\syncml\1.1\devmansequence\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmansequencealertuseraccept\FromServer1.wbxml system\xmltest\syncml\1.1\devmansequencealertuseraccept\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmansequencealertuseraccept\FromServer2.wbxml system\xmltest\syncml\1.1\devmansequencealertuseraccept\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmansequencealertuserreject\FromServer1.wbxml system\xmltest\syncml\1.1\devmansequencealertuserreject\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmansequencealertuserreject\FromServer2.wbxml system\xmltest\syncml\1.1\devmansequencealertuserreject\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmansequencefail\FromServer1.wbxml system\xmltest\syncml\1.1\devmansequencefail\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmansequencefail\FromServer2.wbxml system\xmltest\syncml\1.1\devmansequencefail\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\devmansimple\FromServer1.wbxml system\xmltest\syncml\1.1\devmansimple\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\large-object-from-client\FromServer1.wbxml system\xmltest\syncml\1.1\large-object-from-client\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\large-object-from-client\FromServer2.wbxml system\xmltest\syncml\1.1\large-object-from-client\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\large-object-from-client\FromServer3.wbxml system\xmltest\syncml\1.1\large-object-from-client\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\large-object-from-client\FromServer4.wbxml system\xmltest\syncml\1.1\large-object-from-client\FromServer4.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\large-object-from-server\FromServer1.wbxml system\xmltest\syncml\1.1\large-object-from-server\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\large-object-from-server\FromServer2.wbxml system\xmltest\syncml\1.1\large-object-from-server\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\large-object-from-server\FromServer3.wbxml system\xmltest\syncml\1.1\large-object-from-server\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\large-object-from-server\FromServer4.wbxml system\xmltest\syncml\1.1\large-object-from-server\FromServer4.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\large-object-from-server2\FromServer1.wbxml system\xmltest\syncml\1.1\large-object-from-server2\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\large-object-from-server2\FromServer2.wbxml system\xmltest\syncml\1.1\large-object-from-server2\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\large-object-from-server2\FromServer3.wbxml system\xmltest\syncml\1.1\large-object-from-server2\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\large-object-from-server2\FromServer4.wbxml system\xmltest\syncml\1.1\large-object-from-server2\FromServer4.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\multiple-db-sync\FromServer1.wbxml system\xmltest\syncml\1.1\multiple-db-sync\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\multiple-db-sync\FromServer2.wbxml system\xmltest\syncml\1.1\multiple-db-sync\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\multiple-db-sync\FromServer3.wbxml system\xmltest\syncml\1.1\multiple-db-sync\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\one-way-client-refresh-sync\FromServer1.wbxml system\xmltest\syncml\1.1\one-way-client-refresh-sync\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\one-way-client-refresh-sync\FromServer2.wbxml system\xmltest\syncml\1.1\one-way-client-refresh-sync\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\one-way-client-refresh-sync\FromServer3.wbxml system\xmltest\syncml\1.1\one-way-client-refresh-sync\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\one-way-client-sync\FromServer1.wbxml system\xmltest\syncml\1.1\one-way-client-sync\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\one-way-client-sync\FromServer2.wbxml system\xmltest\syncml\1.1\one-way-client-sync\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\one-way-client-sync\FromServer3.wbxml system\xmltest\syncml\1.1\one-way-client-sync\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\one-way-server-refresh-sync\FromServer1.wbxml system\xmltest\syncml\1.1\one-way-server-refresh-sync\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\one-way-server-refresh-sync\FromServer2.wbxml system\xmltest\syncml\1.1\one-way-server-refresh-sync\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\one-way-server-refresh-sync\FromServer3.wbxml system\xmltest\syncml\1.1\one-way-server-refresh-sync\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\one-way-server-sync\FromServer1.wbxml system\xmltest\syncml\1.1\one-way-server-sync\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\one-way-server-sync\FromServer2.wbxml system\xmltest\syncml\1.1\one-way-server-sync\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\one-way-server-sync\FromServer3.wbxml system\xmltest\syncml\1.1\one-way-server-sync\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\pref-tx-rx\FromServer1.wbxml system\xmltest\syncml\1.1\pref-tx-rx\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\pref-tx-rx\FromServer2.wbxml system\xmltest\syncml\1.1\pref-tx-rx\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\pref-tx-rx\FromServer3.wbxml system\xmltest\syncml\1.1\pref-tx-rx\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\server-busy\FromServer1.wbxml system\xmltest\syncml\1.1\server-busy\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\server-large\FromServer1.wbxml system\xmltest\syncml\1.1\server-large\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\server-large\FromServer2.wbxml system\xmltest\syncml\1.1\server-large\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\server-large\FromServer3.wbxml system\xmltest\syncml\1.1\server-large\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\server-large\FromServer4.wbxml system\xmltest\syncml\1.1\server-large\FromServer4.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\server-large-multiple\FromServer1.wbxml system\xmltest\syncml\1.1\server-large-multiple\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\server-large-multiple\FromServer2.wbxml system\xmltest\syncml\1.1\server-large-multiple\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\server-large-multiple\FromServer3.wbxml system\xmltest\syncml\1.1\server-large-multiple\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\server-large-multiple\FromServer4.wbxml system\xmltest\syncml\1.1\server-large-multiple\FromServer4.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\server-large-multiple\FromServer5.wbxml system\xmltest\syncml\1.1\server-large-multiple\FromServer5.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\slow-sync\FromServer1.wbxml system\xmltest\syncml\1.1\slow-sync\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\slow-sync\FromServer2.wbxml system\xmltest\syncml\1.1\slow-sync\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\slow-sync\FromServer3.wbxml system\xmltest\syncml\1.1\slow-sync\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\two-way-add\FromServer1.wbxml system\xmltest\syncml\1.1\two-way-add\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\two-way-add\FromServer2.wbxml system\xmltest\syncml\1.1\two-way-add\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\two-way-add\FromServer3.wbxml system\xmltest\syncml\1.1\two-way-add\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\two-way-delete\FromServer1.wbxml system\xmltest\syncml\1.1\two-way-delete\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\two-way-delete\FromServer2.wbxml system\xmltest\syncml\1.1\two-way-delete\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\two-way-delete\FromServer3.wbxml system\xmltest\syncml\1.1\two-way-delete\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\two-way-replace\FromServer1.wbxml system\xmltest\syncml\1.1\two-way-replace\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\two-way-replace\FromServer2.wbxml system\xmltest\syncml\1.1\two-way-replace\FromServer2.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\two-way-replace\FromServer3.wbxml system\xmltest\syncml\1.1\two-way-replace\FromServer3.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\two-way-sync\FromServer1.wbxml system\xmltest\syncml\1.1\two-way-sync\FromServer1.wbxml
+data=CSYSTEM\xmltest\syncml\1.1\two-way-sync\FromServer2.wbxml system\xmltest\syncml\1.1\two-way-sync\FromServer2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.2\defects\DEF063979.wbxml System\XmlTest\SyncML\1.2\Defects\DEF063979.wbxml
-data=ZSYSTEM\xmltest\syncml\1.2\defects\DEF066185.wbxml System\XmlTest\SyncML\1.2\Defects\DEF066185.wbxml
-data=ZSYSTEM\xmltest\syncml\1.2\defects\DEF078987_1.wbxml System\XmlTest\SyncML\1.2\Defects\DEF078987_1.wbxml
-data=ZSYSTEM\xmltest\syncml\1.2\defects\DEF078987_2.wbxml System\XmlTest\SyncML\1.2\Defects\DEF078987_2.wbxml
-data=ZSYSTEM\xmltest\syncml\1.2\defects\DEF078668.wbxml System\XmlTest\SyncML\1.2\Defects\DEF078668.wbxml
+data=CSYSTEM\xmltest\syncml\1.2\defects\DEF063979.wbxml system\xmltest\syncml\1.2\defects\DEF063979.wbxml
+data=CSYSTEM\xmltest\syncml\1.2\defects\DEF066185.wbxml system\xmltest\syncml\1.2\defects\DEF066185.wbxml
+data=CSYSTEM\xmltest\syncml\1.2\defects\DEF078987_1.wbxml system\xmltest\syncml\1.2\defects\DEF078987_1.wbxml
+data=CSYSTEM\xmltest\syncml\1.2\defects\DEF078987_2.wbxml system\xmltest\syncml\1.2\defects\DEF078987_2.wbxml
+data=CSYSTEM\xmltest\syncml\1.2\defects\DEF078668.wbxml system\xmltest\syncml\1.2\defects\DEF078668.wbxml
-data=ZSYSTEM\xmltest\syncml\unknown\DEF078987_3.wbxml System\XmlTest\SyncML\Unknown\DEF078987_3.wbxml
+data=CSYSTEM\xmltest\syncml\unknown\DEF078987_3.wbxml system\xmltest\syncml\unknown\DEF078987_3.wbxml
-data=ZSYSTEM\xmltest\wml\1.1\AllElements.wmlc System\XmlTest\Wml\1.1\AllElements.wmlc
-data=ZSYSTEM\xmltest\wml\1.1\CharEntities.wmlc System\XmlTest\Wml\1.1\CharEntities.wmlc
-data=ZSYSTEM\xmltest\wml\1.1\data.wmlc System\XmlTest\Wml\1.1\data.wmlc
-data=ZSYSTEM\xmltest\wml\1.1\http___www.bbc.co.uk_mobile_sportheads1.wmlc System\XmlTest\Wml\1.1\http___www.bbc.co.uk_mobile_sportheads1.wmlc
-data=ZSYSTEM\xmltest\wml\1.1\mob.wmlc System\XmlTest\Wml\1.1\mob.wmlc
-data=ZSYSTEM\xmltest\wml\1.1\Variables.wmlc System\XmlTest\Wml\1.1\Variables.wmlc
-data=ZSYSTEM\xmltest\wml\1.1\wireless_char.wmlc System\XmlTest\Wml\1.1\wireless_char.wmlc
+data=CSYSTEM\xmltest\wml\1.1\AllElements.wmlc system\xmltest\wml\1.1\AllElements.wmlc
+data=CSYSTEM\xmltest\wml\1.1\CharEntities.wmlc system\xmltest\wml\1.1\CharEntities.wmlc
+data=CSYSTEM\xmltest\wml\1.1\data.wmlc system\xmltest\wml\1.1\data.wmlc
+data=CSYSTEM\xmltest\wml\1.1\http___www.bbc.co.uk_mobile_sportheads1.wmlc system\xmltest\wml\1.1\http___www.bbc.co.uk_mobile_sportheads1.wmlc
+data=CSYSTEM\xmltest\wml\1.1\mob.wmlc system\xmltest\wml\1.1\mob.wmlc
+data=CSYSTEM\xmltest\wml\1.1\Variables.wmlc system\xmltest\wml\1.1\Variables.wmlc
+data=CSYSTEM\xmltest\wml\1.1\wireless_char.wmlc system\xmltest\wml\1.1\wireless_char.wmlc
-data=ZSYSTEM\xmltest\wml\corrupt\CorruptAttr_mob.wmlc System\XmlTest\Wml\Corrupt\CorruptAttr_mob.wmlc
-data=ZSYSTEM\xmltest\wml\corrupt\CorruptAttrVal_mob.wmlc System\XmlTest\Wml\Corrupt\CorruptAttrVal_mob.wmlc
-data=ZSYSTEM\xmltest\wml\corrupt\CorruptTag_AllElements.wmlc System\XmlTest\Wml\Corrupt\CorruptTag_AllElements.wmlc
-data=ZSYSTEM\xmltest\wml\corrupt\NonNullTermInlineStr.wmlc System\XmlTest\Wml\Corrupt\NonNullTermInlineStr.wmlc
+data=CSYSTEM\xmltest\wml\corrupt\CorruptAttr_mob.wmlc system\xmltest\wml\Corrupt\CorruptAttr_mob.wmlc
+data=CSYSTEM\xmltest\wml\corrupt\CorruptAttrVal_mob.wmlc system\xmltest\wml\Corrupt\CorruptAttrVal_mob.wmlc
+data=CSYSTEM\xmltest\wml\corrupt\CorruptTag_AllElements.wmlc system\xmltest\wml\Corrupt\CorruptTag_AllElements.wmlc
+data=CSYSTEM\xmltest\wml\corrupt\NonNullTermInlineStr.wmlc system\xmltest\wml\Corrupt\NonNullTermInlineStr.wmlc
-data=ZSYSTEM\xmltest\wml\unknown\UnknownPubId_AllElements.wmlc System\XmlTest\Wml\Unknown\UnknownPubId_AllElements.wmlc
+data=CSYSTEM\xmltest\wml\unknown\UnknownPubId_AllElements.wmlc system\xmltest\wml\Unknown\UnknownPubId_AllElements.wmlc
-data=ZSYSTEM\xmltest\wml\codepage\wml_data_attr_copepage_255.wmlc System\XmlTest\Wml\Codepage\wml_data_attr_copepage_255.wmlc
+data=CSYSTEM\xmltest\wml\codepage\wml_data_attr_copepage_255.wmlc system\xmltest\wml\Codepage\wml_data_attr_copepage_255.wmlc
-data=ZSYSTEM\xmltest\serviceindication\corrupt\si_inv_act_undf.bdy System\XmlTest\ServiceIndication\Corrupt\si_inv_act_undf.bdy
-data=ZSYSTEM\xmltest\serviceindication\corrupt\si_inv_cd_token.bdy System\XmlTest\ServiceIndication\Corrupt\si_inv_cd_token.bdy
-data=ZSYSTEM\xmltest\serviceindication\corrupt\si_inv_cd_type.bdy System\XmlTest\ServiceIndication\Corrupt\si_inv_cd_type.bdy
-data=ZSYSTEM\xmltest\serviceindication\corrupt\si_inv_char.bdy System\XmlTest\ServiceIndication\Corrupt\si_inv_char.bdy
-data=ZSYSTEM\xmltest\serviceindication\corrupt\si_inv_hrf_ter.bdy System\XmlTest\ServiceIndication\Corrupt\si_inv_hrf_ter.bdy
-data=ZSYSTEM\xmltest\serviceindication\corrupt\si_inv_msg_ter.bdy System\XmlTest\ServiceIndication\Corrupt\si_inv_msg_ter.bdy
-data=ZSYSTEM\xmltest\serviceindication\corrupt\si_inv_msg_ter2.bdy System\XmlTest\ServiceIndication\Corrupt\si_inv_msg_ter2.bdy
-data=ZSYSTEM\xmltest\serviceindication\corrupt\si_val_wbx_ver_14.bdy System\XmlTest\ServiceIndication\Corrupt\si_val_wbx_ver_14.bdy
-data=ZSYSTEM\xmltest\serviceindication\corrupt\si_val_wbx_ver_30.bdy System\XmlTest\ServiceIndication\Corrupt\si_val_wbx_ver_30.bdy
-data=ZSYSTEM\xmltest\serviceindication\corrupt\si_val_wbx_ver_FF.bdy System\XmlTest\ServiceIndication\Corrupt\si_val_wbx_ver_FF.bdy
-data=ZSYSTEM\xmltest\serviceindication\corrupt\si_inv_msg_emp2.bdy System\XmlTest\ServiceIndication\Corrupt\si_inv_msg_emp2.bdy
+data=CSYSTEM\xmltest\serviceindication\corrupt\si_inv_act_undf.bdy system\xmltest\serviceindication\Corrupt\si_inv_act_undf.bdy
+data=CSYSTEM\xmltest\serviceindication\corrupt\si_inv_cd_token.bdy system\xmltest\serviceindication\Corrupt\si_inv_cd_token.bdy
+data=CSYSTEM\xmltest\serviceindication\corrupt\si_inv_cd_type.bdy system\xmltest\serviceindication\Corrupt\si_inv_cd_type.bdy
+data=CSYSTEM\xmltest\serviceindication\corrupt\si_inv_char.bdy system\xmltest\serviceindication\Corrupt\si_inv_char.bdy
+data=CSYSTEM\xmltest\serviceindication\corrupt\si_inv_hrf_ter.bdy system\xmltest\serviceindication\Corrupt\si_inv_hrf_ter.bdy
+data=CSYSTEM\xmltest\serviceindication\corrupt\si_inv_msg_ter.bdy system\xmltest\serviceindication\Corrupt\si_inv_msg_ter.bdy
+data=CSYSTEM\xmltest\serviceindication\corrupt\si_inv_msg_ter2.bdy system\xmltest\serviceindication\Corrupt\si_inv_msg_ter2.bdy
+data=CSYSTEM\xmltest\serviceindication\corrupt\si_val_wbx_ver_14.bdy system\xmltest\serviceindication\Corrupt\si_val_wbx_ver_14.bdy
+data=CSYSTEM\xmltest\serviceindication\corrupt\si_val_wbx_ver_30.bdy system\xmltest\serviceindication\Corrupt\si_val_wbx_ver_30.bdy
+data=CSYSTEM\xmltest\serviceindication\corrupt\si_val_wbx_ver_FF.bdy system\xmltest\serviceindication\Corrupt\si_val_wbx_ver_FF.bdy
+data=CSYSTEM\xmltest\serviceindication\corrupt\si_inv_msg_emp2.bdy system\xmltest\serviceindication\Corrupt\si_inv_msg_emp2.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_inv_act_multiple.bdy System\XmlTest\ServiceIndication\1.0\si_inv_act_multiple.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_inv_act_multiple2.bdy System\XmlTest\ServiceIndication\1.0\si_inv_act_multiple2.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_inv_cd_day.bdy System\XmlTest\ServiceIndication\1.0\si_inv_cd_day.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_inv_cd_hour.bdy System\XmlTest\ServiceIndication\1.0\si_inv_cd_hour.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_inv_cd_len.bdy System\XmlTest\ServiceIndication\1.0\si_inv_cd_len.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_inv_cd_min.bdy System\XmlTest\ServiceIndication\1.0\si_inv_cd_min.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_inv_cd_sec.bdy System\XmlTest\ServiceIndication\1.0\si_inv_cd_sec.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_inv_cd_year.bdy System\XmlTest\ServiceIndication\1.0\si_inv_cd_year.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_inv_ind.bdy System\XmlTest\ServiceIndication\1.0\si_inv_ind.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_inv_msg_emp.bdy System\XmlTest\ServiceIndication\1.0\si_inv_msg_emp.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_invalid_cdate.bdy System\XmlTest\ServiceIndication\1.0\si_invalid_cdate.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_act_de.bdy System\XmlTest\ServiceIndication\1.0\si_val_act_de.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_act_no.bdy System\XmlTest\ServiceIndication\1.0\si_val_act_no.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_act_sh.bdy System\XmlTest\ServiceIndication\1.0\si_val_act_sh.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_act_sl.bdy System\XmlTest\ServiceIndication\1.0\si_val_act_sl.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_act_sm.bdy System\XmlTest\ServiceIndication\1.0\si_val_act_sm.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_act_sn.bdy System\XmlTest\ServiceIndication\1.0\si_val_act_sn.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_char_iso_8859_1.bdy System\XmlTest\ServiceIndication\1.0\si_val_char_iso_8859_1.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_char_iso_8859_2.bdy System\XmlTest\ServiceIndication\1.0\si_val_char_iso_8859_2.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_char_iso_8859_3.bdy System\XmlTest\ServiceIndication\1.0\si_val_char_iso_8859_3.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_char_iso_8859_4.bdy System\XmlTest\ServiceIndication\1.0\si_val_char_iso_8859_4.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_char_iso_8859_5.bdy System\XmlTest\ServiceIndication\1.0\si_val_char_iso_8859_5.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_char_iso_8859_6.bdy System\XmlTest\ServiceIndication\1.0\si_val_char_iso_8859_6.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_char_iso_8859_7.bdy System\XmlTest\ServiceIndication\1.0\si_val_char_iso_8859_7.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_char_iso_8859_8.bdy System\XmlTest\ServiceIndication\1.0\si_val_char_iso_8859_8.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_char_iso_8859_9.bdy System\XmlTest\ServiceIndication\1.0\si_val_char_iso_8859_9.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_char_shift_JIS.bdy System\XmlTest\ServiceIndication\1.0\si_val_char_shift_JIS.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_char_us_ascii.bdy System\XmlTest\ServiceIndication\1.0\si_val_char_us_ascii.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_char_utf_8.bdy System\XmlTest\ServiceIndication\1.0\si_val_char_utf_8.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_exp_null.bdy System\XmlTest\ServiceIndication\1.0\si_val_exp_null.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_expired.bdy System\XmlTest\ServiceIndication\1.0\si_val_expired.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_ind_opq.bdy System\XmlTest\ServiceIndication\1.0\si_val_ind_opq.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_msg_emp_indatt.bdy System\XmlTest\ServiceIndication\1.0\si_val_msg_emp_indatt.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_no_cd.bdy System\XmlTest\ServiceIndication\1.0\si_val_no_cd.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_no_exp.bdy System\XmlTest\ServiceIndication\1.0\si_val_no_exp.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_only_href.bdy System\XmlTest\ServiceIndication\1.0\si_val_only_href.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_sender_encoding.bdy System\XmlTest\ServiceIndication\1.0\si_val_sender_encoding.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_wbx_ver_10.bdy System\XmlTest\ServiceIndication\1.0\si_val_wbx_ver_10.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_wbx_ver_11.bdy System\XmlTest\ServiceIndication\1.0\si_val_wbx_ver_11.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_wbx_ver_12.bdy System\XmlTest\ServiceIndication\1.0\si_val_wbx_ver_12.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_val_wbx_ver_13.bdy System\XmlTest\ServiceIndication\1.0\si_val_wbx_ver_13.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_valid.bdy System\XmlTest\ServiceIndication\1.0\si_valid.bdy
-data=ZSYSTEM\xmltest\serviceindication\1.0\si_valid_chi.bdy System\XmlTest\ServiceIndication\1.0\si_valid_chi.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_inv_act_multiple.bdy system\xmltest\serviceindication\1.0\si_inv_act_multiple.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_inv_act_multiple2.bdy system\xmltest\serviceindication\1.0\si_inv_act_multiple2.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_inv_cd_day.bdy system\xmltest\serviceindication\1.0\si_inv_cd_day.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_inv_cd_hour.bdy system\xmltest\serviceindication\1.0\si_inv_cd_hour.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_inv_cd_len.bdy system\xmltest\serviceindication\1.0\si_inv_cd_len.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_inv_cd_min.bdy system\xmltest\serviceindication\1.0\si_inv_cd_min.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_inv_cd_sec.bdy system\xmltest\serviceindication\1.0\si_inv_cd_sec.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_inv_cd_year.bdy system\xmltest\serviceindication\1.0\si_inv_cd_year.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_inv_ind.bdy system\xmltest\serviceindication\1.0\si_inv_ind.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_inv_msg_emp.bdy system\xmltest\serviceindication\1.0\si_inv_msg_emp.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_invalid_cdate.bdy system\xmltest\serviceindication\1.0\si_invalid_cdate.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_act_de.bdy system\xmltest\serviceindication\1.0\si_val_act_de.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_act_no.bdy system\xmltest\serviceindication\1.0\si_val_act_no.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_act_sh.bdy system\xmltest\serviceindication\1.0\si_val_act_sh.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_act_sl.bdy system\xmltest\serviceindication\1.0\si_val_act_sl.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_act_sm.bdy system\xmltest\serviceindication\1.0\si_val_act_sm.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_act_sn.bdy system\xmltest\serviceindication\1.0\si_val_act_sn.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_char_iso_8859_1.bdy system\xmltest\serviceindication\1.0\si_val_char_iso_8859_1.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_char_iso_8859_2.bdy system\xmltest\serviceindication\1.0\si_val_char_iso_8859_2.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_char_iso_8859_3.bdy system\xmltest\serviceindication\1.0\si_val_char_iso_8859_3.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_char_iso_8859_4.bdy system\xmltest\serviceindication\1.0\si_val_char_iso_8859_4.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_char_iso_8859_5.bdy system\xmltest\serviceindication\1.0\si_val_char_iso_8859_5.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_char_iso_8859_6.bdy system\xmltest\serviceindication\1.0\si_val_char_iso_8859_6.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_char_iso_8859_7.bdy system\xmltest\serviceindication\1.0\si_val_char_iso_8859_7.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_char_iso_8859_8.bdy system\xmltest\serviceindication\1.0\si_val_char_iso_8859_8.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_char_iso_8859_9.bdy system\xmltest\serviceindication\1.0\si_val_char_iso_8859_9.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_char_shift_JIS.bdy system\xmltest\serviceindication\1.0\si_val_char_shift_JIS.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_char_us_ascii.bdy system\xmltest\serviceindication\1.0\si_val_char_us_ascii.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_char_utf_8.bdy system\xmltest\serviceindication\1.0\si_val_char_utf_8.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_exp_null.bdy system\xmltest\serviceindication\1.0\si_val_exp_null.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_expired.bdy system\xmltest\serviceindication\1.0\si_val_expired.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_ind_opq.bdy system\xmltest\serviceindication\1.0\si_val_ind_opq.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_msg_emp_indatt.bdy system\xmltest\serviceindication\1.0\si_val_msg_emp_indatt.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_no_cd.bdy system\xmltest\serviceindication\1.0\si_val_no_cd.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_no_exp.bdy system\xmltest\serviceindication\1.0\si_val_no_exp.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_only_href.bdy system\xmltest\serviceindication\1.0\si_val_only_href.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_sender_encoding.bdy system\xmltest\serviceindication\1.0\si_val_sender_encoding.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_wbx_ver_10.bdy system\xmltest\serviceindication\1.0\si_val_wbx_ver_10.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_wbx_ver_11.bdy system\xmltest\serviceindication\1.0\si_val_wbx_ver_11.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_wbx_ver_12.bdy system\xmltest\serviceindication\1.0\si_val_wbx_ver_12.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_val_wbx_ver_13.bdy system\xmltest\serviceindication\1.0\si_val_wbx_ver_13.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_valid.bdy system\xmltest\serviceindication\1.0\si_valid.bdy
+data=CSYSTEM\xmltest\serviceindication\1.0\si_valid_chi.bdy system\xmltest\serviceindication\1.0\si_valid_chi.bdy
//Export of testdata to test Incident_INC127127L()
-data=EPOCROOT##Epoc32\data\z\system\xmltest\defects\00000036.emnc \system\xmltest\defects\00000036.emnc
-data=EPOCROOT##Epoc32\data\z\system\xmltest\defects\00000036b.emnc \system\xmltest\defects\00000036b.emnc
-data=EPOCROOT##Epoc32\data\z\system\xmltest\defects\00000060.emnc \system\xmltest\defects\00000060.emnc
-data=EPOCROOT##Epoc32\data\z\system\xmltest\defects\00000104.emnc \system\xmltest\defects\00000104.emnc
+data=EPOCROOT##Epoc32\data\c\system\xmltest\defects\00000036.emnc \system\xmltest\defects\00000036.emnc
+data=EPOCROOT##Epoc32\data\c\system\xmltest\defects\00000036b.emnc \system\xmltest\defects\00000036b.emnc
+data=EPOCROOT##Epoc32\data\c\system\xmltest\defects\00000060.emnc \system\xmltest\defects\00000060.emnc
+data=EPOCROOT##Epoc32\data\c\system\xmltest\defects\00000104.emnc \system\xmltest\defects\00000104.emnc
#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/wbxmlparser/test/rtest/group/wbxmlparsertests.pkg Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,266 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;Te_xml_ftmgrsuite.pkg
+
+; Languages -
+&EN
+
+; Installation header
+#{"Te_xml_ftmgrsuite"}, (0x20032632), 1, 0, 0, TYPE=SA
+%{"Nokia Corporation"}
+:"Nokia Corporation"
+
+(0x101f7961),0, 0, 0 ,{"Series60ProductID"}
+
+; Install files
+;Test exes
+"\epoc32\release\armv5\urel\t_wbxmlsyncmlparserstabilitytests.exe" - "c:\sys\bin\t_wbxmlsyncmlparserstabilitytests.exe"
+"\epoc32\release\armv5\urel\t_wbxmlwmlparserstabilitytests.exe" - "c:\sys\bin\t_wbxmlwmlparserstabilitytests.exe"
+"\epoc32\release\armv5\urel\t_wbxmlsiparserstabilitytests.exe" - "c:\sys\bin\t_wbxmlsiparserstabilitytests.exe"
+"\epoc32\release\armv5\urel\t_wbxmloomsyncmlparserstabilitytests.exe" - "c:\sys\bin\t_wbxmloomsyncmlparserstabilitytests.exe"
+"\epoc32\release\armv5\urel\t_wbxmloomwmlparserstabilitytests.exe" - "c:\sys\bin\t_wbxmloomwmlparserstabilitytests.exe"
+"\epoc32\release\armv5\urel\t_wbxmloomsiparserstabilitytests.exe" - "c:\sys\bin\t_wbxmloomsiparserstabilitytests.exe"
+"\epoc32\release\armv5\urel\t_wbxmlparsertests.exe" - "c:\sys\bin\t_wbxmlparsertests.exe"
+"\epoc32\release\armv5\urel\t_wbxmloomparsertests.exe" - "c:\sys\bin\t_wbxmloomparsertests.exe"
+"\epoc32\release\armv5\urel\t_wbxmlcorruptparsertests.exe" - "c:\sys\bin\t_wbxmlcorruptparsertests.exe"
+"\epoc32\release\armv5\urel\t_wbxmlunknownparsertests.exe" - "c:\sys\bin\t_wbxmlunknownparsertests.exe"
+"\epoc32\release\armv5\urel\t_wbxmlbehaviourparsertests.exe" - "c:\sys\bin\t_wbxmlbehaviourparsertests.exe"
+"\epoc32\release\armv5\urel\t_wbxmlparserucs4testspartone.exe" - "c:\sys\bin\t_wbxmlparserucs4testspartone.exe"
+"\epoc32\release\armv5\urel\t_wbxmldefects.exe" - "c:\sys\bin\t_wbxmldefects.exe"
+
+;Test String Dictionary plugin DLLs
+
+;Test String Dictionary Resource files
+"\epoc32\release\armv5\urel\wml1_1stringdictionary255.dll" - "c:\sys\bin\wml1_1stringdictionary255.dll"
+"\epoc32\data\Z\Resource\Plugins\wml1_1stringdictionary255.rsc" - "c:\Resource\Plugins\wml1_1stringdictionary255.rsc"
+
+;Test data
+"..\data\syncml\1.1\add-to-client\FromServer0.wbxml" - "c:\system\xmltest\syncml\1.1\add-to-client\FromServer0.wbxml"
+"..\data\syncml\1.1\add-to-client\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\add-to-client\FromServer1.wbxml"
+"..\data\syncml\1.1\add-to-client\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\add-to-client\FromServer2.wbxml"
+"..\data\syncml\1.1\add-to-client\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\add-to-client\FromServer3.wbxml"
+"..\data\syncml\1.1\add-to-server\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\add-to-server\FromServer1.wbxml"
+"..\data\syncml\1.1\add-to-server\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\add-to-server\FromServer2.wbxml"
+"..\data\syncml\1.1\add-to-server\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\add-to-server\FromServer3.wbxml"
+"..\data\syncml\1.1\atomic\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\atomic\FromServer1.wbxml"
+"..\data\syncml\1.1\atomic\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\atomic\FromServer2.wbxml"
+"..\data\syncml\1.1\atomic\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\atomic\FromServer3.wbxml"
+"..\data\syncml\1.1\authbasicfail\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\authbasicfail\FromServer1.wbxml"
+"..\data\syncml\1.1\authbasicfail\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\authbasicfail\FromServer2.wbxml"
+"..\data\syncml\1.1\authbasicfail\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\authbasicfail\FromServer3.wbxml"
+"..\data\syncml\1.1\authbasicfailfirst\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\authbasicfailfirst\FromServer1.wbxml"
+"..\data\syncml\1.1\authbasicfailfirst\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\authbasicfailfirst\FromServer2.wbxml"
+"..\data\syncml\1.1\authbasicfailfirst\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\authbasicfailfirst\FromServer3.wbxml"
+"..\data\syncml\1.1\authmd5fail\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\authmd5fail\FromServer1.wbxml"
+"..\data\syncml\1.1\authmd5fail\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\authmd5fail\FromServer2.wbxml"
+"..\data\syncml\1.1\authmd5fail\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\authmd5fail\FromServer3.wbxml"
+"..\data\syncml\1.1\authmd5failfirst\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\authmd5failfirst\FromServer1.wbxml"
+"..\data\syncml\1.1\authmd5failfirst\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\authmd5failfirst\FromServer2.wbxml"
+"..\data\syncml\1.1\authmd5failfirst\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\authmd5failfirst\FromServer3.wbxml"
+"..\data\syncml\1.1\client-large\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\client-large\FromServer1.wbxml"
+"..\data\syncml\1.1\client-large\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\client-large\FromServer2.wbxml"
+"..\data\syncml\1.1\client-large\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\client-large\FromServer3.wbxml"
+"..\data\syncml\1.1\client-large\FromServer4.wbxml" - "c:\system\xmltest\syncml\1.1\client-large\FromServer4.wbxml"
+"..\data\syncml\1.1\client-large-multiple\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\client-large-multiple\FromServer1.wbxml"
+"..\data\syncml\1.1\client-large-multiple\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\client-large-multiple\FromServer2.wbxml"
+"..\data\syncml\1.1\client-large-multiple\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\client-large-multiple\FromServer3.wbxml"
+"..\data\syncml\1.1\client-large-multiple\FromServer4.wbxml" - "c:\system\xmltest\syncml\1.1\client-large-multiple\FromServer4.wbxml"
+"..\data\syncml\1.1\devmanadd\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmanadd\FromServer1.wbxml"
+"..\data\syncml\1.1\devmanadd\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmanadd\FromServer2.wbxml"
+"..\data\syncml\1.1\devmanalertdisplay\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmanalertdisplay\FromServer1.wbxml"
+"..\data\syncml\1.1\devmanalertdisplay\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmanalertdisplay\FromServer2.wbxml"
+"..\data\syncml\1.1\devmanalertmultichoice\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmanalertmultichoice\FromServer1.wbxml"
+"..\data\syncml\1.1\devmanalertmultichoice\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmanalertmultichoice\FromServer2.wbxml"
+"..\data\syncml\1.1\devmanalertsinglechoice\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmanalertsinglechoice\FromServer1.wbxml"
+"..\data\syncml\1.1\devmanalertsinglechoice\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmanalertsinglechoice\FromServer2.wbxml"
+"..\data\syncml\1.1\devmanalerttextinput\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmanalerttextinput\FromServer1.wbxml"
+"..\data\syncml\1.1\devmanalerttextinput\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmanalerttextinput\FromServer2.wbxml"
+"..\data\syncml\1.1\devmanalertuseraccept\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmanalertuseraccept\FromServer1.wbxml"
+"..\data\syncml\1.1\devmanalertuseraccept\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmanalertuseraccept\FromServer2.wbxml"
+"..\data\syncml\1.1\devmanalertuserreject\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmanalertuserreject\FromServer1.wbxml"
+"..\data\syncml\1.1\devmanalertuserreject\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmanalertuserreject\FromServer2.wbxml"
+"..\data\syncml\1.1\devmanatomic\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmanatomic\FromServer1.wbxml"
+"..\data\syncml\1.1\devmanatomic\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmanatomic\FromServer2.wbxml"
+"..\data\syncml\1.1\devmanatomicAlertUserAccept\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmanatomicalertuseraccept\FromServer1.wbxml"
+"..\data\syncml\1.1\devmanatomicAlertUserAccept\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmanatomicalertuseraccept\FromServer2.wbxml"
+"..\data\syncml\1.1\devmanatomicAlertUserReject\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmanatomicalertuserreject\FromServer1.wbxml"
+"..\data\syncml\1.1\devmanatomicAlertUserReject\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmanatomicalertuserreject\FromServer2.wbxml"
+"..\data\syncml\1.1\devmanatomicFail\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmanatomicfail\FromServer1.wbxml"
+"..\data\syncml\1.1\devmanatomicFail\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmanatomicfail\FromServer2.wbxml"
+"..\data\syncml\1.1\devmandelete\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmandelete\FromServer1.wbxml"
+"..\data\syncml\1.1\devmandelete\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmandelete\FromServer2.wbxml"
+"..\data\syncml\1.1\devmanget\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmanget\FromServer1.wbxml"
+"..\data\syncml\1.1\devmanget\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmanget\FromServer2.wbxml"
+"..\data\syncml\1.1\devmanlargeobjectadd\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmanlargeobjectadd\FromServer1.wbxml"
+"..\data\syncml\1.1\devmanlargeobjectadd\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmanlargeobjectadd\FromServer2.wbxml"
+"..\data\syncml\1.1\devmanlargeobjectadd\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\devmanlargeobjectadd\FromServer3.wbxml"
+"..\data\syncml\1.1\devmanlargeobjectadd\FromServer4.wbxml" - "c:\system\xmltest\syncml\1.1\devmanlargeobjectadd\FromServer4.wbxml"
+"..\data\syncml\1.1\devmanlargeobjectget\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmanlargeobjectget\FromServer1.wbxml"
+"..\data\syncml\1.1\devmanlargeobjectget\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmanlargeobjectget\FromServer2.wbxml"
+"..\data\syncml\1.1\devmanlargeobjectget\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\devmanlargeobjectget\FromServer3.wbxml"
+"..\data\syncml\1.1\devmanlargeobjectget\FromServer4.wbxml" - "c:\system\xmltest\syncml\1.1\devmanlargeobjectget\FromServer4.wbxml"
+"..\data\syncml\1.1\devmanlargeobjectget\FromServer5.wbxml" - "c:\system\xmltest\syncml\1.1\devmanlargeobjectget\FromServer5.wbxml"
+"..\data\syncml\1.1\devmanreplace\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmanreplace\FromServer1.wbxml"
+"..\data\syncml\1.1\devmanreplace\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmanreplace\FromServer2.wbxml"
+"..\data\syncml\1.1\devmansequence\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmansequence\FromServer1.wbxml"
+"..\data\syncml\1.1\devmansequence\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmansequence\FromServer2.wbxml"
+"..\data\syncml\1.1\devmansequencealertuseraccept\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmansequencealertuseraccept\FromServer1.wbxml"
+"..\data\syncml\1.1\devmansequencealertuseraccept\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmansequencealertuseraccept\FromServer2.wbxml"
+"..\data\syncml\1.1\devmansequencealertuserreject\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmansequencealertuserreject\FromServer1.wbxml"
+"..\data\syncml\1.1\devmansequencealertuserreject\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmansequencealertuserreject\FromServer2.wbxml"
+"..\data\syncml\1.1\devmansequencefail\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmansequencefail\FromServer1.wbxml"
+"..\data\syncml\1.1\devmansequencefail\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\devmansequencefail\FromServer2.wbxml"
+"..\data\syncml\1.1\devmansimple\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\devmansimple\FromServer1.wbxml"
+"..\data\syncml\1.1\large-object-from-client\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\large-object-from-client\FromServer1.wbxml"
+"..\data\syncml\1.1\large-object-from-client\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\large-object-from-client\FromServer2.wbxml"
+"..\data\syncml\1.1\large-object-from-client\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\large-object-from-client\FromServer3.wbxml"
+"..\data\syncml\1.1\large-object-from-client\FromServer4.wbxml" - "c:\system\xmltest\syncml\1.1\large-object-from-client\FromServer4.wbxml"
+"..\data\syncml\1.1\large-object-from-server\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\large-object-from-server\FromServer1.wbxml"
+"..\data\syncml\1.1\large-object-from-server\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\large-object-from-server\FromServer2.wbxml"
+"..\data\syncml\1.1\large-object-from-server\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\large-object-from-server\FromServer3.wbxml"
+"..\data\syncml\1.1\large-object-from-server\FromServer4.wbxml" - "c:\system\xmltest\syncml\1.1\large-object-from-server\FromServer4.wbxml"
+"..\data\syncml\1.1\large-object-from-server2\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\large-object-from-server2\FromServer1.wbxml"
+"..\data\syncml\1.1\large-object-from-server2\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\large-object-from-server2\FromServer2.wbxml"
+"..\data\syncml\1.1\large-object-from-server2\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\large-object-from-server2\FromServer3.wbxml"
+"..\data\syncml\1.1\large-object-from-server2\FromServer4.wbxml" - "c:\system\xmltest\syncml\1.1\large-object-from-server2\FromServer4.wbxml"
+"..\data\syncml\1.1\multiple-db-sync\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\multiple-db-sync\FromServer1.wbxml"
+"..\data\syncml\1.1\multiple-db-sync\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\multiple-db-sync\FromServer2.wbxml"
+"..\data\syncml\1.1\multiple-db-sync\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\multiple-db-sync\FromServer3.wbxml"
+"..\data\syncml\1.1\one-way-client-refresh-sync\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\one-way-client-refresh-sync\FromServer1.wbxml"
+"..\data\syncml\1.1\one-way-client-refresh-sync\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\one-way-client-refresh-sync\FromServer2.wbxml"
+"..\data\syncml\1.1\one-way-client-refresh-sync\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\one-way-client-refresh-sync\FromServer3.wbxml"
+"..\data\syncml\1.1\one-way-client-sync\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\one-way-client-sync\FromServer1.wbxml"
+"..\data\syncml\1.1\one-way-client-sync\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\one-way-client-sync\FromServer2.wbxml"
+"..\data\syncml\1.1\one-way-client-sync\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\one-way-client-sync\FromServer3.wbxml"
+"..\data\syncml\1.1\one-way-server-refresh-sync\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\one-way-server-refresh-sync\FromServer1.wbxml"
+"..\data\syncml\1.1\one-way-server-refresh-sync\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\one-way-server-refresh-sync\FromServer2.wbxml"
+"..\data\syncml\1.1\one-way-server-refresh-sync\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\one-way-server-refresh-sync\FromServer3.wbxml"
+"..\data\syncml\1.1\one-way-server-sync\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\one-way-server-sync\FromServer1.wbxml"
+"..\data\syncml\1.1\one-way-server-sync\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\one-way-server-sync\FromServer2.wbxml"
+"..\data\syncml\1.1\one-way-server-sync\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\one-way-server-sync\FromServer3.wbxml"
+"..\data\syncml\1.1\pref-tx-rx\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\pref-tx-rx\FromServer1.wbxml"
+"..\data\syncml\1.1\pref-tx-rx\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\pref-tx-rx\FromServer2.wbxml"
+"..\data\syncml\1.1\pref-tx-rx\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\pref-tx-rx\FromServer3.wbxml"
+"..\data\syncml\1.1\server-busy\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\server-busy\FromServer1.wbxml"
+"..\data\syncml\1.1\server-large\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\server-large\FromServer1.wbxml"
+"..\data\syncml\1.1\server-large\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\server-large\FromServer2.wbxml"
+"..\data\syncml\1.1\server-large\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\server-large\FromServer3.wbxml"
+"..\data\syncml\1.1\server-large\FromServer4.wbxml" - "c:\system\xmltest\syncml\1.1\server-large\FromServer4.wbxml"
+"..\data\syncml\1.1\server-large-multiple\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\server-large-multiple\FromServer1.wbxml"
+"..\data\syncml\1.1\server-large-multiple\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\server-large-multiple\FromServer2.wbxml"
+"..\data\syncml\1.1\server-large-multiple\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\server-large-multiple\FromServer3.wbxml"
+"..\data\syncml\1.1\server-large-multiple\FromServer4.wbxml" - "c:\system\xmltest\syncml\1.1\server-large-multiple\FromServer4.wbxml"
+"..\data\syncml\1.1\server-large-multiple\FromServer5.wbxml" - "c:\system\xmltest\syncml\1.1\server-large-multiple\FromServer5.wbxml"
+"..\data\syncml\1.1\slow-sync\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\slow-sync\FromServer1.wbxml"
+"..\data\syncml\1.1\slow-sync\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\slow-sync\FromServer2.wbxml"
+"..\data\syncml\1.1\slow-sync\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\slow-sync\FromServer3.wbxml"
+"..\data\syncml\1.1\two-way-add\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\two-way-add\FromServer1.wbxml"
+"..\data\syncml\1.1\two-way-add\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\two-way-add\FromServer2.wbxml"
+"..\data\syncml\1.1\two-way-add\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\two-way-add\FromServer3.wbxml"
+"..\data\syncml\1.1\two-way-delete\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\two-way-delete\FromServer1.wbxml"
+"..\data\syncml\1.1\two-way-delete\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\two-way-delete\FromServer2.wbxml"
+"..\data\syncml\1.1\two-way-delete\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\two-way-delete\FromServer3.wbxml"
+"..\data\syncml\1.1\two-way-replace\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\two-way-replace\FromServer1.wbxml"
+"..\data\syncml\1.1\two-way-replace\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\two-way-replace\FromServer2.wbxml"
+"..\data\syncml\1.1\two-way-replace\FromServer3.wbxml" - "c:\system\xmltest\syncml\1.1\two-way-replace\FromServer3.wbxml"
+"..\data\syncml\1.1\two-way-sync\FromServer1.wbxml" - "c:\system\xmltest\syncml\1.1\two-way-sync\FromServer1.wbxml"
+"..\data\syncml\1.1\two-way-sync\FromServer2.wbxml" - "c:\system\xmltest\syncml\1.1\two-way-sync\FromServer2.wbxml"
+
+"..\data\syncml\1.2\defects\DEF063979.wbxml" - "c:\system\xmltest\syncml\1.2\defects\DEF063979.wbxml"
+"..\data\syncml\1.2\defects\DEF066185.wbxml" - "c:\system\xmltest\syncml\1.2\defects\DEF066185.wbxml"
+"..\data\syncml\1.2\defects\DEF078987_1.wbxml" - "c:\system\xmltest\syncml\1.2\defects\DEF078987_1.wbxml"
+"..\data\syncml\1.2\defects\DEF078987_2.wbxml" - "c:\system\xmltest\syncml\1.2\defects\DEF078987_2.wbxml"
+"..\data\syncml\1.2\defects\DEF078668.wbxml" - "c:\system\xmltest\syncml\1.2\defects\DEF078668.wbxml"
+
+"..\data\syncml\unknown\DEF078987_3.wbxml" - "c:\system\xmltest\syncml\unknown\DEF078987_3.wbxml"
+
+"..\data\wml\1.1\AllElements.wmlc" - "c:\system\xmltest\wml\1.1\AllElements.wmlc"
+"..\data\wml\1.1\CharEntities.wmlc" - "c:\system\xmltest\wml\1.1\CharEntities.wmlc"
+"..\data\wml\1.1\data.wmlc" - "c:\system\xmltest\wml\1.1\data.wmlc"
+"..\data\wml\1.1\http___www.bbc.co.uk_mobile_sportheads1.wmlc" - "c:\system\xmltest\wml\1.1\http___www.bbc.co.uk_mobile_sportheads1.wmlc"
+"..\data\wml\1.1\mob.wmlc" - "c:\system\xmltest\wml\1.1\mob.wmlc"
+"..\data\wml\1.1\Variables.wmlc" - "c:\system\xmltest\wml\1.1\Variables.wmlc"
+"..\data\wml\1.1\wireless_char.wmlc" - "c:\system\xmltest\wml\1.1\wireless_char.wmlc"
+
+"..\data\wml\corrupt\CorruptAttr_mob.wmlc" - "c:\system\xmltest\wml\Corrupt\CorruptAttr_mob.wmlc"
+"..\data\wml\corrupt\CorruptAttrVal_mob.wmlc" - "c:\system\xmltest\wml\Corrupt\CorruptAttrVal_mob.wmlc"
+"..\data\wml\corrupt\CorruptTag_AllElements.wmlc" - "c:\system\xmltest\wml\Corrupt\CorruptTag_AllElements.wmlc"
+"..\data\wml\corrupt\NonNullTermInlineStr.wmlc" - "c:\system\xmltest\wml\Corrupt\NonNullTermInlineStr.wmlc"
+
+"..\data\wml\unknown\UnknownPubId_AllElements.wmlc" - "c:\system\xmltest\wml\Unknown\UnknownPubId_AllElements.wmlc"
+
+"..\data\wml\codepage\wml_data_attr_copepage_255.wmlc" - "c:\system\xmltest\wml\Codepage\wml_data_attr_copepage_255.wmlc"
+
+"..\data\serviceindication\corrupt\si_inv_act_undf.bdy" - "c:\system\xmltest\serviceindication\Corrupt\si_inv_act_undf.bdy"
+"..\data\serviceindication\corrupt\si_inv_cd_token.bdy" - "c:\system\xmltest\serviceindication\Corrupt\si_inv_cd_token.bdy"
+"..\data\serviceindication\corrupt\si_inv_cd_type.bdy" - "c:\system\xmltest\serviceindication\Corrupt\si_inv_cd_type.bdy"
+"..\data\serviceindication\corrupt\si_inv_char.bdy" - "c:\system\xmltest\serviceindication\Corrupt\si_inv_char.bdy"
+"..\data\serviceindication\corrupt\si_inv_hrf_ter.bdy" - "c:\system\xmltest\serviceindication\Corrupt\si_inv_hrf_ter.bdy"
+"..\data\serviceindication\corrupt\si_inv_msg_ter.bdy" - "c:\system\xmltest\serviceindication\Corrupt\si_inv_msg_ter.bdy"
+"..\data\serviceindication\corrupt\si_inv_msg_ter2.bdy" - "c:\system\xmltest\serviceindication\Corrupt\si_inv_msg_ter2.bdy"
+"..\data\serviceindication\corrupt\si_val_wbx_ver_14.bdy" - "c:\system\xmltest\serviceindication\Corrupt\si_val_wbx_ver_14.bdy"
+"..\data\serviceindication\corrupt\si_val_wbx_ver_30.bdy" - "c:\system\xmltest\serviceindication\Corrupt\si_val_wbx_ver_30.bdy"
+"..\data\serviceindication\corrupt\si_val_wbx_ver_FF.bdy" - "c:\system\xmltest\serviceindication\Corrupt\si_val_wbx_ver_FF.bdy"
+"..\data\serviceindication\corrupt\si_inv_msg_emp2.bdy" - "c:\system\xmltest\serviceindication\Corrupt\si_inv_msg_emp2.bdy"
+
+"..\data\serviceindication\1.0\si_inv_act_multiple.bdy" - "c:\system\xmltest\serviceindication\1.0\si_inv_act_multiple.bdy"
+"..\data\serviceindication\1.0\si_inv_act_multiple2.bdy" - "c:\system\xmltest\serviceindication\1.0\si_inv_act_multiple2.bdy"
+"..\data\serviceindication\1.0\si_inv_cd_day.bdy" - "c:\system\xmltest\serviceindication\1.0\si_inv_cd_day.bdy"
+"..\data\serviceindication\1.0\si_inv_cd_hour.bdy" - "c:\system\xmltest\serviceindication\1.0\si_inv_cd_hour.bdy"
+"..\data\serviceindication\1.0\si_inv_cd_len.bdy" - "c:\system\xmltest\serviceindication\1.0\si_inv_cd_len.bdy"
+"..\data\serviceindication\1.0\si_inv_cd_min.bdy" - "c:\system\xmltest\serviceindication\1.0\si_inv_cd_min.bdy"
+"..\data\serviceindication\1.0\si_inv_cd_sec.bdy" - "c:\system\xmltest\serviceindication\1.0\si_inv_cd_sec.bdy"
+"..\data\serviceindication\1.0\si_inv_cd_year.bdy" - "c:\system\xmltest\serviceindication\1.0\si_inv_cd_year.bdy"
+"..\data\serviceindication\1.0\si_inv_ind.bdy" - "c:\system\xmltest\serviceindication\1.0\si_inv_ind.bdy"
+"..\data\serviceindication\1.0\si_inv_msg_emp.bdy" - "c:\system\xmltest\serviceindication\1.0\si_inv_msg_emp.bdy"
+"..\data\serviceindication\1.0\si_invalid_cdate.bdy" - "c:\system\xmltest\serviceindication\1.0\si_invalid_cdate.bdy"
+"..\data\serviceindication\1.0\si_val_act_de.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_act_de.bdy"
+"..\data\serviceindication\1.0\si_val_act_no.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_act_no.bdy"
+"..\data\serviceindication\1.0\si_val_act_sh.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_act_sh.bdy"
+"..\data\serviceindication\1.0\si_val_act_sl.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_act_sl.bdy"
+"..\data\serviceindication\1.0\si_val_act_sm.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_act_sm.bdy"
+"..\data\serviceindication\1.0\si_val_act_sn.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_act_sn.bdy"
+"..\data\serviceindication\1.0\si_val_char_iso_8859_1.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_char_iso_8859_1.bdy"
+"..\data\serviceindication\1.0\si_val_char_iso_8859_2.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_char_iso_8859_2.bdy"
+"..\data\serviceindication\1.0\si_val_char_iso_8859_3.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_char_iso_8859_3.bdy"
+"..\data\serviceindication\1.0\si_val_char_iso_8859_4.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_char_iso_8859_4.bdy"
+"..\data\serviceindication\1.0\si_val_char_iso_8859_5.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_char_iso_8859_5.bdy"
+"..\data\serviceindication\1.0\si_val_char_iso_8859_6.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_char_iso_8859_6.bdy"
+"..\data\serviceindication\1.0\si_val_char_iso_8859_7.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_char_iso_8859_7.bdy"
+"..\data\serviceindication\1.0\si_val_char_iso_8859_8.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_char_iso_8859_8.bdy"
+"..\data\serviceindication\1.0\si_val_char_iso_8859_9.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_char_iso_8859_9.bdy"
+"..\data\serviceindication\1.0\si_val_char_shift_JIS.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_char_shift_JIS.bdy"
+"..\data\serviceindication\1.0\si_val_char_us_ascii.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_char_us_ascii.bdy"
+"..\data\serviceindication\1.0\si_val_char_utf_8.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_char_utf_8.bdy"
+"..\data\serviceindication\1.0\si_val_exp_null.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_exp_null.bdy"
+"..\data\serviceindication\1.0\si_val_expired.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_expired.bdy"
+"..\data\serviceindication\1.0\si_val_ind_opq.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_ind_opq.bdy"
+"..\data\serviceindication\1.0\si_val_msg_emp_indatt.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_msg_emp_indatt.bdy"
+"..\data\serviceindication\1.0\si_val_no_cd.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_no_cd.bdy"
+"..\data\serviceindication\1.0\si_val_no_exp.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_no_exp.bdy"
+"..\data\serviceindication\1.0\si_val_only_href.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_only_href.bdy"
+"..\data\serviceindication\1.0\si_val_sender_encoding.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_sender_encoding.bdy"
+"..\data\serviceindication\1.0\si_val_wbx_ver_10.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_wbx_ver_10.bdy"
+"..\data\serviceindication\1.0\si_val_wbx_ver_11.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_wbx_ver_11.bdy"
+"..\data\serviceindication\1.0\si_val_wbx_ver_12.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_wbx_ver_12.bdy"
+"..\data\serviceindication\1.0\si_val_wbx_ver_13.bdy" - "c:\system\xmltest\serviceindication\1.0\si_val_wbx_ver_13.bdy"
+"..\data\serviceindication\1.0\si_valid.bdy" - "c:\system\xmltest\serviceindication\1.0\si_valid.bdy"
+"..\data\serviceindication\1.0\si_valid_chi.bdy" - "c:\system\xmltest\serviceindication\1.0\si_valid_chi.bdy"
+
+;Export of testdata to test Incident_INC127127L()
+"..\data\defects\00000036.emnc" - "c:\system\xmltest\defects\00000036.emnc"
+"..\data\defects\00000036b.emnc" - "c:\system\xmltest\defects\00000036b.emnc"
+"..\data\defects\00000060.emnc" - "c:\system\xmltest\defects\00000060.emnc"
+"..\data\defects\00000104.emnc" - "c:\system\xmltest\defects\00000104.emnc"
\ No newline at end of file
--- a/xml/wbxmlparser/test/rtest/group/wml1_1stringdictionary255.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/group/wml1_1stringdictionary255.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -13,6 +13,8 @@
// Description:
//
+//RTEST
+
TARGET wml1_1stringdictionary255.dll
CAPABILITY All -Tcb
TARGETTYPE plugin
--- a/xml/wbxmlparser/test/rtest/tsrc/t_wbxmlcorruptparsertests.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/tsrc/t_wbxmlcorruptparsertests.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -26,21 +26,21 @@
_LIT8 (KWmlStringDictionaryUri,"4~0");
_LIT8 (KSiStringDictionaryUri, "5~0");
-_LIT (KTestDocument1, "z:\\system\\XmlTest\\Wml\\Corrupt\\CorruptTag_AllElements.wmlc");
-_LIT (KTestDocument2, "z:\\system\\XmlTest\\Wml\\Corrupt\\CorruptAttr_mob.wmlc");
-_LIT (KTestDocument3, "z:\\system\\XmlTest\\Wml\\Corrupt\\CorruptAttrVal_mob.wmlc");
-_LIT (KTestDocument4, "z:\\system\\XmlTest\\Wml\\Corrupt\\NonNullTermInlineStr.wmlc");
+_LIT (KTestDocument1, "c:\\system\\XmlTest\\Wml\\Corrupt\\CorruptTag_AllElements.wmlc");
+_LIT (KTestDocument2, "c:\\system\\XmlTest\\Wml\\Corrupt\\CorruptAttr_mob.wmlc");
+_LIT (KTestDocument3, "c:\\system\\XmlTest\\Wml\\Corrupt\\CorruptAttrVal_mob.wmlc");
+_LIT (KTestDocument4, "c:\\system\\XmlTest\\Wml\\Corrupt\\NonNullTermInlineStr.wmlc");
-_LIT (KTestDocument20, "z:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_inv_act_undf.bdy");
-_LIT (KTestDocument21, "z:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_inv_cd_token.bdy");
-_LIT (KTestDocument22, "z:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_inv_cd_type.bdy");
-_LIT (KTestDocument23, "z:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_inv_char.bdy");
-_LIT (KTestDocument24, "z:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_inv_msg_ter.bdy");
-_LIT (KTestDocument25, "z:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_val_wbx_ver_14.bdy");
-_LIT (KTestDocument26,"z:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_val_wbx_ver_30.bdy");
-_LIT (KTestDocument27,"z:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_val_wbx_ver_FF.bdy");
-_LIT (KTestDocument28,"z:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_inv_hrf_ter.bdy");
-_LIT (KTestDocument29,"z:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_inv_msg_ter2.bdy");
+_LIT (KTestDocument20, "c:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_inv_act_undf.bdy");
+_LIT (KTestDocument21, "c:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_inv_cd_token.bdy");
+_LIT (KTestDocument22, "c:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_inv_cd_type.bdy");
+_LIT (KTestDocument23, "c:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_inv_char.bdy");
+_LIT (KTestDocument24, "c:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_inv_msg_ter.bdy");
+_LIT (KTestDocument25, "c:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_val_wbx_ver_14.bdy");
+_LIT (KTestDocument26,"c:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_val_wbx_ver_30.bdy");
+_LIT (KTestDocument27,"c:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_val_wbx_ver_FF.bdy");
+_LIT (KTestDocument28,"c:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_inv_hrf_ter.bdy");
+_LIT (KTestDocument29,"c:\\system\\XmlTest\\ServiceIndication\\Corrupt\\si_inv_msg_ter2.bdy");
static RTest test(_L("t_WbxmlCorruptParserTests"));
--- a/xml/wbxmlparser/test/rtest/tsrc/t_wbxmldefects.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/tsrc/t_wbxmldefects.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -28,12 +28,12 @@
LOCAL_D CTrapCleanup* TheTrapCleanup = NULL;
// Installed via bld.inf test exports
-_LIT (KTestDocument1,"z:\\system\\xmltest\\SyncML\\1.2\\Defects\\DEF078987_1.wbxml");
-_LIT (KTestDocument2,"z:\\system\\xmlTest\\SyncML\\1.2\\Defects\\DEF078987_2.wbxml");
-_LIT (KCorruptWAPEmailPushMsg1,"z:\\system\\xmltest\\defects\\00000036.emnc");
-_LIT (KCorruptWAPEmailPushMsg2,"z:\\system\\xmltest\\defects\\00000036b.emnc");
-_LIT (KCorruptWAPEmailPushMsg3,"z:\\system\\xmltest\\defects\\00000060.emnc");
-_LIT (KCorruptWAPEmailPushMsg4,"z:\\system\\xmltest\\defects\\00000104.emnc");
+_LIT (KTestDocument1,"c:\\system\\xmltest\\SyncML\\1.2\\Defects\\DEF078987_1.wbxml");
+_LIT (KTestDocument2,"c:\\system\\xmlTest\\SyncML\\1.2\\Defects\\DEF078987_2.wbxml");
+_LIT (KCorruptWAPEmailPushMsg1,"c:\\system\\xmltest\\defects\\00000036.emnc");
+_LIT (KCorruptWAPEmailPushMsg2,"c:\\system\\xmltest\\defects\\00000036b.emnc");
+_LIT (KCorruptWAPEmailPushMsg3,"c:\\system\\xmltest\\defects\\00000060.emnc");
+_LIT (KCorruptWAPEmailPushMsg4,"c:\\system\\xmltest\\defects\\00000104.emnc");
typedef void (*TestFunc) (void);
@@ -371,8 +371,8 @@
{
test.Next(_L(" @SYMTestCaseID:SYSLIB-XML-UT-1679 "));
_LIT8 (KWbxmlParserDataType, "text/wbxml");
- _LIT (KTestDocument1, "z:\\system\\XmlTest\\SyncML\\1.1\\add-to-client\\FromServer1.wbxml");
- _LIT (KTestDocument2, "z:\\system\\XmlTest\\SyncML\\1.1\\add-to-server\\FromServer1.wbxml");
+ _LIT (KTestDocument1, "c:\\system\\XmlTest\\SyncML\\1.1\\add-to-client\\FromServer1.wbxml");
+ _LIT (KTestDocument2, "c:\\system\\XmlTest\\SyncML\\1.1\\add-to-server\\FromServer1.wbxml");
RDefectTests handler;
CleanupClosePushL (handler);
--- a/xml/wbxmlparser/test/rtest/tsrc/t_wbxmloomparsertests.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/tsrc/t_wbxmloomparsertests.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -21,17 +21,17 @@
#include "stabilitytestclass.h"
#include "testdocuments.h"
-_LIT (KTestDocument1, "z:\\system\\XmlTest\\SyncML\\1.1\\add-to-client\\FromServer1.wbxml");
-_LIT (KTestDocument2, "z:\\system\\XmlTest\\SyncML\\1.1\\add-to-server\\FromServer1.wbxml");
-_LIT (KTestDocument3, "z:\\system\\XmlTest\\SyncML\\1.1\\Atomic\\FromServer1.wbxml");
-_LIT (KTestDocument4, "z:\\system\\XmlTest\\Wml\\1.1\\AllElements.wmlc");
-_LIT (KTestDocument5, "z:\\system\\XmlTest\\Wml\\1.1\\CharEntities.wmlc");
-_LIT (KTestDocument6, "z:\\system\\XmlTest\\Wml\\1.1\\data.wmlc");
-_LIT (KTestDocument7, "z:\\system\\XmlTest\\Wml\\1.1\\http___www.bbc.co.uk_mobile_sportheads1.wmlc");
-_LIT (KTestDocument8, "z:\\system\\XmlTest\\Wml\\1.1\\mob.wmlc");
-_LIT (KTestDocument9, "z:\\system\\XmlTest\\Wml\\1.1\\Variables.wmlc");
-_LIT (KTestDocument10,"z:\\system\\XmlTest\\Wml\\1.1\\wireless_char.wmlc");
-_LIT (KTestDocument11,"z:\\system\\XmlTest\\Wml\\Codepage\\wml_data_attr_copepage_255.wmlc");
+_LIT (KTestDocument1, "c:\\system\\XmlTest\\SyncML\\1.1\\add-to-client\\FromServer1.wbxml");
+_LIT (KTestDocument2, "c:\\system\\XmlTest\\SyncML\\1.1\\add-to-server\\FromServer1.wbxml");
+_LIT (KTestDocument3, "c:\\system\\XmlTest\\SyncML\\1.1\\Atomic\\FromServer1.wbxml");
+_LIT (KTestDocument4, "c:\\system\\XmlTest\\Wml\\1.1\\AllElements.wmlc");
+_LIT (KTestDocument5, "c:\\system\\XmlTest\\Wml\\1.1\\CharEntities.wmlc");
+_LIT (KTestDocument6, "c:\\system\\XmlTest\\Wml\\1.1\\data.wmlc");
+_LIT (KTestDocument7, "c:\\system\\XmlTest\\Wml\\1.1\\http___www.bbc.co.uk_mobile_sportheads1.wmlc");
+_LIT (KTestDocument8, "c:\\system\\XmlTest\\Wml\\1.1\\mob.wmlc");
+_LIT (KTestDocument9, "c:\\system\\XmlTest\\Wml\\1.1\\Variables.wmlc");
+_LIT (KTestDocument10,"c:\\system\\XmlTest\\Wml\\1.1\\wireless_char.wmlc");
+_LIT (KTestDocument11,"c:\\system\\XmlTest\\Wml\\Codepage\\wml_data_attr_copepage_255.wmlc");
// Some characters had to have their string representation amended.
// i.e. dir paths should be seperated by '\\'
--- a/xml/wbxmlparser/test/rtest/tsrc/t_wbxmloomsyncmlparserstabilitytests.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/tsrc/t_wbxmloomsyncmlparserstabilitytests.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -73,7 +73,7 @@
syncmlTestMax->StabilityTestL(KOpaqueDirectory(), KWbxmlExt(), &CStabilityTestClass::TestChunkL);
CleanupStack::PopAndDestroy(syncmlTestMax);
- ::DeleteTestDirL();
+ //::DeleteTestDirL();
__UHEAP_MARKEND;
}
--- a/xml/wbxmlparser/test/rtest/tsrc/t_wbxmlparsertests.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/tsrc/t_wbxmlparsertests.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -20,18 +20,18 @@
#include "stabilitytestclass.h"
#include "testdocuments.h"
-_LIT (KTestDocument0, "z:\\system\\XmlTest\\SyncML\\1.1\\add-to-client\\FromServer0.wbxml");
-_LIT (KTestDocument1, "z:\\system\\XmlTest\\SyncML\\1.1\\add-to-client\\FromServer1.wbxml");
-_LIT (KTestDocument2, "z:\\system\\XmlTest\\SyncML\\1.1\\add-to-server\\FromServer1.wbxml");
-_LIT (KTestDocument3, "z:\\system\\XmlTest\\SyncML\\1.1\\Atomic\\FromServer1.wbxml");
-_LIT (KTestDocument4, "z:\\system\\XmlTest\\Wml\\1.1\\AllElements.wmlc");
-_LIT (KTestDocument5, "z:\\system\\XmlTest\\Wml\\1.1\\CharEntities.wmlc");
-_LIT (KTestDocument6, "z:\\system\\XmlTest\\Wml\\1.1\\data.wmlc");
-_LIT (KTestDocument7, "z:\\system\\XmlTest\\Wml\\1.1\\http___www.bbc.co.uk_mobile_sportheads1.wmlc");
-_LIT (KTestDocument8, "z:\\system\\XmlTest\\Wml\\1.1\\mob.wmlc");
-_LIT (KTestDocument9, "z:\\system\\XmlTest\\Wml\\1.1\\Variables.wmlc");
-_LIT (KTestDocument10,"z:\\system\\XmlTest\\Wml\\1.1\\wireless_char.wmlc");
-_LIT (KTestDocument11,"z:\\system\\XmlTest\\Wml\\Codepage\\wml_data_attr_copepage_255.wmlc");
+_LIT (KTestDocument0, "c:\\system\\XmlTest\\SyncML\\1.1\\add-to-client\\FromServer0.wbxml");
+_LIT (KTestDocument1, "c:\\system\\XmlTest\\SyncML\\1.1\\add-to-client\\FromServer1.wbxml");
+_LIT (KTestDocument2, "c:\\system\\XmlTest\\SyncML\\1.1\\add-to-server\\FromServer1.wbxml");
+_LIT (KTestDocument3, "c:\\system\\XmlTest\\SyncML\\1.1\\Atomic\\FromServer1.wbxml");
+_LIT (KTestDocument4, "c:\\system\\XmlTest\\Wml\\1.1\\AllElements.wmlc");
+_LIT (KTestDocument5, "c:\\system\\XmlTest\\Wml\\1.1\\CharEntities.wmlc");
+_LIT (KTestDocument6, "c:\\system\\XmlTest\\Wml\\1.1\\data.wmlc");
+_LIT (KTestDocument7, "c:\\system\\XmlTest\\Wml\\1.1\\http___www.bbc.co.uk_mobile_sportheads1.wmlc");
+_LIT (KTestDocument8, "c:\\system\\XmlTest\\Wml\\1.1\\mob.wmlc");
+_LIT (KTestDocument9, "c:\\system\\XmlTest\\Wml\\1.1\\Variables.wmlc");
+_LIT (KTestDocument10,"c:\\system\\XmlTest\\Wml\\1.1\\wireless_char.wmlc");
+_LIT (KTestDocument11,"c:\\system\\XmlTest\\Wml\\Codepage\\wml_data_attr_copepage_255.wmlc");
// Some characters had to have their string representation amended.
// i.e. dir paths should be seperated by '\\'
--- a/xml/wbxmlparser/test/rtest/tsrc/t_wbxmlsyncmlparserstabilitytests.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/tsrc/t_wbxmlsyncmlparserstabilitytests.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -59,8 +59,7 @@
{
test.Next(_L(" @SYMTestCaseID:SYSLIB-XML-CT-3723 SyncmlTestsL tests... "));
- __UHEAP_MARK;
-
+ __UHEAP_MARK;
CStabilityTestClass* syncml1_1TestWithOpaque = CStabilityTestClass::NewL(test, EFalse, KMaxChunkSize);
CleanupStack::PushL(syncml1_1TestWithOpaque);
syncml1_1TestWithOpaque->StabilityTestL(KSyncML1_1Directory(), KWbxmlExt(), &CStabilityTestClass::TestWholeL);
@@ -73,8 +72,7 @@
syncml1_1TestMax->StabilityTestL(KOpaqueDirectory(), KWbxmlExt(), &CStabilityTestClass::TestChunkL);
CleanupStack::PopAndDestroy(syncml1_1TestMax);
- ::DeleteTestDirL();
-
+ //::DeleteTestDirL();
CStabilityTestClass* syncml1_2TestWithOpaque = CStabilityTestClass::NewL(test, EFalse, KMaxChunkSize);
CleanupStack::PushL(syncml1_2TestWithOpaque);
syncml1_2TestWithOpaque->StabilityTestL(KSyncML1_2Directory(), KWbxmlExt(), &CStabilityTestClass::TestWholeL);
@@ -87,7 +85,7 @@
syncml1_2TestMax->StabilityTestL(KOpaqueDirectory(), KWbxmlExt(), &CStabilityTestClass::TestChunkL);
CleanupStack::PopAndDestroy(syncml1_2TestMax);
- ::DeleteTestDirL();
+ //::DeleteTestDirL();
__UHEAP_MARKEND;
}
--- a/xml/wbxmlparser/test/rtest/tsrc/t_wbxmlunknownparsertests.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/tsrc/t_wbxmlunknownparsertests.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -31,8 +31,8 @@
_LIT8 (KStringDictionaryDTDSML10, "-//SYNCML//DTD SyncML 1.0//EN~0");
_LIT8 (KStringDictionaryDTDSML11, "-//SYNCML//DTD SyncML 1.1//EN~0");
-_LIT (KTestDocument, "z:\\system\\XmlTest\\Wml\\Unknown\\UnknownPubId_AllElements.wmlc");
-_LIT (KTestDocument1, "z:\\system\\XmlTest\\SyncML\\Unknown\\DEF078987_3.wbxml");
+_LIT (KTestDocument, "c:\\system\\XmlTest\\Wml\\Unknown\\UnknownPubId_AllElements.wmlc");
+_LIT (KTestDocument1, "c:\\system\\XmlTest\\SyncML\\Unknown\\DEF078987_3.wbxml");
static RTest test(_L("t_wbxmlunknownparsertests"));
--- a/xml/wbxmlparser/test/rtest/tsrc/testdocuments.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/wbxmlparser/test/rtest/tsrc/testdocuments.h Thu Jul 22 16:49:54 2010 +0100
@@ -20,24 +20,24 @@
// Encoding XML documents
-_LIT(KXmlEngUtf, "z:\\system\\XmlTest\\Encodings\\doc_eng_utf.xml");
-_LIT(KXmlChBig5, "z:\\system\\XmlTest\\Encodings\\doc_ch_b5.xml");
-_LIT(KXmlChUtf, "z:\\system\\XmlTest\\Encodings\\doc_ch_utf.xml");
-_LIT(KXmlFrHtml, "z:\\system\\XmlTest\\Encodings\\doc_fr_html.xml");
-_LIT(KXmlFrLatin1, "z:\\system\\XmlTest\\Encodings\\doc_fr_latin1.xml");
-_LIT(KXmlFrUtf, "z:\\system\\XmlTest\\Encodings\\doc_fr_utf.xml");
-_LIT(KXmlJpEuc, "z:\\system\\XmlTest\\Encodings\\doc_jp_euc.xml");
-_LIT(KXmlJpSjis, "z:\\system\\XmlTest\\Encodings\\doc_jp_sjis.xml");
-_LIT(KXmlJpUtf, "z:\\system\\XmlTest\\Encodings\\doc_jp_utf.xml");
+_LIT(KXmlEngUtf, "c:\\system\\XmlTest\\Encodings\\doc_eng_utf.xml");
+_LIT(KXmlChBig5, "c:\\system\\XmlTest\\Encodings\\doc_ch_b5.xml");
+_LIT(KXmlChUtf, "c:\\system\\XmlTest\\Encodings\\doc_ch_utf.xml");
+_LIT(KXmlFrHtml, "c:\\system\\XmlTest\\Encodings\\doc_fr_html.xml");
+_LIT(KXmlFrLatin1, "c:\\system\\XmlTest\\Encodings\\doc_fr_latin1.xml");
+_LIT(KXmlFrUtf, "c:\\system\\XmlTest\\Encodings\\doc_fr_utf.xml");
+_LIT(KXmlJpEuc, "c:\\system\\XmlTest\\Encodings\\doc_jp_euc.xml");
+_LIT(KXmlJpSjis, "c:\\system\\XmlTest\\Encodings\\doc_jp_sjis.xml");
+_LIT(KXmlJpUtf, "c:\\system\\XmlTest\\Encodings\\doc_jp_utf.xml");
// SyncML XML/WBXML documents directory.
// This contains a list of dirctories that contains the actual documents for test.
// NOTE there are NO trailing back slash.
-_LIT(KSyncML1_1Directory, "z:\\system\\XmlTest\\SyncML\\1.1");
-_LIT(KSyncML1_2Directory, "z:\\system\\XmlTest\\SyncML\\1.2");
-_LIT(KWml1_1Directory, "z:\\system\\XmlTest\\Wml\\1.1");
-_LIT(KSi1_0Directory, "z:\\system\\XmlTest\\ServiceIndication\\1.0");
+_LIT(KSyncML1_1Directory, "c:\\system\\XmlTest\\SyncML\\1.1");
+_LIT(KSyncML1_2Directory, "c:\\system\\XmlTest\\SyncML\\1.2");
+_LIT(KWml1_1Directory, "c:\\system\\XmlTest\\Wml\\1.1");
+_LIT(KSi1_0Directory, "c:\\system\\XmlTest\\ServiceIndication\\1.0");
_LIT(KOpaqueDirectory, "c:\\system\\XmlTest\\Opaque");
_LIT8(KWbxmlParserDataType, "text/wbxml");
--- a/xml/xmldomandxpath/group/syslibs_xmldom.mrp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmldomandxpath/group/syslibs_xmldom.mrp Thu Jul 22 16:49:54 2010 +0100
@@ -1,19 +1,3 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
component syslibs_xmldom
source \sf\os\xmlsrv\xml\xmldomandxpath
--- a/xml/xmldomandxpath/src/xmlengineserializer/xmlengcontenthandler.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmldomandxpath/src/xmlengineserializer/xmlengcontenthandler.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -284,7 +284,7 @@
HBufC8* uri = aUri.DesC().AllocL();
iCachedPrefixes.AppendL(pref);
iCachedUris.AppendL(uri);
- iCachedErrors.Append(aErrorCode);
+ User::LeaveIfError(iCachedErrors.Append(aErrorCode));
}
/**
--- a/xml/xmldomandxpath/test/tef/group/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmldomandxpath/test/tef/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -26,25 +26,25 @@
PRJ_TESTEXPORTS
-//../domsmoketest/scripts/domelemsmoketest.script z:/xml/scripts/domelemsmoketest.script
-//../domsmoketest/scripts/domelemsmoketest.ini z:/xml/scripts/domelemsmoketest.ini
-//../domsmoketest/scripts/domchunkcontsmoketest.script z:/xml/scripts/domchunkcontsmoketest.script
-//../domsmoketest/scripts/domchunkcontsmoketest.ini z:/xml/scripts/domchunkcontsmoketest.ini
+//../domsmoketest/scripts/domelemsmoketest.script c:/xml/scripts/domelemsmoketest.script
+//../domsmoketest/scripts/domelemsmoketest.ini c:/xml/scripts/domelemsmoketest.ini
+//../domsmoketest/scripts/domchunkcontsmoketest.script c:/xml/scripts/domchunkcontsmoketest.script
+//../domsmoketest/scripts/domchunkcontsmoketest.ini c:/xml/scripts/domchunkcontsmoketest.ini
-//../domserializersmoketest/scripts/domserializersmoketest.script z:/xml/scripts/domserializersmoketest.script
-//../domserializersmoketest/scripts/domserializersmoketest.ini z:/xml/scripts/domserializersmoketest.ini
+//../domserializersmoketest/scripts/domserializersmoketest.script c:/xml/scripts/domserializersmoketest.script
+//../domserializersmoketest/scripts/domserializersmoketest.ini c:/xml/scripts/domserializersmoketest.ini
-//../../data/domgeneral/element/input/correct/dom_elem_001.xml z:/xml/data/dom_elem_001.xml
-//../../data/domgeneral/element/input/correct/dom_elem_002.xml z:/xml/data/dom_elem_002.xml
-//../../data/domgeneral/element/input/correct/dom_elem_004.xml z:/xml/data/dom_elem_004.xml
-//../../data/domgeneral/element/input/correct/dom_elem_000_schema.xml z:/xml/data/dom_elem_000_schema.xml
-//../../data/domgeneral/element/verification/correct/dom_elem_001.ref z:/xml/data/dom_elem_001.ref
-//../../data/domgeneral/element/verification/correct/dom_elem_002.ref z:/xml/data/dom_elem_002.ref
-//../../data/domgeneral/element/verification/correct/dom_elem_004.ref z:/xml/data/dom_elem_004.ref
+//../../data/domgeneral/element/input/correct/dom_elem_001.xml c:/xml/data/dom_elem_001.xml
+//../../data/domgeneral/element/input/correct/dom_elem_002.xml c:/xml/data/dom_elem_002.xml
+//../../data/domgeneral/element/input/correct/dom_elem_004.xml c:/xml/data/dom_elem_004.xml
+//../../data/domgeneral/element/input/correct/dom_elem_000_schema.xml c:/xml/data/dom_elem_000_schema.xml
+//../../data/domgeneral/element/verification/correct/dom_elem_001.ref c:/xml/data/dom_elem_001.ref
+//../../data/domgeneral/element/verification/correct/dom_elem_002.ref c:/xml/data/dom_elem_002.ref
+//../../data/domgeneral/element/verification/correct/dom_elem_004.ref c:/xml/data/dom_elem_004.ref
-//../../data/chunk/cont/input/correct/xml_wf_11.xml z:/xml/data/xml_wf_11.xml
+//../../data/chunk/cont/input/correct/xml_wf_11.xml c:/xml/data/xml_wf_11.xml
-//../../data/serializer/default/verification/correct/serdefault-serializerl.ref //z:/xml/data/serdefault-serializerl.ref
+//../../data/serializer/default/verification/correct/serdefault-serializerl.ref //c:/xml/data/serdefault-serializerl.ref
//domsmoktesttefsuite.iby /epoc32/rom/include/domsmoktesttefsuite.iby
--- a/xml/xmldomandxpath/test/tef/group/te_headerstests.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmldomandxpath/test/tef/group/te_headerstests.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -18,10 +18,11 @@
TARGET t_xmlheaderstest.exe
TARGETTYPE exe
-SYSTEMINCLUDE /epoc32/include
-SYSTEMINCLUDE /epoc32/include/libc
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+OS_LAYER_LIBXML2_SYSTEMINCLUDE
+OS_LAYER_ESTLIB_SYSTEMINCLUDE
+
SYSTEMINCLUDE /epoc32/include/bafl
-SYSTEMINCLUDE /epoc32/include/stdapis/libxml2
SYSTEMINCLUDE /epoc32/include/xml
SYSTEMINCLUDE /epoc32/include/xml/dom
SYSTEMINCLUDE /epoc32/include/xml/plugins
--- a/xml/xmldomandxpath/test/tef/xmlengdom_tef/group/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmldomandxpath/test/tef/xmlengdom_tef/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -22,5 +22,5 @@
xmlengdom_tef.mmp manual
PRJ_TESTEXPORTS
-../scripts/xmlengdomtefsuite.script z:/xmlengdom_tef/xmlengdomtefsuite.script
+../scripts/xmlengdomtefsuite.script c:/xmlengdom_tef/xmlengdomtefsuite.script
xmlengdom_tef.iby /epoc32/rom/include/xmlengdom_tef.iby
--- a/xml/xmldomandxpath/test/tef/xmlengdom_tef/group/xmlengdom_tef.iby Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmldomandxpath/test/tef/xmlengdom_tef/group/xmlengdom_tef.iby Thu Jul 22 16:49:54 2010 +0100
@@ -21,8 +21,8 @@
#define __XMLENGDOMTEF_IBY__
#include <testexecute.iby>
-data=ABI_DIR\BUILD_DIR\xmlengdom_tef.exe System\bin\xmlengdom_tef.exe
+data=ABI_DIR\BUILD_DIR\xmlengdom_tef.exe sys\bin\xmlengdom_tef.exe
-data=DATAZ_\xmlengdom_tef\xmlengdomtefsuite.script xmlengdom_tef\xmlengdomtefsuite.script
+data=DATAC_\xmlengdom_tef\xmlengdomtefsuite.script xmlengdom_tef\xmlengdomtefsuite.script
#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmldomandxpath/test/tef/xmlengdom_tef/group/xmlengdom_tef.pkg Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,33 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;Xmlengdom_tef.pkg
+
+; Languages -
+&EN
+
+; Installation header
+#{"Xmlengdom_tef"}, (0x2003262E), 1, 0, 0, TYPE=SA
+%{"Nokia Corporation"}
+:"Nokia Corporation"
+
+(0x101f7961),0, 0, 0 ,{"Series60ProductID"}
+
+; Install files
+;Test exes
+"\epoc32\release\armv5\urel\xmlengdom_tef.exe" - "c:\sys\bin\xmlengdom_tef.exe"
+
+
+;Scripts
+"\epoc32\data\c\xmlengdom_tef\xmlengdomtefsuite.script" - "c:\xmlengdom_tef\xmlengdomtefsuite.script"
--- a/xml/xmldomandxpath/test/tef/xmlengdomnodeset_tef/group/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmldomandxpath/test/tef/xmlengdomnodeset_tef/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -22,5 +22,5 @@
xmlengdomnodeset_tef.mmp manual
PRJ_TESTEXPORTS
-../scripts/xmlengdomnodetesttefsuite.script z:/xmlengdom_tef/xmlengdomnodetesttefsuite.script
+../scripts/xmlengdomnodetesttefsuite.script c:/xmlengdom_tef/xmlengdomnodetesttefsuite.script
xmlengdomnodeset_tef.iby /epoc32/rom/include/xmlengdomnodeset_tef.iby
--- a/xml/xmldomandxpath/test/tef/xmlengdomnodeset_tef/group/xmlengdomnodeset_tef.iby Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmldomandxpath/test/tef/xmlengdomnodeset_tef/group/xmlengdomnodeset_tef.iby Thu Jul 22 16:49:54 2010 +0100
@@ -21,9 +21,9 @@
#define __XMLENGDOMNODESETTEF_IBY__
#include <testexecute.iby>
-data=ABI_DIR\BUILD_DIR\xmlengdomnodeset_tef.exe System\bin\xmlengdomnodeset_tef.exe
+data=ABI_DIR\BUILD_DIR\xmlengdomnodeset_tef.exe sys\bin\xmlengdomnodeset_tef.exe
-data=DATAZ_\xmlengdom_tef\xmlengdomnodetesttefsuite.script xmlengdom_tef\xmlengdomnodetesttefsuite.script
+data=DATAC_\xmlengdom_tef\xmlengdomnodetesttefsuite.script xmlengdom_tef\xmlengdomnodetesttefsuite.script
#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmldomandxpath/test/tef/xmlengdomnodeset_tef/group/xmlengdomnodeset_tef.pkg Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,33 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;Xmlengdomnodeset_tef.pkg
+
+; Languages -
+&EN
+
+; Installation header
+#{"Xmlengdomnodeset_tef"}, (0x2003262C), 1, 0, 0, TYPE=SA
+%{"Nokia Corporation"}
+:"Nokia Corporation"
+
+(0x101f7961),0, 0, 0 ,{"Series60ProductID"}
+
+; Install files
+;Test exes
+"\epoc32\release\armv5\urel\xmlengdomnodeset_tef.exe" - "c:\Sys\Bin\xmlengdomnodeset_tef.exe"
+
+
+;Scripts
+"\epoc32\data\c\xmlengdom_tef\xmlengdomnodetesttefsuite.script" - "c:\xmlengdom_tef\xmlengdomnodetesttefsuite.script"
--- a/xml/xmldomandxpath/test/tef/xmlengdomutils_tef/group/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmldomandxpath/test/tef/xmlengdomutils_tef/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -19,6 +19,6 @@
PRJ_TESTEXPORTS
-../scripts/xmlengdomutiltefsuite.script z:/xmlengdom_tef/xmlengdomutiltefsuite.script
+../scripts/xmlengdomutiltefsuite.script c:/xmlengdom_tef/xmlengdomutiltefsuite.script
xmlengdomutils_tef.iby /epoc32/rom/include/xmlengdomutils_tef.iby
--- a/xml/xmldomandxpath/test/tef/xmlengdomutils_tef/group/xmlengdomutils_tef.iby Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmldomandxpath/test/tef/xmlengdomutils_tef/group/xmlengdomutils_tef.iby Thu Jul 22 16:49:54 2010 +0100
@@ -19,8 +19,8 @@
#define __XMLENGDOMUTILSTEF_IBY__
#include <testexecute.iby>
-data=ABI_DIR\BUILD_DIR\xmlengdomutils_tef.exe System\bin\xmlengdomutils_tef.exe
+data=ABI_DIR\BUILD_DIR\xmlengdomutils_tef.exe sys\bin\xmlengdomutils_tef.exe
-data=DATAZ_\xmlengdom_tef\xmlengdomutiltefsuite.script xmlengdom_tef\xmlengdomutiltefsuite.script
+data=DATAC_\xmlengdom_tef\xmlengdomutiltefsuite.script xmlengdom_tef\xmlengdomutiltefsuite.script
#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmldomandxpath/test/tef/xmlengdomutils_tef/group/xmlengdomutils_tef.pkg Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,32 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;Xmlengdomutils_tef.pkg
+
+; Languages -
+&EN
+
+; Installation header
+#{"Xmlengdomutils_tef"}, (0x2003262D), 1, 0, 0, TYPE=SA
+%{"Nokia Corporation"}
+:"Nokia Corporation"
+
+(0x101f7961),0, 0, 0 ,{"Series60ProductID"}
+; Install files
+;Test exes
+"\epoc32\release\armv5\urel\xmlengdomutils_tef.exe" - "c:\Sys\Bin\xmlengdomutils_tef.exe"
+
+
+;Scripts
+"\epoc32\data\c\xmlengdom_tef\xmlengdomutiltefsuite.script" - "c:\xmlengdom_tef\xmlengdomutiltefsuite.script"
--- a/xml/xmldomandxpath/test/tef/xmlengxpathutils_tef/group/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmldomandxpath/test/tef/xmlengxpathutils_tef/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -19,7 +19,7 @@
PRJ_TESTEXPORTS
-../scripts/xmlengxpathutilstestsuite.script z:/xmlengdom_tef/xmlengxpathutilstestsuite.script
+../scripts/xmlengxpathutilstestsuite.script c:/xmlengdom_tef/xmlengxpathutilstestsuite.script
xmlengxpathutils_tef.iby /epoc32/rom/include/xmlengxpathutils_tef.iby
--- a/xml/xmldomandxpath/test/tef/xmlengxpathutils_tef/group/xmlengxpathutils_tef.iby Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmldomandxpath/test/tef/xmlengxpathutils_tef/group/xmlengxpathutils_tef.iby Thu Jul 22 16:49:54 2010 +0100
@@ -19,8 +19,8 @@
#define __XMLENGXPATHUTILSTEF_IBY__
#include <testexecute.iby>
-data=ABI_DIR\BUILD_DIR\xmlengxpathutils_tef.exe System\bin\xmlengxpathutils_tef.exe
+data=ABI_DIR\BUILD_DIR\xmlengxpathutils_tef.exe sys\bin\xmlengxpathutils_tef.exe
-data=DATAZ_\xmlengdom_tef\xmlengxpathutilstestsuite.script xmlengdom_tef\xmlengxpathutilstestsuite.script
+data=DATAC_\xmlengdom_tef\xmlengxpathutilstestsuite.script xmlengdom_tef\xmlengxpathutilstestsuite.script
#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmldomandxpath/test/tef/xmlengxpathutils_tef/group/xmlengxpathutils_tef.pkg Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,34 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;Xmlengxpathutils_tef.pkg
+
+; Languages -
+&EN
+
+; Installation header
+#{"Xmlengxpathutils_tef"}, (0x2003262F), 1, 0, 0, TYPE=SA
+%{"Nokia Corporation"}
+:"Nokia Corporation"
+
+(0x101f7961),0, 0, 0 ,{"Series60ProductID"}
+
+
+; Install files
+;Test exes
+"\epoc32\release\armv5\urel\xmlengxpathutils_tef.exe" - "c:\Sys\Bin\xmlengxpathutils_tef.exe"
+
+
+;Scripts
+"\epoc32\data\c\xmlengdom_tef\xmlengxpathutilstestsuite.script" - "c:\xmlengdom_tef\xmlengxpathutilstestsuite.script"
--- a/xml/xmlexpatparser/group/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlexpatparser/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -20,20 +20,9 @@
xmlparserplugin.iby /epoc32/rom/include/xmlparserplugin.iby
-../src/expatcopyright.txt z:/resource/xml/expatcopyright.txt
+../src/expatcopyright.txt c:/resource/xml/expatcopyright.txt
PRJ_MMPFILES
xmlparserplugin.mmp
-PRJ_TESTEXPORTS
-../test/rtest/group/xmlparsertests.iby /epoc32/rom/include/xmlparsertests.iby
-../test/rtest/group/xmlparsertests.bat /epoc32/data/z/system/test/xmlparsertests.bat
-
-//xml zip test data
-../test/rtest/data/xml.zip z:/system/data/xml/xml.zip
-../test/rtest/data/xmldefect.zip z:/system/data/xml/xmldefect.zip
-
-PRJ_TESTMMPFILES
-../test/rtest/group/t_xmlparser.mmp
-../test/rtest/group/t_xmlparserheap.mmp
-../test/rtest/group/t_xmldefect.mmp
+#include "../test/rtest/group/bld.inf"
\ No newline at end of file
--- a/xml/xmlexpatparser/group/syslibs_xmlparser.mrp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlexpatparser/group/syslibs_xmlparser.mrp Thu Jul 22 16:49:54 2010 +0100
@@ -1,19 +1,3 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
component syslibs_xmlparser
source \sf\os\xmlsrv\xml\xmlexpatparser
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlexpatparser/test/rtest/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,29 @@
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// This file contains build information for the XML parser
+//
+//
+
+PRJ_TESTEXPORTS
+xmlparsertests.iby /epoc32/rom/include/xmlparsertests.iby
+xmlparsertests.bat /epoc32/data/c/system/test/xmlparsertests.bat
+
+//xml zip test data
+../data/xml.zip c:/system/data/xml/xml.zip
+../data/xmldefect.zip c:/system/data/xml/xmldefect.zip
+
+PRJ_TESTMMPFILES
+t_xmlparser.mmp
+t_xmlparserheap.mmp
+t_xmldefect.mmp
--- a/xml/xmlexpatparser/test/rtest/group/t_xmldefect.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlexpatparser/test/rtest/group/t_xmldefect.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -13,6 +13,7 @@
// Description:
//
+//RTEST
TARGET t_xmldefect.exe
TARGETTYPE exe
--- a/xml/xmlexpatparser/test/rtest/group/t_xmlparser.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlexpatparser/test/rtest/group/t_xmlparser.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -13,6 +13,7 @@
// Description:
//
+//RTEST
TARGET t_xmlparser.exe
TARGETTYPE exe
--- a/xml/xmlexpatparser/test/rtest/group/t_xmlparserheap.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlexpatparser/test/rtest/group/t_xmlparserheap.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -13,6 +13,7 @@
// Description:
//
+//RTEST
TARGET t_xmlparserheap.exe
TARGETTYPE exe
--- a/xml/xmlexpatparser/test/rtest/group/xmlparsertests.iby Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlexpatparser/test/rtest/group/xmlparsertests.iby Thu Jul 22 16:49:54 2010 +0100
@@ -20,13 +20,13 @@
#include <xml.iby>
#include <ezlib.iby>
-file=ABI_DIR\BUILD_DIR\t_xmlparser.exe test\t_xmlparser.exe
-file=ABI_DIR\BUILD_DIR\t_xmlparserheap.exe test\t_xmlparserheap.exe
-file=ABI_DIR\BUILD_DIR\t_xmldefect.exe test\t_xmldefect.exe
+file=ABI_DIR\BUILD_DIR\t_xmlparser.exe sys\bin\t_xmlparser.exe
+file=ABI_DIR\BUILD_DIR\t_xmlparserheap.exe sys\bin\t_xmlparserheap.exe
+file=ABI_DIR\BUILD_DIR\t_xmldefect.exe sys\bin\t_xmldefect.exe
-data=ZSYSTEM\test\xmlparsertests.bat test\xmlparsertests.bat
+data=CSYSTEM\test\xmlparsertests.bat test\xmlparsertests.bat
-data=ZSYSTEM\Data\xml\xml.zip System\data\xml\xml.zip
-data=ZSYSTEM\Data\xml\xmldefect.zip System\data\xml\xmldefect.zip
+data=CSYSTEM\Data\xml\xml.zip system\data\xml\xml.zip
+data=CSYSTEM\Data\xml\xmldefect.zip system\data\xml\xmldefect.zip
#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlexpatparser/test/rtest/group/xmlparsertests.pkg Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,23 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;
+; Installation file for STIF
+;
+; Install files
+;Test exes
+"\epoc32\release\$(platform)\$(target)\t_xmlparser.exe" - "c:\sys\bin\t_xmlparser.exe"
+"\epoc32\release\$(platform)\$(target)\t_xmlparserheap.exe" - "c:\sys\bin\t_xmlparserheap.exe"
+"\epoc32\release\$(platform)\$(target)\t_xmldefect.exe" - "c:\sys\bin\t_xmldefect.exe"
--- a/xml/xmlexpatparser/test/rtest/tsrc/t_xmldefect.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlexpatparser/test/rtest/tsrc/t_xmldefect.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -39,7 +39,7 @@
_LIT(KSimpleFile, "c:\\system\\data\\xml\\xml\\another_simple.xml");
_LIT(KNsAndBindingFile, "c:\\system\\data\\xml\\xml\\default_namespace_and_unbinding.xml");
-_LIT(KZipTestFile, "z:\\system\\data\\xml\\xmldefect.zip");
+_LIT(KZipTestFile, "c:\\system\\data\\xml\\xmldefect.zip");
_LIT(KXmlTestDir, "c:\\system\\data\\xml");
--- a/xml/xmlexpatparser/test/rtest/tsrc/t_xmlparser.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlexpatparser/test/rtest/tsrc/t_xmlparser.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -38,7 +38,7 @@
_LIT(KEncodingTestFile, "c:\\system\\data\\xml\\xml\\doc_jp_utf.xml");
_LIT(KEncodingRefFile, "c:\\system\\data\\xml\\xml\\ref_doc_jp_utf.xml");
-_LIT(KZipTestFile, "z:\\system\\data\\xml\\xml.zip");
+_LIT(KZipTestFile, "c:\\system\\data\\xml\\xml.zip");
_LIT(KXmlTestDir, "c:\\system\\data\\xml");
_LIT8(KIncompleteData, "<DIDL-Lite xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:upnp=\"urn:schemas-upnp-org:metadata-1-0/upnp/\" xmlns=\"urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/\"><container id=\"1\" parentID=\"0\" child ");
--- a/xml/xmlfw/group/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlfw/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -52,29 +52,4 @@
// Customer Resolver bldmake file
#include "xmlcustomresolver.inf"
-PRJ_TESTEXTENSIONS
-// Must be run before t_stringdictionary00.mmp
-start extension syslibs/test/xml_stringdictionary00tagtable
-end
-
-PRJ_TESTMMPFILES
-../test/rtest/group/t_stringdictionary00.mmp support
-../test/rtest/group/t_parser.mmp support
-../test/rtest/group/t_parserucs4test.mmp
-../test/rtest/group/t_processfilemancopyfile.mmp support
-../test/rtest/group/t_validator.mmp support
-../test/rtest/group/t_xmlcore.mmp
-../test/rtest/group/t_xmlmisc.mmp
-../test/rtest/group/tp_xmlframeworkperftests.mmp
-../test/rtest/group/tu_xmlcmatchdataunittests.mmp
-../test/rtest/group/tu_xmlramparserplugins.mmp support
-../test/rtest/group/tu_xmlromparserplugins.mmp support
-
-PRJ_TESTEXTENSIONS
-// Must be run after plugins/tu_xmlramparserplugins.mmp
-start extension syslibs/test/xml_xmlcmatchdatapostbuild
-end
-
-PRJ_TESTEXPORTS
-../test/rtest/group/xmlframeworktests.bat /epoc32/data/z/system/test/xmlframeworktests.bat
-../test/rtest/group/xmlframeworktests.iby /epoc32/rom/include/xmlframeworktests.iby
+#include "../test/rtest/group/bld.inf"
\ No newline at end of file
--- a/xml/xmlfw/group/syslibs_xml.mrp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlfw/group/syslibs_xml.mrp Thu Jul 22 16:49:54 2010 +0100
@@ -1,19 +1,3 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
component syslibs_xml
source \sf\os\xmlsrv\xml\xmlfw
--- a/xml/xmlfw/group/xmlcustomresolver.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlfw/group/xmlcustomresolver.inf Thu Jul 22 16:49:54 2010 +0100
@@ -23,7 +23,7 @@
../test/rtest/group/xmlcustomresolvertests.iby /epoc32/rom/include/xmlcustomresolvertests.iby
//xml test data
-../test/rtest/data/simple.xml z:/system/xmltest/resolver/simple.xml
+../test/rtest/data/simple.xml c:/system/xmltest/resolver/simple.xml
PRJ_TESTMMPFILES
../test/rtest/group/tc_xmlcustomresolvercomptests.mmp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlfw/test/rtest/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,45 @@
+// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Framework build information
+//
+//
+
+
+PRJ_TESTEXTENSIONS
+// Must be run before t_stringdictionary00.mmp
+start extension syslibs/test/xml_stringdictionary00tagtable
+end
+
+PRJ_TESTMMPFILES
+t_stringdictionary00.mmp support
+t_parser.mmp support
+t_parserucs4test.mmp
+t_processfilemancopyfile.mmp support
+t_validator.mmp support
+t_xmlcore.mmp
+t_xmlmisc.mmp
+tp_xmlframeworkperftests.mmp
+tu_xmlcmatchdataunittests.mmp
+tu_xmlramparserplugins.mmp support
+tu_xmlromparserplugins.mmp support
+
+PRJ_TESTEXTENSIONS
+// Must be run after plugins/tu_xmlramparserplugins.mmp
+start extension syslibs/test/xml_xmlcmatchdatapostbuild
+end
+
+PRJ_TESTEXPORTS
+xmlframeworktests.bat /epoc32/data/c/system/test/xmlframeworktests.bat
+xmlframeworktests.iby /epoc32/rom/include/xmlframeworktests.iby
+xmlcustomresolvertests.iby /epoc32/rom/include/xmlcustomresolvertests.iby
--- a/xml/xmlfw/test/rtest/group/t_parserucs4test.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlfw/test/rtest/group/t_parserucs4test.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -12,7 +12,7 @@
//
// Description:
//
-
+//RTEST
TARGET t_parserucs4test.exe
TARGETTYPE exe
--- a/xml/xmlfw/test/rtest/group/t_processfilemancopyfile.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlfw/test/rtest/group/t_processfilemancopyfile.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -12,7 +12,7 @@
//
// Description:
//
-
+//RTEST
// renamed the output file to remove conflict with ECOM's version of the same utility
TARGET t_xmlprocessfilemancopyfile.exe
// needed to access file system
--- a/xml/xmlfw/test/rtest/group/t_xmlcore.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlfw/test/rtest/group/t_xmlcore.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -13,6 +13,7 @@
// Description:
//
+//RTEST
TARGET t_xmlcore.exe
TARGETTYPE exe
--- a/xml/xmlfw/test/rtest/group/t_xmlmisc.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlfw/test/rtest/group/t_xmlmisc.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -12,7 +12,7 @@
//
// Description:
//
-
+//RTEST
TARGET t_xmlmisc.exe
TARGETTYPE exe
--- a/xml/xmlfw/test/rtest/group/tc_xmlcustomresolvercomptests.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlfw/test/rtest/group/tc_xmlcustomresolvercomptests.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -12,7 +12,7 @@
//
// Description:
//
-
+//RTEST
TARGET tc_xmlcustomresolvercomptests.exe
CAPABILITY None
TARGETTYPE exe
--- a/xml/xmlfw/test/rtest/group/tp_xmlframeworkperftests.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlfw/test/rtest/group/tp_xmlframeworkperftests.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -14,7 +14,7 @@
// XML API Performance tests
//
//
-
+//RTEST
TARGET tp_xmlframeworkperftests.exe
CAPABILITY None
TARGETTYPE exe
--- a/xml/xmlfw/test/rtest/group/tu_xmlcmatchdataunittests.mmp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlfw/test/rtest/group/tu_xmlcmatchdataunittests.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -14,7 +14,7 @@
// CMatchData unit tests.
//
//
-
+//RTEST
TARGET tu_xmlcmatchdataunittests.exe
CAPABILITY None
TARGETTYPE exe
--- a/xml/xmlfw/test/rtest/group/xmlcustomresolvertests.iby Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlfw/test/rtest/group/xmlcustomresolvertests.iby Thu Jul 22 16:49:54 2010 +0100
@@ -18,9 +18,9 @@
REM XML Parser Tests
-file=ABI_DIR\BUILD_DIR\tc_xmlcustomresolvercomptests.exe test\tc_xmlcustomresolvercomptests.exe
+file=ABI_DIR\BUILD_DIR\tc_xmlcustomresolvercomptests.exe sys\bin\tc_xmlcustomresolvercomptests.exe
-data=ZSYSTEM\xmltest\resolver\simple.xml system\xmltest\resolver\simple.xml
+data=CSYSTEM\xmltest\resolver\simple.xml system\xmltest\resolver\simple.xml
ECOM_PLUGIN(t_testxmlparserplugin1.dll,10273863.rsc)
ECOM_PLUGIN(t_testxmlparserplugin2.dll,10273865.rsc)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlfw/test/rtest/group/xmlcustomresolvertests.pkg Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,28 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;Xmlcustomresolvertests.pkg
+
+; Languages -
+&EN
+
+; Installation header
+#{"Xmlcustomresolvertests"}, (0x20032627), 1, 0, 0, TYPE=SA
+%{"Nokia Corporation"}
+:"Nokia Corporation"
+
+(0x101f7961),0, 0, 0 ,{"Series60ProductID"}
+; Install files
+;Test exes
+"\epoc32\release\armv5\urel\tc_xmlcustomresolvercomptests.exe" - "c:\sys\bin\tc_xmlcustomresolvercomptests.exe"
--- a/xml/xmlfw/test/rtest/group/xmlframeworktests.iby Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlfw/test/rtest/group/xmlframeworktests.iby Thu Jul 22 16:49:54 2010 +0100
@@ -23,29 +23,29 @@
#include <xmlcustomresolvertests.iby>
// batch file that runs all automatic Framework tests
-data=ZSYSTEM\test\xmlframeworktests.bat test\xmlframeworktests.bat
+data=CSYSTEM\test\xmlframeworktests.bat test\xmlframeworktests.bat
// Framework test exe
-file=ABI_DIR\BUILD_DIR\t_xmlcore.exe test\t_xmlcore.exe
+file=ABI_DIR\BUILD_DIR\t_xmlcore.exe sys\bin\t_xmlcore.exe
// Framework components test exe
-file=ABI_DIR\BUILD_DIR\t_xmlmisc.exe test\t_xmlmisc.exe
+file=ABI_DIR\BUILD_DIR\t_xmlmisc.exe sys\bin\t_xmlmisc.exe
// CMatchData unit test exe
-file=ABI_DIR\BUILD_DIR\tu_xmlcmatchdataunittests.exe test\tu_xmlcmatchdataunittests.exe
+file=ABI_DIR\BUILD_DIR\tu_xmlcmatchdataunittests.exe sys\bin\tu_xmlcmatchdataunittests.exe
// API performance test exe
-file=ABI_DIR\BUILD_DIR\tp_xmlframeworkperftests.exe test\tp_xmlframeworkperftests.exe
+file=ABI_DIR\BUILD_DIR\tp_xmlframeworkperftests.exe sys\bin\tp_xmlframeworkperftests.exe
// Access to file system helper exe
-file=ABI_DIR\BUILD_DIR\t_xmlprocessfilemancopyfile.exe test\t_xmlprocessfilemancopyfile.exe
+file=ABI_DIR\BUILD_DIR\t_xmlprocessfilemancopyfile.exe sys\bin\t_xmlprocessfilemancopyfile.exe
-file=ABI_DIR\BUILD_DIR\t_parserucs4test.exe test\t_parserucs4test.exe
+file=ABI_DIR\BUILD_DIR\t_parserucs4test.exe sys\bin\t_parserucs4test.exe
// Z: to C:
-data=EPOCROOT##epoc32\data\z\XmlRAMOnly\tu_xmlramparserplugins.dll XmlRAMOnly\tu_xmlramparserplugins.dll
-data=EPOCROOT##epoc32\data\z\XmlRAMOnly\tu_xmlramparserplugins.rsc XmlRAMOnly\tu_xmlramparserplugins.rsc
+data=DATAC\XmlRAMOnly\tu_xmlramparserplugins.dll XmlRAMOnly\tu_xmlramparserplugins.dll
+data=DATAC\XmlRAMOnly\tu_xmlramparserplugins.rsc XmlRAMOnly\tu_xmlramparserplugins.rsc
// Test plugin
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlfw/test/rtest/group/xmlframeworktests.pkg Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,33 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;Xmlframeworktests.pkg
+
+; Languages -
+&EN
+
+; Installation header
+#{"Xmlframeworktests"}, (0x20032628), 1, 0, 0, TYPE=SA
+%{"Nokia Corporation"}
+:"Nokia Corporation"
+
+(0x101f7961),0, 0, 0 ,{"Series60ProductID"}
+; Install files
+;Test exes
+"\epoc32\release\armv5\urel\t_xmlcore.exe" - "c:\sys\bin\t_xmlcore.exe"
+"\epoc32\release\armv5\urel\t_xmlmisc.exe" - "c:\sys\bin\t_xmlmisc.exe"
+"\epoc32\release\armv5\urel\tu_xmlcmatchdataunittests.exe" - "c:\sys\bin\tu_xmlcmatchdataunittests.exe"
+"\epoc32\release\armv5\urel\tp_xmlframeworkperftests.exe" - "c:\sys\bin\tp_xmlframeworkperftests.exe"
+"\epoc32\release\armv5\urel\t_xmlprocessfilemancopyfile.exe" - "c:\sys\bin\t_xmlprocessfilemancopyfile.exe"
+"\epoc32\release\armv5\urel\t_parserucs4test.exe" - "c:\sys\bin\t_parserucs4test.exe"
--- a/xml/xmlfw/test/rtest/tsrc/tc_customresolvercomptests.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlfw/test/rtest/tsrc/tc_customresolvercomptests.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -42,7 +42,7 @@
using namespace Xml;
-_LIT(KXmlTestSimpleTestFile, "z:\\System\\XmlTest\\Resolver\\simple.xml");
+_LIT(KXmlTestSimpleTestFile, "c:\\System\\XmlTest\\Resolver\\simple.xml");
_LIT8(KXmlTestParserMimeType, "text/xml");
_LIT8(KXmlTestParserMimeTypeCS, "TEXT/XML");
_LIT8(KXmlTestWbXmlParserMimeType, "text/wbxml");
--- a/xml/xmlfw/test/rtest/tsrc/tu_cmatchdataunittests.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmlfw/test/rtest/tsrc/tu_cmatchdataunittests.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -117,8 +117,8 @@
static void TestPrepareL()
{
- FileCopyL(_L("z:\\XMLRAMONLY\\tu_XmlRamParserPlugins.dll"), _L("C:\\sys\\bin\\tu_XmlRamParserPlugins.dll"));
- FileCopyL(_L("z:\\XMLRAMONLY\\tu_XmlRamParserPlugins.RSC"), _L("C:\\resource\\plugins\\tu_XmlRamParserPlugins.RSC"));
+ FileCopyL(_L("c:\\XMLRAMONLY\\tu_XmlRamParserPlugins.dll"), _L("C:\\sys\\bin\\tu_XmlRamParserPlugins.dll"));
+ FileCopyL(_L("c:\\XMLRAMONLY\\tu_XmlRamParserPlugins.RSC"), _L("C:\\resource\\plugins\\tu_XmlRamParserPlugins.RSC"));
//The reason for the folowing delay is:
//ECOM server could be already started. It means that when we copy some
--- a/xml/xmllibxml2parser/group/syslibs_xmlparser2.mrp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmllibxml2parser/group/syslibs_xmlparser2.mrp Thu Jul 22 16:49:54 2010 +0100
@@ -1,19 +1,3 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
component syslibs_xmlparser2
source \sf\os\xmlsrv\xml\xmllibxml2parser
--- a/xml/xmllibxml2parser/test/tef/xmlparser2/group/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmllibxml2parser/test/tef/xmlparser2/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -23,8 +23,8 @@
PRJ_TESTEXPORTS
xmlparser2teftests.iby /epoc32/rom/include/xmlparser2teftests.iby
-../scripts/xmlparser2tefsuite.script z:/tef_xml2/xmlparser2tefsuite.script
-../data/xmlexample.xml z:/testdata/xmlexample.xml
-../data/xmlexample.dtd z:/testdata/xmlexample.dtd
-../data/corruptxml1.xml z:/testdata/corruptxml1.xml
+../scripts/xmlparser2tefsuite.script c:/tef_xml2/xmlparser2tefsuite.script
+../data/xmlexample.xml c:/testdata/xmlexample.xml
+../data/xmlexample.dtd c:/testdata/xmlexample.dtd
+../data/corruptxml1.xml c:/testdata/corruptxml1.xml
--- a/xml/xmllibxml2parser/test/tef/xmlparser2/group/xmlparser2teftests.iby Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmllibxml2parser/test/tef/xmlparser2/group/xmlparser2teftests.iby Thu Jul 22 16:49:54 2010 +0100
@@ -20,10 +20,10 @@
#include <xmlenginesaxplugin.iby>
data=ABI_DIR/BUILD_DIR/texmlparser2.exe sys/bin/texmlparser2.exe
-data=DATAZ_/tef_xml2/xmlparser2tefsuite.script tef_xml2/xmlparser2tefsuite.script
-data=EPOCROOT##Epoc32/data/z/testdata/corruptxml1.xml /testdata/corruptxml1.xml
-data=EPOCROOT##Epoc32/data/z/testdata/xmlexample.dtd /testdata/xmlexample.dtd
-data=EPOCROOT##Epoc32/data/z/testdata/xmlexample.xml /testdata/xmlexample.xml
+data=DATAC_/tef_xml2/xmlparser2tefsuite.script tef_xml2/xmlparser2tefsuite.script
+data=EPOCROOT##Epoc32/data/c/testdata/corruptxml1.xml /testdata/corruptxml1.xml
+data=EPOCROOT##Epoc32/data/c/testdata/xmlexample.dtd /testdata/xmlexample.dtd
+data=EPOCROOT##Epoc32/data/c/testdata/xmlexample.xml /testdata/xmlexample.xml
ECOM_PLUGIN(tetestcontentprocessor.dll,tetestcontentprocessor.rsc)
#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmllibxml2parser/test/tef/xmlparser2/group/xmlparser2teftests.pkg Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,34 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;Xmlparser2teftests.pkg
+
+; Languages -
+&EN
+
+; Installation header
+#{"Xmlparser2teftests"}, (0x20032630), 1, 0, 0, TYPE=SA
+%{"Nokia Corporation"}
+:"Nokia Corporation"
+
+(0x101f7961),0, 0, 0 ,{"Series60ProductID"}
+
+
+; Install files
+;Test exes
+"\epoc32\release\armv5\urel\texmlparser2.exe" - "c:\Sys\Bin\texmlparser2.exe"
+
+
+;Scripts
+"\epoc32\data\c\tef_xml2\xmlparser2tefsuite.script" - "c:\tef_xml2\xmlparser2tefsuite.script"
--- a/xml/xmllibxml2parser/test/tef/xmlparser2/src/texmlparser2step.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xml/xmllibxml2parser/test/tef/xmlparser2/src/texmlparser2step.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -29,9 +29,9 @@
/**
* Class CXmlParser2Step implementation
*/
-_LIT(KSimpleXmlFile, "z:\\testdata\\xmlexample.xml");
+_LIT(KSimpleXmlFile, "c:\\testdata\\xmlexample.xml");
#ifdef _DEBUG
-_LIT(KCorruptXm1File, "z:\\testdata\\corruptxml1.xml");
+_LIT(KCorruptXm1File, "c:\\testdata\\corruptxml1.xml");
#endif
/**
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/bwinscw/xmlinterfaceu.def Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,12 @@
+EXPORTS
+ ?Close@RXMLReader@@QAEXXZ @ 1 NONAME ; void RXMLReader::Close(void)
+ ?CreateL@RXMLReader@@QAEXXZ @ 2 NONAME ; void RXMLReader::CreateL(void)
+ ?Destroy@RXMLReader@@QAEXXZ @ 3 NONAME ; void RXMLReader::Destroy(void)
+ ?GetFeature@RXMLReader@@QAEHW4TXMLFeature@@AAH@Z @ 4 NONAME ; int RXMLReader::GetFeature(enum TXMLFeature, int &)
+ ?ParseL@RXMLReader@@QAEXAAVRFile@@@Z @ 5 NONAME ; void RXMLReader::ParseL(class RFile &)
+ ?ParseL@RXMLReader@@QAEXAAVRFs@@ABVTDesC16@@@Z @ 6 NONAME ; void RXMLReader::ParseL(class RFs &, class TDesC16 const &)
+ ?ParseL@RXMLReader@@QAEXABVTDesC8@@@Z @ 7 NONAME ; void RXMLReader::ParseL(class TDesC8 const &)
+ ?SetContentHandler@RXMLReader@@QAEHPAVMWBXMLContentHandler@@@Z @ 8 NONAME ; int RXMLReader::SetContentHandler(class MWBXMLContentHandler *)
+ ?SetContentHandler@RXMLReader@@QAEHPAVMXMLContentHandler@@@Z @ 9 NONAME ; int RXMLReader::SetContentHandler(class MXMLContentHandler *)
+ ?SetFeature@RXMLReader@@QAEHW4TXMLFeature@@H@Z @ 10 NONAME ; int RXMLReader::SetFeature(enum TXMLFeature, int)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/eabi/xmlinterfaceu.def Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,16 @@
+EXPORTS
+ _ZN10RXMLReader10GetFeatureE11TXMLFeatureRi @ 1 NONAME
+ _ZN10RXMLReader10SetFeatureE11TXMLFeaturei @ 2 NONAME
+ _ZN10RXMLReader17SetContentHandlerEP18MXMLContentHandler @ 3 NONAME
+ _ZN10RXMLReader17SetContentHandlerEP20MWBXMLContentHandler @ 4 NONAME
+ _ZN10RXMLReader5CloseEv @ 5 NONAME
+ _ZN10RXMLReader6ParseLER3RFsRK7TDesC16 @ 6 NONAME
+ _ZN10RXMLReader6ParseLER5RFile @ 7 NONAME
+ _ZN10RXMLReader6ParseLERK6TDesC8 @ 8 NONAME
+ _ZN10RXMLReader7CreateLEv @ 9 NONAME
+ _ZN10RXMLReader7DestroyEv @ 10 NONAME
+ _ZTI12CXMLObserver @ 11 NONAME ; #<TI>#
+ _ZTI14CXMLAttributes @ 12 NONAME ; #<TI>#
+ _ZTV12CXMLObserver @ 13 NONAME ; #<VT>#
+ _ZTV14CXMLAttributes @ 14 NONAME ; #<VT>#
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/group/XMLInterface.mmp Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,90 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+#include <platform_paths.hrh>
+//#include <platform/mw/Browser_platform_variant.hrh>
+
+TARGET XMLInterface.dll
+TARGETTYPE dll
+UID 0x1000008d 0x101F9750
+//TARGETPATH ?target_path
+
+VENDORID VID_DEFAULT
+
+#if defined(ARMCC)
+DEFFILE ../eabi/xmlinterface.def
+#elif defined(WINSCW)
+DEFFILE ../bwinscw/xmlinterface.def
+#elif defined(WINS)
+ DEFFILE ../bwins/xmlinterface.def
+#else
+ DEFFILE ../bmarm/xmlinterface.def
+#endif
+
+SOURCEPATH ../src
+SOURCE RXMLReader.cpp
+SOURCE wml_1_3_dict.c
+SOURCE syncml_1_0_dict.c
+SOURCE xhtml_1_0_dict.c
+SOURCE sl_dict.c
+SOURCE CXMLReader.cpp
+SOURCE CXMLAttributes.cpp
+SOURCE CXMLObserver.cpp
+
+// RESOURCE resource_file
+// RESOURCE resource_file2
+
+USERINCLUDE ../inc
+
+OS_LAYER_SYSTEMINCLUDE
+OS_LAYER_LIBC_SYSTEMINCLUDE
+
+CAPABILITY CAP_GENERAL_DLL
+
+LIBRARY efsrv.lib
+LIBRARY euser.lib
+LIBRARY bafl.lib
+LIBRARY charconv.lib
+LIBRARY cxmlparser.lib
+
+#ifdef __S60_32__
+LANG sc
+#else
+LANGUAGE_IDS
+#endif
+/*
+START WINS
+?wins_specific_information
+END
+
+START MARM
+?marm_specific_information
+END
+*/
+// Other possible keywords:
+
+// DOCUMENT ?file, that is not compiled, but added to MSVC project workspace (i.e. release notes)
+/*
+START BITMAP ?target
+TARGETPATH ?emulated_path_on_target_machine
+HEADER
+SOURCEPATH ?source_path
+SOURCE ?color_depth ?source_bitmap
+END
+*/
+// DEFFILE ?filename
+// AIF ?filename
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* BLD.INF file for the XMLInterface modules.
+*
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+
+DEFAULT
+
+PRJ_EXPORTS
+
+// Move the includes into "Public Nokia implemented" in CORE_OS_LAYER_IBY_EXPORT_PATH
+
+
+../rom/Xmlinterface.iby CORE_OS_LAYER_IBY_EXPORT_PATH(Xmlinterface.iby)
+
+PRJ_MMPFILES
+
+XMLInterface.mmp
+
+PRJ_TESTMMPFILES
+
+// ../Internal/tsrc/test.mmp
+
+/* End of File */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/inc/CXMLAttributes.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,131 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+
+
+#ifndef __CXMLATTRIBUTES_H
+#define __CXMLATTRIBUTES_H
+
+// INCLUDES
+#include <e32std.h>
+#include <badesca.h>
+#include <xml/MXMLAttributes.h>
+
+
+// CLASS DECLARATION
+
+/**
+* Implementation of MXMLAttributes interface.
+* @lib XMLInterface.dll
+* @since ?Series60_version
+*/
+class CXMLAttributes : public CBase, public MXMLAttributes
+{
+public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor.
+ */
+ static CXMLAttributes* NewL();
+
+ static CXMLAttributes* NewLC();
+
+/**
+* Destructor.
+*/
+ virtual ~CXMLAttributes();
+
+public: // Implementation of MXMLAttributes Functions
+
+/**
+* Implementation of MXMLAttributes::GetIndexL(TDesC& aName)
+*/
+ TInt GetIndex(TDesC& aName);
+
+/**
+* Implementation of MXMLAttributes::GetLenght()
+*/
+ TInt GetLength();
+
+/**
+* Implementation of MXMLAttributes::GetNameL(TInt aIndex).
+*/
+ TPtrC GetName(TInt aIndex);
+
+/**
+* Implementation of MXMLAttributes::GetValueL(TDesC& aName, TDesC& aValue).
+*/
+ TPtrC GetValue(TDesC& aName);
+
+/**
+* Implementation of MXMLAttributes::GetValueL(TInt& aIndex, TDesC& aValue).
+*/
+ TPtrC GetValue(TInt& aIndex);
+
+/**
+* Implementation of MXMLAttributes::GetTypeL(Tint aIndex, TDesC& aType).
+*/
+// R&D: Feature: GetType missing from Attributes
+ TPtrC GetType(TInt aIndex);
+
+/**
+* Implementation of MXMLAttributes::GetTypeL(TDesC& aName, TDesC& aType).
+*/
+// R&D: Feature: GetType missing from Attributes
+ TPtrC GetType(TDesC& aName);
+
+public: // New Functions
+
+/**
+* Appends new attribute to attrinbuteslist.
+* @since ?Series60_version
+* @param aName: Attribute name.
+* @param aValue: Attribute value.
+* @return none.
+*/
+ void AppendL(const TDesC& aName, const TDesC& aValue);
+
+/**
+* Resets the attribute list.
+* @since ?Series60_version
+* @param aName: Attribute name.
+* @param aValue: Attribute value.
+* @return none.
+*/
+ void Reset();
+
+protected:
+/**
+ * C++ default constructor.
+ */
+ CXMLAttributes();
+
+private:
+
+ void ConstructL();
+
+private: // Data
+
+ // Store Attribute Names
+ CDesCArraySeg* iDescAttName;
+ // Store Attribute Values
+ CDesCArraySeg* iDescAttValue;
+};
+
+#endif // __CXMLATTRIBUTES_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/inc/CXMLObserver.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,172 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+
+
+#ifndef __CXMLOBSERVER_H
+#define __CXMLOBSERVER_H
+
+// INCLUDES
+#include <e32std.h>
+#include <txtetext.h>
+#include "CXMLAttributes.h"
+#include <xml/MXMLContentHandler.h>
+#include <xml/MWBXMLContentHandler.h>
+
+
+// CLASS DECLARATION
+
+/**
+* Help class for CXMLReader.
+* @lib XMLInterface.dll
+* @since ?Series60_version
+*/
+class CXMLObserver : public CBase
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor.
+ */
+ static CXMLObserver* NewL();
+
+ static CXMLObserver* NewLC();
+
+ /**
+ * Destructor.
+ */
+ ~CXMLObserver();
+
+public: // New functions
+
+/**
+* Registers content handler
+* @since ?Series60_version
+* @param aContentHandler: The ContentHandler to use.
+* @return none.
+*/
+ inline void SetContentHandler(MXMLContentHandler* aContentHandler){iContentHandler = aContentHandler;}
+
+/**
+* Registers a binary content handler
+* @since ?Series60_version
+* @param aContentHandler: The ContentHandler to use.
+* @return none.
+*/
+ inline void SetContentHandler(MWBXMLContentHandler* aContentHandler){iBinaryContentHandler = aContentHandler;}
+
+/**
+* Gets content handler
+* @since ?Series60_version
+* @param none.
+* @return ContentHandler.
+*/
+ inline MXMLContentHandler* GetContentHandler(){return iContentHandler;}
+
+ /**
+* Gets binary content handler
+* @since ?Series60_version
+* @param none.
+* @return ContentHandler.
+*/
+ inline MWBXMLContentHandler* GetBinaryContentHandler(){return iBinaryContentHandler;}
+
+
+/**
+* Gets current attribute list
+* @since ?Series60_version
+* @return pointer to current attribute list
+*/
+ inline CXMLAttributes* GetAttributes(){return iAttributes;}
+
+/**
+* Get current element
+* @since ?Series60_version
+* @return Current element
+*/
+ TPtrC GetElement() const;
+
+/**
+* Set current element
+* @since ?Series60_version
+* @param Current element
+* @return none.
+*/
+ void SetElementL(const TPtrC &aName);
+
+/**
+* Remove current element
+* @since ?Series60_version
+* @return none
+*/
+ void RemoveElement();
+
+/**
+* Set element URI
+* @since ?Series60_version
+* @param aURI: the URI.
+* @param aNSextension: namespace extension mapped to aURI.
+* @return none
+*/
+ void SetURIL(const TPtrC &aURI, const TPtrC &aNSextension);
+
+/**
+* Get element URI
+* @since ?Series60_version
+* @param aNSextension: namespace extension mapped to aURI.
+* @return the URI.
+*/
+ TPtrC GetURI(const TPtrC &aNSextension) const;
+
+/**
+* ResetURI, reset URI list
+* @since ?Series60_version
+* @return none.
+*/
+ void ResetURI();
+
+
+private:
+/**
+* C++ default constructor.
+*/
+ CXMLObserver();
+
+ void ConstructL();
+
+public: // Data
+ // Keeps current attribute name
+ TPtrC* iCurrentAttribute;
+
+private: // Data
+ // Parser CallBacks
+ MXMLContentHandler* iContentHandler;
+ // Binary call backs
+ MWBXMLContentHandler* iBinaryContentHandler;
+ // Current attribute list
+ CXMLAttributes* iAttributes;
+ // Keeps track of elements (needed for binary parsing)
+ CDesCArraySeg* iDescElements;
+
+ // Keep track off namespace extensions and URIs.
+ CDesCArraySeg* iNSextensions;
+ CDesCArraySeg* iURIs;
+};
+
+#endif // __CXMLOBSERVER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/inc/CXMLReader.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,134 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+
+
+#ifndef __CXMLREADER_H
+#define __CXMLREADER_H
+
+// INCLUDES
+#include <e32std.h>
+#include <f32file.h>
+#include <utf.h>
+#include <xml/cxml/nw_cXML_Parser.h>
+
+#include "CXMLAttributes.h"
+#include <xml/MXMLContentHandler.h>
+#include <xml/MWBXMLContentHandler.h>
+#include "CXMLObserver.h"
+#include <xml/XMLUtils.h>
+
+
+// CLASS DECLARATION
+
+/**
+* Implementation of RXMLReader interface.
+* @lib XMLInterface.dll
+* @since ?Series60_version
+*/
+class CXMLReader : public CBase
+{
+public: // Constructors and destructor
+
+/**
+* Two-phased constructor.
+*/
+ static CXMLReader* NewL();
+
+ static CXMLReader* NewLC();
+
+/**
+* Destructor.
+*/
+ ~CXMLReader();
+
+public: // Implementation of RXMLAttributes Functions
+
+/**
+* Implementation of RXMLReader::SetFeature(TXMLFeature aFeature, TBool aStatus)
+*/
+ TInt SetFeature(TXMLFeature aFeature, TBool aStatus);
+
+/**
+* Implementation of RXMLReader::GetFeature(TXMLFeature aFeature)
+*/
+ TInt GetFeature(TXMLFeature aFeature, TBool& aStatus);
+
+/**
+* Implementation of RXMLReader::SetContentHandler(MXMLContentHandler& aContentHandler)
+*/
+ TInt SetContentHandler(MXMLContentHandler* aContentHandler);
+
+/**
+* Implementation of RXMLReader::SetContentHandler(MWBXMLContentHandler& aContentHandler)
+*/
+ TInt SetContentHandler(MWBXMLContentHandler* aContentHandler);
+
+/**
+* Implementation of RXMLReader::ParseL(RFs& aRFs, const TDesC& aFileToParse)
+*/
+ void ParseL(RFs& aRFs, const TDesC& aFileToParse);
+
+/**
+* Implementation of RXMLReader::ParseL(const TDesC& aBuff)
+*/
+ void ParseL(const TDesC8& aBuff);
+
+/**
+* Implementation of RXMLReader::ParseL(RFile& aOpenedFile)
+*/
+ void ParseL(RFile& aOpenedFile);
+
+
+private:
+
+/**
+* C++ default constructor.
+*/
+ CXMLReader();
+
+ void ConstructL();
+
+/**
+* Parse XML document
+* @since ?Series60_version
+* @param
+* @return status.
+*/
+ TInt ParseXML(const TDesC& aBuff);
+
+/**
+* Parse WBXML document
+* @since ?Series60_version
+* @param
+* @return status.
+*/
+ TInt ParseWBXML(const TDesC8& aBuff);
+
+
+protected: // Data
+
+ // Parser CallBacks
+ CXMLObserver* iParserObserver;
+ // wbxml or xml input
+ TBool iIsBinary;
+
+};
+
+#endif // __CXMLREADER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/inc/nw_wml1x_wml_1_3_tokens.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,237 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/*
+** WARNING
+**
+** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED
+** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM
+**
+** This file generated on Wed Apr 24 14:59:12 2002
+** (coordinated universal time)
+**
+** Command line: r:\Shared\shaun\dict_creator\dict_creator.exe wml_1_3.dict wml_1_3_tokendict.c wml_1_3_tokendict.h
+*/
+/*
+** This file was generated by the dictionary creator but includes some hand-edits.
+** If you need any help to edit this file please see Shaun Keller/Frank Rchichi/Ramesh Bapanapalli.
+*/
+
+#ifndef HEADER_GUARD_nw_wml1x_wml_1_3_tokens_h
+#define HEADER_GUARD_nw_wml1x_wml_1_3_tokens_h
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+#define NW_Wml_1_0_PublicId 0x02
+#define NW_Wml_1_1_PublicId 0x04
+#define NW_Wml_1_2_PublicId 0x09
+#define NW_Wml_1_3_PublicId 0x0A
+
+typedef enum NW_Wml_1_3_ElementToken_0_e{
+ NW_Wml_1_3_ElementToken_pre = 0x001b,
+ NW_Wml_1_3_ElementToken_a = 0x001c,
+ NW_Wml_1_3_ElementToken_td = 0x001d,
+ NW_Wml_1_3_ElementToken_tr = 0x001e,
+ NW_Wml_1_3_ElementToken_table = 0x001f,
+ NW_Wml_1_3_ElementToken_p = 0x0020,
+ NW_Wml_1_3_ElementToken_postfield = 0x0021,
+ NW_Wml_1_3_ElementToken_anchor = 0x0022,
+ NW_Wml_1_3_ElementToken_access = 0x0023,
+ NW_Wml_1_3_ElementToken_b = 0x0024,
+ NW_Wml_1_3_ElementToken_big = 0x0025,
+ NW_Wml_1_3_ElementToken_br = 0x0026,
+ NW_Wml_1_3_ElementToken_card = 0x0027,
+ NW_Wml_1_3_ElementToken_do = 0x0028,
+ NW_Wml_1_3_ElementToken_em = 0x0029,
+ NW_Wml_1_3_ElementToken_fieldset = 0x002a,
+ NW_Wml_1_3_ElementToken_go = 0x002b,
+ NW_Wml_1_3_ElementToken_head = 0x002c,
+ NW_Wml_1_3_ElementToken_i = 0x002d,
+ NW_Wml_1_3_ElementToken_img = 0x002e,
+ NW_Wml_1_3_ElementToken_input = 0x002f,
+ NW_Wml_1_3_ElementToken_meta = 0x0030,
+ NW_Wml_1_3_ElementToken_noop = 0x0031,
+ NW_Wml_1_3_ElementToken_prev = 0x0032,
+ NW_Wml_1_3_ElementToken_onevent = 0x0033,
+ NW_Wml_1_3_ElementToken_optgroup = 0x0034,
+ NW_Wml_1_3_ElementToken_option = 0x0035,
+ NW_Wml_1_3_ElementToken_refresh = 0x0036,
+ NW_Wml_1_3_ElementToken_select = 0x0037,
+ NW_Wml_1_3_ElementToken_small = 0x0038,
+ NW_Wml_1_3_ElementToken_strong = 0x0039,
+ NW_Wml_1_3_ElementToken_template = 0x003b,
+ NW_Wml_1_3_ElementToken_timer = 0x003c,
+ NW_Wml_1_3_ElementToken_u = 0x003d,
+ NW_Wml_1_3_ElementToken_setvar = 0x003e,
+ NW_Wml_1_3_ElementToken_wml = 0x003f
+}NW_Wml_1_3_ElementToken_0_t;
+
+
+typedef enum NW_Wml_1_3_ElementToken_1_e{
+ NW_Wml_1_3_ElementToken_zzzunknown = 0x0118
+}NW_Wml_1_3_ElementToken_1_t;
+
+
+typedef enum NW_Wml_1_3_AttributeToken_0_e{
+ NW_Wml_1_3_AttributeToken_accept_charset = 0x0005,
+ NW_Wml_1_3_AttributeToken_align_bottom = 0x0006,
+ NW_Wml_1_3_AttributeToken_align_center = 0x0007,
+ NW_Wml_1_3_AttributeToken_align_left = 0x0008,
+ NW_Wml_1_3_AttributeToken_align_middle = 0x0009,
+ NW_Wml_1_3_AttributeToken_align_right = 0x000a,
+ NW_Wml_1_3_AttributeToken_align_top = 0x000b,
+ NW_Wml_1_3_AttributeToken_alt = 0x000c,
+ NW_Wml_1_3_AttributeToken_content = 0x000d,
+ NW_Wml_1_3_AttributeToken_domain = 0x000f,
+ NW_Wml_1_3_AttributeToken_emptyok_false = 0x0010,
+ NW_Wml_1_3_AttributeToken_emptyok_true = 0x0011,
+ NW_Wml_1_3_AttributeToken_format = 0x0012,
+ NW_Wml_1_3_AttributeToken_height = 0x0013,
+ NW_Wml_1_3_AttributeToken_hspace = 0x0014,
+ NW_Wml_1_3_AttributeToken_ivalue = 0x0015,
+ NW_Wml_1_3_AttributeToken_iname = 0x0016,
+ NW_Wml_1_3_AttributeToken_label = 0x0018,
+ NW_Wml_1_3_AttributeToken_localsrc = 0x0019,
+ NW_Wml_1_3_AttributeToken_maxlength = 0x001a,
+ NW_Wml_1_3_AttributeToken_method_get = 0x001b,
+ NW_Wml_1_3_AttributeToken_method_post = 0x001c,
+ NW_Wml_1_3_AttributeToken_mode_nowrap = 0x001d,
+ NW_Wml_1_3_AttributeToken_mode_wrap = 0x001e,
+ NW_Wml_1_3_AttributeToken_multiple_false = 0x001f,
+ NW_Wml_1_3_AttributeToken_multiple_true = 0x0020,
+ NW_Wml_1_3_AttributeToken_name = 0x0021,
+ NW_Wml_1_3_AttributeToken_newcontext_false = 0x0022,
+ NW_Wml_1_3_AttributeToken_newcontext_true = 0x0023,
+ NW_Wml_1_3_AttributeToken_onpick = 0x0024,
+ NW_Wml_1_3_AttributeToken_onenterbackward = 0x0025,
+ NW_Wml_1_3_AttributeToken_onenterforward = 0x0026,
+ NW_Wml_1_3_AttributeToken_ontimer = 0x0027,
+ NW_Wml_1_3_AttributeToken_optional_false = 0x0028,
+ NW_Wml_1_3_AttributeToken_optional_true = 0x0029,
+ NW_Wml_1_3_AttributeToken_path = 0x002a,
+ NW_Wml_1_3_AttributeToken_scheme = 0x002e,
+ NW_Wml_1_3_AttributeToken_sendreferer_false = 0x002f,
+ NW_Wml_1_3_AttributeToken_sendreferer_true = 0x0030,
+ NW_Wml_1_3_AttributeToken_size = 0x0031,
+ NW_Wml_1_3_AttributeToken_src = 0x0032,
+ NW_Wml_1_3_AttributeToken_ordered_true = 0x0033,
+ NW_Wml_1_3_AttributeToken_ordered_false = 0x0034,
+ NW_Wml_1_3_AttributeToken_tabindex = 0x0035,
+ NW_Wml_1_3_AttributeToken_title = 0x0036,
+ NW_Wml_1_3_AttributeToken_type = 0x0037,
+ NW_Wml_1_3_AttributeToken_type_accept = 0x0038,
+ NW_Wml_1_3_AttributeToken_type_delete = 0x0039,
+ NW_Wml_1_3_AttributeToken_type_help = 0x003a,
+ NW_Wml_1_3_AttributeToken_type_password = 0x003b,
+ NW_Wml_1_3_AttributeToken_type_onpick = 0x003c,
+ NW_Wml_1_3_AttributeToken_type_onenterbackward = 0x003d,
+ NW_Wml_1_3_AttributeToken_type_onenterforward = 0x003e,
+ NW_Wml_1_3_AttributeToken_type_ontimer = 0x003f,
+ NW_Wml_1_3_AttributeToken_zzzunknown = 0x0040,
+ NW_Wml_1_3_AttributeToken_type_options = 0x0045,
+ NW_Wml_1_3_AttributeToken_type_prev = 0x0046,
+ NW_Wml_1_3_AttributeToken_type_reset = 0x0047,
+ NW_Wml_1_3_AttributeToken_type_text = 0x0048,
+ NW_Wml_1_3_AttributeToken_type_vnd_ = 0x0049,
+ NW_Wml_1_3_AttributeToken_href = 0x004a,
+ NW_Wml_1_3_AttributeToken_href_http___ = 0x004b,
+ NW_Wml_1_3_AttributeToken_href_https___ = 0x004c,
+ NW_Wml_1_3_AttributeToken_value = 0x004d,
+ NW_Wml_1_3_AttributeToken_vspace = 0x004e,
+ NW_Wml_1_3_AttributeToken_width = 0x004f,
+ NW_Wml_1_3_AttributeToken_xml_lang = 0x0050,
+ NW_Wml_1_3_AttributeToken_align = 0x0052,
+ NW_Wml_1_3_AttributeToken_columns = 0x0053,
+ NW_Wml_1_3_AttributeToken_class = 0x0054,
+ NW_Wml_1_3_AttributeToken_id = 0x0055,
+ NW_Wml_1_3_AttributeToken_forua_false = 0x0056,
+ NW_Wml_1_3_AttributeToken_forua_true = 0x0057,
+ NW_Wml_1_3_AttributeToken_src_http___ = 0x0058,
+ NW_Wml_1_3_AttributeToken_src_https___ = 0x0059,
+ NW_Wml_1_3_AttributeToken_http_equiv = 0x005a,
+ NW_Wml_1_3_AttributeToken_http_equiv_Content_Type = 0x005b,
+ NW_Wml_1_3_AttributeToken_content_application_vnd_wap_wmlc_charset_ = 0x005c,
+ NW_Wml_1_3_AttributeToken_http_equiv_Expires = 0x005d,
+ NW_Wml_1_3_AttributeToken_accesskey = 0x005e,
+ NW_Wml_1_3_AttributeToken_enctype = 0x005f,
+ NW_Wml_1_3_AttributeToken_enctype_application_x_www_form_urlencoded = 0x0060,
+ NW_Wml_1_3_AttributeToken_enctype_multipart_form_data = 0x0061,
+ NW_Wml_1_3_AttributeToken_xml_space_preserve = 0x0062,
+ NW_Wml_1_3_AttributeToken_xml_space_default = 0x0063,
+ NW_Wml_1_3_AttributeToken_cache_control_no_cache = 0x0064,
+ NW_Wml_1_3_AttributeToken_cache_control = 0x0065,
+ NW_Wml_1_3_AttributeToken_emptyok = 0x0066,
+ NW_Wml_1_3_AttributeToken_forua = 0x0067,
+ NW_Wml_1_3_AttributeToken_method = 0x0068,
+ NW_Wml_1_3_AttributeToken_mode = 0x0069,
+ NW_Wml_1_3_AttributeToken_multiple = 0x006a,
+ NW_Wml_1_3_AttributeToken_optional = 0x006b,
+ NW_Wml_1_3_AttributeToken_newcontext = 0x006c,
+ NW_Wml_1_3_AttributeToken_ordered = 0x006d,
+ NW_Wml_1_3_AttributeToken_sendreferer = 0x006e,
+ NW_Wml_1_3_AttributeToken_xml_space = 0x006f,
+ NW_Wml_1_3_AttributeToken__com_ = 0x0085,
+ NW_Wml_1_3_AttributeToken__edu_ = 0x0086,
+ NW_Wml_1_3_AttributeToken__net_ = 0x0087,
+ NW_Wml_1_3_AttributeToken__org_ = 0x0088,
+ NW_Wml_1_3_AttributeToken_accept = 0x0089,
+ NW_Wml_1_3_AttributeToken_bottom = 0x008a,
+ NW_Wml_1_3_AttributeToken_clear = 0x008b,
+ NW_Wml_1_3_AttributeToken_delete = 0x008c,
+ NW_Wml_1_3_AttributeToken_help = 0x008d,
+ NW_Wml_1_3_AttributeToken_http___ = 0x008e,
+ NW_Wml_1_3_AttributeToken_http___www_ = 0x008f,
+ NW_Wml_1_3_AttributeToken_https___ = 0x0090,
+ NW_Wml_1_3_AttributeToken_https___www_ = 0x0091,
+ NW_Wml_1_3_AttributeToken_middle = 0x0093,
+ NW_Wml_1_3_AttributeToken_nowrap = 0x0094,
+ NW_Wml_1_3_AttributeValueToken_onpick = 0x0095,
+ NW_Wml_1_3_AttributeValueToken_onenterbackward = 0x0096,
+ NW_Wml_1_3_AttributeValueToken_onenterforward = 0x0097,
+ NW_Wml_1_3_AttributeValueToken_ontimer = 0x0098,
+ NW_Wml_1_3_AttributeToken_options = 0x0099,
+ NW_Wml_1_3_AttributeToken_password = 0x009a,
+ NW_Wml_1_3_AttributeToken_reset = 0x009b,
+ NW_Wml_1_3_AttributeToken_text = 0x009d,
+ NW_Wml_1_3_AttributeToken_top = 0x009e,
+ NW_Wml_1_3_AttributeToken_unknown = 0x009f,
+ NW_Wml_1_3_AttributeToken_wrap = 0x00a0,
+ NW_Wml_1_3_AttributeToken_www_ = 0x00a1
+}NW_Wml_1_3_AttributeToken_0_t;
+
+#ifdef __cplusplus
+}; // extern "C" {
+#endif /* __cplusplus */
+
+#endif
+
+/*
+** WARNING
+**
+** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED
+** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM
+**
+** This file generated on Wed Apr 24 14:59:12 2002
+** (coordinated universal time)
+**
+** Command line: r:\Shared\shaun\dict_creator\dict_creator.exe wml_1_3.dict wml_1_3_tokendict.c wml_1_3_tokendict.h
+*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/inc/nw_xhtml_xhtml_1_0_tokens.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,249 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/*
+** NOTE:
+**
+** We are currently hand editing this file and xhtml_1_0_dict.c.
+**
+** However, I did use the dict_create.exe program in cxml\dictionary to generate
+** and then merge with these files.
+**
+** Joel Parks 2002.08.27
+**
+** This file generated on Tue Aug 27 15:33:29 2002
+** (coordinated universal time)
+**
+** Command line: dict_creator xhtml_1_0.dict xhtml_1_0_dict.c nw_xhtml_xhtml_1_0_tokens.h
+*/
+
+#ifndef _NW_Tempest_nw_xhtml_xhtml_1_0_tokens_h
+#define _NW_Tempest_nw_xhtml_xhtml_1_0_tokens_h
+
+#define NW_xhtml_1_0_PublicId 55
+
+typedef enum NW_XHTML_1_0_ElementToken_0_e{
+ NW_XHTML_ElementToken_body = 0x0005,
+ NW_XHTML_ElementToken_head = 0x0006,
+ NW_XHTML_ElementToken_html = 0x0007,
+ NW_XHTML_ElementToken_title = 0x0008,
+ NW_XHTML_ElementToken_kbd = 0x0009,
+ NW_XHTML_ElementToken_meta = 0x000a,
+ NW_XHTML_ElementToken_abbr = 0x000b,
+ NW_XHTML_ElementToken_acronym = 0x000c,
+ NW_XHTML_ElementToken_address = 0x000d,
+ NW_XHTML_ElementToken_br = 0x000e,
+ NW_XHTML_ElementToken_cite = 0x000f,
+ NW_XHTML_ElementToken_dfn = 0x0010,
+ NW_XHTML_ElementToken_div = 0x0011,
+ NW_XHTML_ElementToken_em = 0x0012,
+ NW_XHTML_ElementToken_h1 = 0x0013,
+ NW_XHTML_ElementToken_h2 = 0x0014,
+ NW_XHTML_ElementToken_h3 = 0x0015,
+ NW_XHTML_ElementToken_h4 = 0x0016,
+ NW_XHTML_ElementToken_h5 = 0x0017,
+ NW_XHTML_ElementToken_h6 = 0x0018,
+ NW_XHTML_ElementToken_p = 0x0019,
+ NW_XHTML_ElementToken_q = 0x001a,
+ NW_XHTML_ElementToken_strong = 0x001b,
+ NW_XHTML_ElementToken_var = 0x001c,
+ NW_XHTML_ElementToken_blockquote = 0x001d,
+ NW_XHTML_ElementToken_pre = 0x001e,
+ NW_XHTML_ElementToken_b = 0x001f,
+ NW_XHTML_ElementToken_a = 0x0020,
+ NW_XHTML_ElementToken_link = 0x0021,
+ NW_XHTML_ElementToken_code = 0x0022,
+ NW_XHTML_ElementToken_big = 0x0023,
+ NW_XHTML_ElementToken_base = 0x0024,
+ NW_XHTML_ElementToken_marquee = 0x0025,
+ NW_XHTML_ElementToken_hr = 0x0026,
+ NW_XHTML_ElementToken_span = 0x0027,
+ NW_XHTML_ElementToken_i = 0x0028,
+ NW_XHTML_ElementToken_small = 0x0029,
+ NW_XHTML_ElementToken_u = 0x002a,
+ NW_XHTML_ElementToken_dl = 0x002b,
+ NW_XHTML_ElementToken_dt = 0x002c,
+ NW_XHTML_ElementToken_dd = 0x002d,
+ NW_XHTML_ElementToken_ol = 0x002e,
+ NW_XHTML_ElementToken_ul = 0x002f,
+ NW_XHTML_ElementToken_li = 0x0030,
+ NW_XHTML_ElementToken_fieldset = 0x0031,
+ NW_XHTML_ElementToken_input = 0x0032,
+ NW_XHTML_ElementToken_form = 0x0033,
+ NW_XHTML_ElementToken_label = 0x0034,
+ NW_XHTML_ElementToken_select = 0x0035,
+ NW_XHTML_ElementToken_option = 0x0036,
+ NW_XHTML_ElementToken_optgroup = 0x0037,
+ NW_XHTML_ElementToken_textarea = 0x0038,
+ NW_XHTML_ElementToken_caption = 0x0039,
+ NW_XHTML_ElementToken_table = 0x003a,
+ NW_XHTML_ElementToken_td = 0x003b,
+ NW_XHTML_ElementToken_th = 0x003c,
+ NW_XHTML_ElementToken_tr = 0x003d,
+ NW_XHTML_ElementToken_img = 0x003e,
+ NW_XHTML_ElementToken_style = 0x003f
+}NW_XHTML_1_0_ElementToken_0_t;
+
+
+typedef enum NW_XHTML_1_0_ElementToken_1_e{
+ NW_XHTML_ElementToken_samp = 0x0114,
+ NW_XHTML_ElementToken_thead = 0x0115,
+ NW_XHTML_ElementToken_tbody = 0x0116,
+ NW_XHTML_ElementToken_tfoot = 0x0117,
+ NW_XHTML_ElementToken_noscript = 0x0118,
+ NW_XHTML_ElementToken_script = 0x0119,
+ NW_XHTML_ElementToken_zzzunknown = 0x011a
+}NW_XHTML_1_0_ElementToken_1_t;
+
+
+typedef enum NW_XHTML_1_0_AttributeToken_0_e{
+ NW_XHTML_AttributeToken_abbr = 0x0005,
+ NW_XHTML_AttributeToken_accept_charset = 0x0006,
+ NW_XHTML_AttributeToken_accept = 0x0007,
+ NW_XHTML_AttributeToken_accesskey = 0x0008,
+ NW_XHTML_AttributeToken_action = 0x0009,
+ NW_XHTML_AttributeToken_align = 0x000a,
+ NW_XHTML_AttributeToken_alink = 0x000b,
+ NW_XHTML_AttributeToken_alt = 0x000c,
+ NW_XHTML_AttributeToken_axis = 0x000e,
+ NW_XHTML_AttributeToken_bgcolor = 0x0010,
+ NW_XHTML_AttributeToken_border = 0x0011,
+ NW_XHTML_AttributeToken_cellpadding = 0x0012,
+ NW_XHTML_AttributeToken_char = 0x0013,
+ NW_XHTML_AttributeToken_charoff = 0x0014,
+ NW_XHTML_AttributeToken_charset = 0x0015,
+ NW_XHTML_AttributeToken_checked = 0x0016,
+ NW_XHTML_AttributeToken_cite = 0x0017,
+ NW_XHTML_AttributeToken_class = 0x0018,
+ NW_XHTML_AttributeToken_clear = 0x001a,
+ NW_XHTML_AttributeToken_code = 0x001b,
+ NW_XHTML_AttributeToken_codebase = 0x001c,
+ NW_XHTML_AttributeToken_codetype = 0x001d,
+ NW_XHTML_AttributeToken_color = 0x001e,
+ NW_XHTML_AttributeToken_cols = 0x001f,
+ NW_XHTML_AttributeToken_colspan = 0x0020,
+ NW_XHTML_AttributeToken_dir = 0x0028,
+ NW_XHTML_AttributeToken_disabled = 0x0029,
+ NW_XHTML_AttributeToken_enctype = 0x002a,
+ NW_XHTML_AttributeToken_height = 0x0030,
+ NW_XHTML_AttributeToken_href = 0x0031,
+ NW_XHTML_AttributeToken_hspace = 0x0033,
+ NW_XHTML_AttributeToken_id = 0x0035,
+ NW_XHTML_AttributeToken_label = 0x0037,
+ NW_XHTML_AttributeToken_link = 0x003a,
+ NW_XHTML_AttributeToken_maxlength = 0x003e,
+ NW_XHTML_AttributeToken_media = 0x003f,
+ NW_XHTML_AttributeToken_method = 0x0045,
+ NW_XHTML_AttributeToken_multiple = 0x0046,
+ NW_XHTML_AttributeToken_name = 0x0047,
+ NW_XHTML_AttributeToken_noshade = 0x004a,
+ NW_XHTML_AttributeToken_nowrap = 0x004b,
+ NW_XHTML_AttributeToken_readonly = 0x0061,
+ NW_XHTML_AttributeToken_rel = 0x0062,
+ NW_XHTML_AttributeToken_rev = 0x0063,
+ NW_XHTML_AttributeToken_rows = 0x0064,
+ NW_XHTML_AttributeToken_rowspan = 0x0065,
+ NW_XHTML_AttributeToken_selected = 0x006a,
+ NW_XHTML_AttributeToken_size = 0x006c,
+ NW_XHTML_AttributeToken_src = 0x006e,
+ NW_XHTML_AttributeToken_start = 0x0070,
+ NW_XHTML_AttributeToken_style = 0x0071,
+ NW_XHTML_AttributeToken_tabindex = 0x0073,
+ NW_XHTML_AttributeToken_title = 0x0076,
+ NW_XHTML_AttributeToken_type = 0x0077,
+ NW_XHTML_AttributeToken_valign = 0x0079,
+ NW_XHTML_AttributeToken_value = 0x007a,
+ NW_XHTML_AttributeToken_version = 0x007c,
+ NW_XHTML_AttributeToken_vspace = 0x007e,
+ NW_XHTML_AttributeToken_width = 0x007f,
+ NW_XHTML_AttributeToken_none = 0x0085,
+ NW_XHTML_AttributeToken_left = 0x0086,
+ NW_XHTML_AttributeToken_right = 0x0087,
+ NW_XHTML_AttributeToken_normal = 0x0088,
+ NW_XHTML_AttributeToken_italic = 0x0089,
+ NW_XHTML_AttributeToken_bold = 0x008a,
+ NW_XHTML_AttributeToken_circle = 0x008b,
+ NW_XHTML_AttributeToken_disc = 0x008c,
+ NW_XHTML_AttributeToken_square = 0x008d,
+ NW_XHTML_AttributeToken_always = 0x008e,
+ NW_XHTML_AttributeToken_avoid = 0x008f,
+ NW_XHTML_AttributeToken_center = 0x0090,
+ NW_XHTML_AttributeToken_justify = 0x0091,
+ NW_XHTML_AttributeToken_underline = 0x0092,
+ NW_XHTML_AttributeToken_blink = 0x0093,
+ NW_XHTML_AttributeToken_marquee = 0x0094,
+ NW_XHTML_AttributeToken_top = 0x0095,
+ NW_XHTML_AttributeToken_middle = 0x0096,
+ NW_XHTML_AttributeToken_bottom = 0x0097,
+ NW_XHTML_AttributeToken_baseline = 0x0098,
+ NW_XHTML_AttributeToken_get = 0x009a,
+ NW_XHTML_AttributeToken_post = 0x009b,
+ NW_XHTML_AttributeToken_ltr = 0x009d,
+ NW_XHTML_AttributeToken_rtl = 0x009e,
+ NW_XHTML_AttributeToken_yes = 0x00a0,
+ NW_XHTML_AttributeToken_no = 0x00a1,
+ NW_XHTML_AttributeToken_auto = 0x00a2,
+ NW_XHTML_AttributeToken_button = 0x00a3,
+ NW_XHTML_AttributeToken_submit = 0x00a4,
+ NW_XHTML_AttributeToken_reset = 0x00a5,
+ NW_XHTML_AttributeToken__1 = 0x00ae,
+ NW_XHTML_AttributeToken_all = 0x00b3,
+ NW_XHTML_AttributeToken_text = 0x00b8,
+ NW_XHTML_AttributeToken_password = 0x00b9,
+ NW_XHTML_AttributeToken_checkbox = 0x00ba,
+ NW_XHTML_AttributeToken_radio = 0x00bb,
+ NW_XHTML_AttributeToken_hidden = 0x00bc
+}NW_XHTML_1_0_AttributeToken_0_t;
+
+
+typedef enum NW_XHTML_1_0_AttributeToken_1_e{
+ NW_XHTML_AttributeToken_zzzunknown = 0x0105,
+ NW_XHTML_AttributeToken_xml_stylesheet = 0x0106,
+ NW_XHTML_AttributeTokenName_alternate = 0x0107
+}NW_XHTML_1_0_AttributeToken_1_t;
+
+
+typedef enum NW_XHTML_1_0_ElementToken_2_e{
+ NW_XHTML_ElementToken_center = 0x0205,
+ NW_XHTML_ElementToken_dir = 0x0206,
+ NW_XHTML_ElementToken_font = 0x0207,
+ NW_XHTML_ElementToken_menu = 0x0208,
+ NW_XHTML_ElementToken_blink = 0x0209
+}NW_XHTML_1_0_ElementToken_2_t;
+
+
+typedef enum NW_XHTML_1_0_AttributeToken_2_e{
+ NW_XHTML_AttributeToken_behavior = 0x0205,
+ NW_XHTML_AttributeToken_direction = 0x0206,
+ NW_XHTML_AttributeToken_loop = 0x0207,
+ NW_XHTML_AttributeToken_scrollamount = 0x0208,
+ NW_XHTML_AttributeToken_scrolldelay = 0x0209,
+ NW_XHTML_AttributeToken_cti = 0x020b,
+ NW_XHTML_AttributeToken_telbook = 0x020d,
+ NW_XHTML_AttributeToken_email = 0x020f,
+ NW_XHTML_AttributeToken_A = 0x0286,
+ NW_XHTML_AttributeToken_a = 0x0287,
+ NW_XHTML_AttributeToken_I = 0x0288,
+ NW_XHTML_AttributeToken_i = 0x0289,
+ NW_XHTML_AttributeToken_scroll = 0x028a,
+ NW_XHTML_AttributeToken_slide = 0x028b,
+ NW_XHTML_AttributeToken_alternate = 0x028c
+}NW_XHTML_1_0_AttributeToken_2_t;
+
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/inc/sl_dict.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/*
+** WARNING
+**
+** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED
+** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM
+**
+** This file generated on Tue Sep 30 14:30:25 2003
+** (coordinated universal time)
+**
+** Command line: dict_creator sl.dict sl_dict.c sl_dict.h
+*/
+
+#ifndef HEADER_GUARD_sl_dict_h
+#define HEADER_GUARD_sl_dict_h
+
+
+#include <xml/cxml/nw_wbxml_dictionary.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+#define NW_SL_PublicId 6
+
+typedef enum NW_SL_ElementToken_0_e{
+ NW_SL_ElementToken_sl = 0x0005
+}NW_SL_ElementToken_0_t;
+
+
+typedef enum NW_SL_AttributeToken_0_e{
+ NW_SL_AttributeToken_action_execute_low = 0x0005,
+ NW_SL_AttributeToken_action_execute_high = 0x0006,
+ NW_SL_AttributeToken_action_cache = 0x0007,
+ NW_SL_AttributeToken_href = 0x0008,
+ NW_SL_AttributeToken_href_http___ = 0x0009,
+ NW_SL_AttributeToken_href_http___www_ = 0x000a,
+ NW_SL_AttributeToken_href_https___ = 0x000b,
+ NW_SL_AttributeToken_href_https___www_ = 0x000c,
+ NW_SL_AttributeToken_action = 0x000d,
+ NW_SL_AttributeToken__com_ = 0x0085,
+ NW_SL_AttributeToken__edu_ = 0x0086,
+ NW_SL_AttributeToken__net_ = 0x0087,
+ NW_SL_AttributeToken__org_ = 0x0088
+}NW_SL_AttributeToken_0_t;
+
+extern const NW_WBXML_Dictionary_t NW_SL_WBXMLDictionary;
+
+/*
+** WARNING
+**
+** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED
+** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM
+**
+** This file generated on Tue Sep 30 14:30:25 2003
+** (coordinated universal time)
+**
+** Command line: dict_creator sl.dict sl_dict.c sl_dict.h
+*/
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/rom/xmlinterface.iby Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: IBY file for XMLInterface
+*
+*/
+
+
+#ifndef __XMLINTERFACE_IBY__
+#define __XMLINTERFACE_IBY__
+
+file=ABI_DIR\BUILD_DIR\XMLInterface.dll SHARED_LIB_DIR\XMLInterface.dll
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/src/CXMLAttributes.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,220 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "CXMLAttributes.h"
+
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CXMLAttributes::CXMLAttributes()
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CXMLAttributes::CXMLAttributes()
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLAttributes::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CXMLAttributes::ConstructL()
+ {
+ iDescAttName = new (ELeave) CDesCArraySeg(1);
+ iDescAttValue = new (ELeave) CDesCArraySeg(1);
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLAttributes::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CXMLAttributes* CXMLAttributes::NewL()
+ {
+ CXMLAttributes* self = new( ELeave ) CXMLAttributes;
+
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop();
+
+ return self;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CXMLAttributes::~CXMLAttributes()
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CXMLAttributes::~CXMLAttributes()
+ {
+ if(iDescAttName)
+ {
+ delete iDescAttName;
+ }
+
+ if(iDescAttValue)
+ {
+ delete iDescAttValue;
+ }
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CXMLAttributes::GetIndex
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CXMLAttributes::GetIndex(TDesC& aName)
+ {
+
+ TInt wIndex = 0;
+ if(iDescAttName->Find(aName,wIndex) != KErrNone)
+ {
+ return KErrNotFound;
+ }
+ else
+ {
+ return wIndex;
+ }
+
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLAttributes::GetLength
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CXMLAttributes::GetLength()
+ {
+ return iDescAttName->Count();
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLAttributes::GetName
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TPtrC CXMLAttributes::GetName(TInt aIndex)
+ {
+ if(aIndex > iDescAttName->Count() || aIndex < 0)
+ {
+ TPtrC wEmpty = _L(" ");
+ return wEmpty;
+ }
+ return iDescAttName->MdcaPoint(aIndex);
+
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLAttributes::GetValue
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TPtrC CXMLAttributes::GetValue(TDesC& aName)
+ {
+ TInt wPos = GetIndex(aName);
+
+ if (wPos < 0)
+ {
+ TPtrC wEmpty = _L(" ");
+ return wEmpty;
+ }
+ return iDescAttValue->MdcaPoint(wPos);
+
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLAttributes::GetValue
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TPtrC CXMLAttributes::GetValue(TInt& aIndex)
+ {
+ if(aIndex > iDescAttName->Count() || aIndex < 0)
+ {
+ TPtrC wEmpty = _L(" ");
+ return wEmpty;
+ }
+ return iDescAttValue->MdcaPoint(aIndex);
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLAttributes::GetType
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+/// R&D: Feature: GetType missing from Attributes
+TPtrC CXMLAttributes::GetType(TInt /*aIndex*/)
+ {
+ TPtrC wType = _L(" ");
+ return(wType);
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLAttributes::GetType
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+// R&D: Feature: GetType missing from Attributes
+TPtrC CXMLAttributes::GetType(TDesC& /*aName*/)
+ {
+ TPtrC wType = _L(" ");
+ return wType;
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLAttributes::Append
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CXMLAttributes::AppendL(const TDesC& aName, const TDesC& aValue)
+ {
+ if ( iDescAttName && iDescAttValue )
+ {
+ iDescAttName->AppendL(aName);
+ iDescAttValue->AppendL(aValue);
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLAttributes::Reset()
+// Resets attribute Name and Value arrays
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CXMLAttributes::Reset()
+ {
+ iDescAttName->Reset();
+ iDescAttValue->Reset();
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/src/CXMLObserver.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,168 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+
+
+#include "CXMLObserver.h"
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CXMLObserver::CXMLObserver
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CXMLObserver::CXMLObserver()
+ {
+
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLObserver::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CXMLObserver::ConstructL()
+ {
+ iCurrentAttribute = new(ELeave) TPtrC();
+ iAttributes = CXMLAttributes::NewL();
+ iDescElements = new (ELeave) CDesCArraySeg(1);
+ iNSextensions = new (ELeave) CDesCArraySeg(1);
+ iURIs = new (ELeave) CDesCArraySeg(1);
+ iContentHandler = NULL;
+ iBinaryContentHandler = NULL;
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLObserver::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CXMLObserver* CXMLObserver::NewL()
+ {
+ CXMLObserver* self = new( ELeave ) CXMLObserver();
+
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop();
+
+ return self;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CXMLObserver::~CXMLObserver
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CXMLObserver::~CXMLObserver()
+ {
+ if (iCurrentAttribute)
+ {
+ delete iCurrentAttribute;
+ }
+ if(iAttributes)
+ {
+ delete iAttributes;
+ }
+ if(iDescElements)
+ {
+ delete iDescElements;
+ }
+ if(iNSextensions)
+ {
+ delete iNSextensions;
+ }
+ if(iURIs)
+ {
+ delete iURIs;
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLObserver::SetElement
+//
+// -----------------------------------------------------------------------------
+//
+void CXMLObserver::SetElementL(const TPtrC &aName)
+{
+ if(iDescElements)
+ {
+ iDescElements->AppendL(aName);
+ }
+}
+
+// -----------------------------------------------------------------------------
+// CXMLObserver::GetElement
+//
+// -----------------------------------------------------------------------------
+//
+TPtrC CXMLObserver::GetElement() const
+{
+ TInt wIndex = iDescElements->Count()-1;
+ if(wIndex < 0)
+ {
+ TPtrC wEmpty = _L(" ");
+ return wEmpty;
+
+ }
+ return iDescElements->MdcaPoint(wIndex);
+}
+
+// -----------------------------------------------------------------------------
+// CXMLObserver::GetElement
+//
+// -----------------------------------------------------------------------------
+//
+void CXMLObserver::RemoveElement()
+{
+ TInt wIndex = iDescElements->Count()-1;
+ if(wIndex > -1)
+ {
+ iDescElements->Delete(wIndex);
+ iDescElements->Compress();
+ }
+}
+
+void CXMLObserver::SetURIL(const TPtrC &aURI, const TPtrC &aNSextension)
+{
+ iNSextensions->AppendL(aNSextension);
+ iURIs->AppendL(aURI);
+}
+
+TPtrC CXMLObserver::GetURI(const TPtrC &aNSextension) const
+{
+ TInt wIndex = 0;
+ TInt wRes = 0;
+
+ wRes = iNSextensions->Find(aNSextension,wIndex);
+ if(wRes != 0)
+ {
+ TPtrC wEmpty = _L(" ");
+ return wEmpty;
+ }
+ return iURIs->MdcaPoint(wIndex);
+}
+void CXMLObserver::ResetURI()
+{
+ iNSextensions->Reset();
+ iURIs->Reset();
+}
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/src/CXMLReader.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,1123 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "CXMLReader.h"
+
+
+/* Dictionar Public ID's */
+#define WML_1_1_PUBLIC_ID 4
+#define WML_1_2_PUBLIC_ID 9
+#define WML_1_3_PUBLIC_ID 10
+#define XHTML_1_0_PUBLIC_ID 55
+#define SYNCML_1_0_PUBLIC_ID 0xFD1
+#define WAP_PROV_1_0_PUBLIC_ID 11
+#define SI_1_0_PUBLIC_ID 5
+#define SL_1_0_PUBLIC_ID 6
+#define PUSH_PROV_1_0_PUBLIC_ID 1
+extern "C"
+{
+ extern NW_WBXML_Dictionary_t NW_Wml_1_0_WBXMLDictionary;
+ extern NW_WBXML_Dictionary_t NW_Wml_1_1_WBXMLDictionary;
+ extern NW_WBXML_Dictionary_t NW_Wml_1_2_WBXMLDictionary;
+ extern NW_WBXML_Dictionary_t NW_Wml_1_3_WBXMLDictionary;
+ extern NW_WBXML_Dictionary_t NW_XHTML_WBXMLDictionary;
+ extern NW_WBXML_Dictionary_t NW_SyncML_1_0_WBXMLDictionary;
+ extern NW_WBXML_Dictionary_t NW_SL_WBXMLDictionary;
+// extern NW_WBXML_Dictionary_t NW_wap_prov_doc_WBXMLDictionary;
+// extern NW_WBXML_Dictionary_t SI_dictionary;
+// extern NW_WBXML_Dictionary_t SL_dictionary;
+// extern NW_WBXML_Dictionary_t push_nokprov_dictionary;
+}
+#define DICTIONARY_COUNT 7
+
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// BeginElementCB
+// BeginElement callback, stores elemntname in elemntlist
+// -----------------------------------------------------------------------------
+//
+NW_Status_t BeginElementCB(NW_XML_Reader_t* aReader,
+ const NW_XML_Reader_Interval_t* aName,
+ void* aParser)
+{
+ CXMLObserver *wObserver = (CXMLObserver*)aParser;
+ TPtrC wElementName( (TUint16*)aReader->pBuf + aName->charStart, aName->charStop - aName->charStart );
+ TRAPD(error, wObserver->SetElementL(wElementName));
+ if(error)
+ {
+ (wObserver->GetAttributes())->Reset();
+ return NW_STAT_FAILURE;
+ }
+ // New element, reset attributes list
+ (wObserver->GetAttributes())->Reset();
+ return NW_STAT_SUCCESS;
+}
+
+// -----------------------------------------------------------------------------
+// EndElementCB. calls MXMLContentHandler::EndElement with elemntname,
+// removes closed element from elemntlist.
+// -----------------------------------------------------------------------------
+//
+NW_Status_t EndElementCB(NW_XML_Reader_t* aReader,
+ const NW_XML_Reader_Interval_t* aName,
+ NW_Uint32 /*aEmpFlag*/,
+ void* aParser)
+{
+ _LIT(KEmpty,"");
+ TPtrC wEmpty(KEmpty);
+ CXMLObserver* wObserver = (CXMLObserver*)aParser;
+ wObserver->RemoveElement();
+ MXMLContentHandler* aContentHandler = wObserver->GetContentHandler();
+ TPtrC aElementName( (TUint16*)aReader->pBuf + aName->charStart, aName->charStop - aName->charStart );
+ TInt result = aContentHandler->EndElement(wEmpty, wEmpty, aElementName);
+ aContentHandler->ReaderIndex( aReader->charIndex );
+ return result ? NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// AttributesStartCB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t AttributeStartCB (NW_XML_Reader_t*,
+ const NW_XML_Reader_Interval_t* /*pI_name*/,
+ void*)
+{
+ return NW_STAT_SUCCESS;
+}
+
+// -----------------------------------------------------------------------------
+// AttreibuteValueCB Adds new attribute to attributes list.
+// Adds URI to URI list if namespaces is used
+// -----------------------------------------------------------------------------
+//
+NW_Status_t AttributeValueCB(NW_XML_Reader_t* aReader,
+ const NW_XML_Reader_Interval_t* aName,
+ const NW_XML_Reader_Interval_t* aValue,
+ void* aParser)
+{
+ _LIT(KNamespace,"xmlns:");
+ TPtrC wNamespace(KNamespace);
+ CXMLObserver* wObserver = (CXMLObserver*)aParser;
+ CXMLAttributes* wAttr = wObserver->GetAttributes();
+
+ // Append new attribute to attributes list
+ TPtrC wAttributeName( (TUint16*)aReader->pBuf + aName->charStart, aName->charStop - aName->charStart );
+ TPtrC wAttributeValue( (TUint16*)aReader->pBuf + aValue->charStart, aValue->charStop - aValue->charStart );
+ TRAPD(error,wAttr->AppendL(wAttributeName, wAttributeValue));
+ if(error)
+ {
+ return NW_STAT_FAILURE;
+ }
+ // namespace declaration, store URI and extension
+ if(wAttributeName.Left(6).Match(wNamespace)!=KErrNotFound)
+ {
+ TPtrC wExtension = wAttributeName.Right(wAttributeName.Length()-6);
+ TRAP(error, wObserver->SetURIL(wAttributeValue, wExtension));
+ if(error)
+ {
+ return NW_STAT_FAILURE;
+ }
+ }
+ return NW_STAT_SUCCESS;
+}
+
+// -----------------------------------------------------------------------------
+// AttributesEndCB Calls MXMLContentHandler::StartElement with element name and
+// attributes list.
+// -----------------------------------------------------------------------------
+//
+NW_Status_t AttributesEndCB(NW_XML_Reader_t* /*aReader*/,
+ NW_Uint32 /*aLength*/,
+ void* aParser)
+{
+ _LIT(KLocalName,"");
+ TPtrC wLocalName(KLocalName);
+ _LIT(KURI,"");
+ TPtrC wURI(KURI);
+ CXMLObserver* wObserver = (CXMLObserver*)aParser;
+ MXMLContentHandler* wContentHandler = wObserver->GetContentHandler();
+
+ TPtrC wElementName = wObserver->GetElement();
+ CXMLAttributes* wAttributes = wObserver->GetAttributes();
+
+ // if using namespace, get URI and localname
+ TInt wIndex = wElementName.Locate(':');
+ if(wIndex > 0)
+ {
+ wLocalName.Set(wElementName.Right(wElementName.Length()-wIndex-1));
+ TPtrC temp = wElementName.Left(wIndex);
+ wURI.Set(wObserver->GetURI(temp));
+ }
+ // Call StartElement, now that we have all the attributes
+ return wContentHandler->StartElement(wURI, wLocalName, wElementName, wAttributes) ? NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// CDataCB Reports actual CData as MXMLContentHandler::Characters (between
+// MXMLContentHandler::StartCData and MXMLContentHandler::EndCData
+// -----------------------------------------------------------------------------
+//
+NW_Status_t CdataCB (NW_XML_Reader_t* aReader,
+ const NW_XML_Reader_Interval_t* aName,
+ void* aParser)
+{
+ CXMLObserver* wObserver = (CXMLObserver*)aParser;
+ MXMLContentHandler* aContentHandler = wObserver->GetContentHandler();
+ TPtrC wChar( (TUint16*)aReader->pBuf + aName->charStart, aName->charStop - aName->charStart );
+
+ aContentHandler->StartCDATA();
+ aContentHandler->Charecters( wChar, aName->charStart, (aName->charStop - aName->charStart) );
+ return aContentHandler->EndCDATA()? NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// ContentCB Content reported as MXMLContentHandler::Characters
+// -----------------------------------------------------------------------------
+//
+NW_Status_t ContentCB (NW_XML_Reader_t* aReader,
+ const NW_XML_Reader_Interval_t* aValue,
+ void* aParser)
+{
+
+ CXMLObserver* wObserver = (CXMLObserver*)aParser;
+ TPtrC wChar( (TUint16*)aReader->pBuf + aValue->charStart, aValue->charStop - aValue->charStart );
+
+ MXMLContentHandler* aContentHandler = wObserver->GetContentHandler();
+
+ return (aContentHandler->Charecters(wChar, aValue->charStart, (aValue->charStop - aValue->charStart)))?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+
+// -----------------------------------------------------------------------------
+// AttrEntityVarValCB Adds new attribute to attributes list.
+// Adds URI to URI list if namespaces is used
+// -----------------------------------------------------------------------------
+//
+NW_Status_t AttrEntityVarValCB (NW_XML_Reader_t* aReader,
+ const NW_XML_Reader_Interval_t* aName,
+ NW_Uint8* aValue,
+ NW_Uint32 aValueByteLength,
+ void* aParser)
+ {
+ _LIT(KNamespace, "xmlns:");
+ TPtrC wNamespace(KNamespace);
+ CXMLObserver* wObserver = (CXMLObserver*)aParser;
+ CXMLAttributes* wAttr = wObserver->GetAttributes();
+
+ // Append new attribute to attributes list
+ TPtrC wAttributeName( (TUint16*)aReader->pBuf + aName->charStart, aName->charStop - aName->charStart );
+ TPtrC wAttributeValue( (TUint16*)aValue, aValueByteLength/2 );
+
+ TRAPD(error,wAttr->AppendL(wAttributeName, wAttributeValue));
+ if(error)
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ // namespace declaration, store URI and extension
+ if(wAttributeName.Left(6).Match(wNamespace)!=KErrNotFound)
+ {
+ TPtrC wExtension = wAttributeName.Right(wAttributeName.Length()-6);
+ TRAP(error, wObserver->SetURIL(wAttributeValue, wExtension));
+ if(error)
+ {
+ return NW_STAT_FAILURE;
+ }
+ }
+ return NW_STAT_SUCCESS;
+ }
+
+
+// -----------------------------------------------------------------------------
+// EntityCB Entity reported as MXMLContentHandler::StartEntity
+// -----------------------------------------------------------------------------
+//
+NW_Status_t EntityCB (NW_XML_Reader_t* aReader,
+ NW_Uint32 aNumEntity,
+ void* aParser,
+ CXML_Uint8* aIntEntityValStr)
+{
+
+ CXMLObserver *wObserver = (CXMLObserver*)aParser;
+
+ NW_String_t *tempString = NW_String_new();
+ // handle OOM
+ if(tempString == NULL)
+ {
+ return NW_STAT_FAILURE;
+ }
+
+ if(aIntEntityValStr == NULL)
+ {
+ //It is character/predefined entities
+ NW_String_entityToString(aNumEntity, tempString, aReader->encoding);
+ }
+
+ if(aIntEntityValStr != NULL)
+ {
+ //It is the internal entity
+ tempString->storage = aIntEntityValStr;
+ }
+
+ TPtrC wTmpEntityPtr((TUint16*)tempString->storage);
+ TInt result(wObserver->GetContentHandler()->StartEntity(wTmpEntityPtr));
+
+ if (result == 0)
+ {
+ NW_String_delete(tempString);
+ return NW_STAT_FAILURE;
+ }
+ result = wObserver->GetContentHandler()->EndEntity(wTmpEntityPtr);
+ NW_String_delete(tempString);
+
+ return (result?NW_STAT_SUCCESS:NW_STAT_FAILURE);
+
+}
+
+// -----------------------------------------------------------------------------
+// CommentCB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t CommentCB (NW_XML_Reader_t* aReader,
+ const NW_XML_Reader_Interval_t* aName,
+ void* aParser )
+{
+ CXMLObserver* wObserver = (CXMLObserver*)aParser;
+ TPtrC wComment( (TUint16*)aReader->pBuf + aName->charStart, aName->charStop - aName->charStart );
+ return (wObserver->GetContentHandler())->Comment(wComment)?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// StartDocumentCB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t StartDocumentCB (NW_XML_Reader_t* /*aReader*/,
+ void* aParser )
+
+{
+ CXMLObserver* wObserver = (CXMLObserver*)aParser;
+ return (wObserver->GetContentHandler())->StartDocument()?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+
+}
+
+// -----------------------------------------------------------------------------
+// EndDocumentCB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t EndDocumentCB (NW_XML_Reader_t* /*aReader*/,
+ void* aParser)
+{
+ CXMLObserver* wObserver = (CXMLObserver*)aParser;
+ return (wObserver->GetContentHandler())->EndDocument()?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// PiCB Report Processing Instruction with MXMLProcessingInstruction(Target, Data)
+// -----------------------------------------------------------------------------
+//
+NW_Status_t PiCB (NW_XML_Reader_t* aReader,
+ NW_PiFormTypeTag_t aTag,
+ const NW_XML_Reader_Interval_t* aName,
+ const NW_XML_Reader_Interval_t* aVersion,
+ const NW_XML_Reader_Interval_t* /*aEncoding*/,
+ const NW_XML_Reader_Interval_t* /*aStandalone*/,
+ const NW_XML_Reader_Interval_t* aContent,
+ void* aParser)
+{
+ CXMLObserver* wObserver = (CXMLObserver*)aParser;
+ TPtrC aTarget( (TUint16*)aReader->pBuf + aName->charStart, aName->charStop - aName->charStart );
+ if(aTag==XMLDECL)
+ {
+ TPtrC aData( (TUint16*)aReader->pBuf + aVersion->charStart, aVersion->charStop - aVersion->charStart );
+ return (wObserver->GetContentHandler())->ProcessingInstructions(aTarget, aData)?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+ }
+ else
+ {
+ TPtrC aData( (TUint16*)aReader->pBuf + aContent->charStart, aContent->charStop - aContent->charStart );
+ return (wObserver->GetContentHandler())->ProcessingInstructions(aTarget, aData)?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+ }
+}
+
+
+// Binary Call backs
+
+// -----------------------------------------------------------------------------
+// Binary_StartDocument_CB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_StartDocument_CB (NW_WBXML_Parser_t* /*aParser*/,
+ NW_WBXML_Document_t* /*aDocument*/,
+ void * aContext)
+{
+ CXMLObserver* wObserver = (CXMLObserver*)aContext;
+ return (wObserver->GetBinaryContentHandler())->StartDocument()?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// Binary_EndDocument_CB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_EndDocument_CB(NW_WBXML_Parser_t* /*aParser*/,
+ void * aContext)
+{
+ CXMLObserver* wObserver = (CXMLObserver*)aContext;
+ return (wObserver->GetBinaryContentHandler())->EndDocument()?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// Binary_Pi_CB ?description.
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_Pi_CB (NW_WBXML_Parser_t* /*aParser*/,
+ void * aContext)
+{
+ CXMLObserver* wObserver = (CXMLObserver*)aContext;
+ return (wObserver->GetBinaryContentHandler())->ProcessingInstruction()?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// Binary_Pi_End_CB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_Pi_End_CB (NW_WBXML_Parser_t* /*aParser*/,
+ void* aContext)
+{
+ CXMLObserver *wObserver = (CXMLObserver*)aContext;
+ return (wObserver->GetBinaryContentHandler())->ProcessingInstructionEnd()?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// Binary_Tag_Start_CB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_Tag_Start_CB(NW_WBXML_Parser_t* /*aParser*/,
+ void *aContext)
+{
+
+ CXMLObserver *wObserver = (CXMLObserver*)aContext;
+ return (wObserver->GetBinaryContentHandler())->TagStart()?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// Binary_Tag_End_CB ?description.
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_Tag_End_CB(NW_WBXML_Parser_t* /*aParser*/,
+ void *aContext)
+{
+ CXMLObserver *wObserver = (CXMLObserver*)aContext;
+ return (wObserver->GetBinaryContentHandler())->TagEnd()?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// Binary_Attr_Start_CB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_Attr_Start_CB(NW_WBXML_Parser_t* /*aParser*/,
+ void *aContext)
+{
+ CXMLObserver *wObserver = (CXMLObserver*)aContext;
+ return (wObserver->GetBinaryContentHandler())->AttributeStart()?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// Binary_Attr_Val_CB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_Attr_Val_CB(NW_WBXML_Parser_t* /*aParser*/,
+ void *aContext)
+{
+ CXMLObserver *wObserver = (CXMLObserver*)aContext;
+ return (wObserver->GetBinaryContentHandler())->AttributeValue()?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// Binary_Content_CB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_Content_CB(NW_WBXML_Parser_t* /*aParser*/,
+ void *aContext)
+{
+ CXMLObserver *wObserver = (CXMLObserver*)aContext;
+ return (wObserver->GetBinaryContentHandler())->Content()?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// Binary_CodePage_CB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_CodePage_CB(NW_WBXML_Parser_t* /*aParser*/,
+ void* aContext)
+{
+ // Code page switch in WBXML doc
+ CXMLObserver *wObserver = (CXMLObserver*)aContext;
+ return (wObserver->GetBinaryContentHandler())->CodePageSwitch()?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// Binary_Extension_CB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_Extension_CB(NW_WBXML_Parser_t* /*aParser*/,
+ void* aContext)
+{
+ CXMLObserver *wObserver = (CXMLObserver*)aContext;
+ return (wObserver->GetBinaryContentHandler())->Extension()?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// Binary_Token_CB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_Token_CB(NW_WBXML_Parser_t* /*aParser*/,
+ NW_Uint8 aToken,
+ void *aContext)
+{
+ CXMLObserver *wObserver = (CXMLObserver*)aContext;
+ NW_String_UCS2Buff_t *wTemp = NW_WBXML_Dictionary_getTagByFqToken (aToken);
+ TPtrC wString((TUint16*)wTemp);
+ return (wObserver->GetBinaryContentHandler())->Token(aToken, wString)?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// Binary_FQToken_CB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_FQToken_CB(NW_WBXML_Parser_t* /*aParser*/,
+ NW_Uint32 aFQToken,
+ void *aContext)
+{
+ CXMLObserver *wObserver = (CXMLObserver*)aContext;
+ NW_Byte aToken = (NW_Byte) (aFQToken & NW_WBXML_MASK_TOKEN);
+ if( (aToken & NW_WBXML_MASK_TAG_ID) != NW_WBXML_LITERAL)
+ {
+ NW_String_UCS2Buff_t *wTemp = NW_WBXML_Dictionary_getTagByFqToken(aFQToken);
+ if(wTemp)
+ {
+ TPtrC wString((TUint16*)wTemp);
+ return (wObserver->GetBinaryContentHandler())->Token(aToken, wString)?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+ }
+ return NW_STAT_FAILURE;
+ }
+ return NW_STAT_SUCCESS;
+}
+
+// -----------------------------------------------------------------------------
+// Binary_InlineString_CB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_InlineString_CB(NW_WBXML_Parser_t *aParser,
+ NW_Uint32 /*aIndex*/,
+ void *aContext)
+{
+ CXMLObserver *wObserver = (CXMLObserver*)aContext;
+ NW_String_t *tempString = NW_String_new();
+ // handle OOM
+ if(tempString == NULL)
+ {
+ return NW_STAT_FAILURE;
+ }
+ NW_WBXML_Document_t *doc = aParser->doc;
+
+ NW_WBXML_Parser_getStringInline(aParser, doc, tempString);
+
+ /**!
+ * This was changed because of MNUI-68TAZP - German umlauts were displayed wrong.
+ * This was caused by NW_String_byteToUCS2Char() function - this is not recognize utf-8 encoding and treats
+ * all characters as a 1byte ASCII. In case of character encoded on more than 1 byte
+ * we get two or more separate symbols instead of one compound of these bytes.
+ * The CnvUtfConverter::ConvertToUnicodeFromUtf8() recognizes utf-8 properly.
+
+ NW_Ucs2 *ucs2;
+ NW_String_byteToUCS2Char(tempString->storage, ((*tempString).length) & ~0x80000000, &ucs2); //VC, AM
+ // handle OOM
+ if(ucs2 == NULL)
+ {
+ NW_String_delete(tempString);
+ return NW_STAT_FAILURE;
+ }
+ TPtrC wString((TUint16*)ucs2);
+ NW_String_delete(tempString);
+ */
+
+ TPtrC8 string8(tempString->storage);
+ HBufC *string16=NULL;
+ TRAPD(err, string16 = HBufC::NewL(string8.Length()));
+ if(err)
+ {
+ NW_String_delete(tempString);
+ return NW_STAT_FAILURE;
+ }
+ TPtr wString(string16->Des());
+
+#if defined(_UNICODE)
+ err = CnvUtfConverter::ConvertToUnicodeFromUtf8(wString,string8);
+ if(err != KErrNone)
+ {
+ NW_String_delete(tempString);
+ delete string16;
+ return NW_STAT_FAILURE;
+ }
+#else
+ wString.Copy(string8);
+#endif
+
+ TInt result((wObserver->GetBinaryContentHandler())->InlineString(wString));
+
+ NW_String_delete(tempString);
+ delete string16;
+
+ return (result?NW_STAT_SUCCESS:NW_STAT_FAILURE);
+}
+
+// -----------------------------------------------------------------------------
+// Binary_TableString_CB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_TableString_CB(NW_WBXML_Parser_t *aParser,
+ NW_Uint32 aIndex,
+ void *aContext)
+{
+ CXMLObserver *wObserver = (CXMLObserver*)aContext;
+ NW_String_t *tempString = NW_String_new();
+ // handle OOM
+ if(tempString == NULL)
+ {
+ return NW_STAT_FAILURE;
+ }
+ NW_WBXML_Document_t *doc = aParser->doc;
+ NW_WBXML_Document_getTableString(doc, aIndex, tempString);
+ /**!
+ * This was changed because of MNUI-68TAZP - German umlauts were displayed wrong.
+ * This was caused by NW_String_byteToUCS2Char() function - this is not recognize utf-8 encoding and treats
+ * all characters as a 1byte ASCII. In case of character encoded on more than 1 byte
+ * we get two or more separate symbols instead of one compound of these bytes.
+ * The CnvUtfConverter::ConvertToUnicodeFromUtf8() recognizes utf-8 properly.
+
+ NW_Ucs2 *ucs2;
+ NW_String_byteToUCS2Char(tempString->storage, ((*tempString).length) & ~0x80000000, &ucs2); //VC, AM
+ // handle OOM
+ if(ucs2 == NULL)
+ {
+ NW_String_delete(tempString);
+ return NW_STAT_FAILURE;
+ }
+ TPtrC wString((TUint16*)ucs2);
+ NW_String_delete(tempString);
+ */
+
+ TPtrC8 string8(tempString->storage);
+ HBufC *string16=NULL;
+ TRAPD(err, string16 = HBufC::NewL(string8.Length()));
+ if(err)
+ {
+ NW_String_delete(tempString);
+ return NW_STAT_FAILURE;
+ }
+
+ TPtr wString(string16->Des());
+
+#if defined(_UNICODE)
+ err = CnvUtfConverter::ConvertToUnicodeFromUtf8(wString,string8);
+ if(err != KErrNone)
+ {
+ NW_String_delete(tempString);
+ delete string16;
+ return NW_STAT_FAILURE;
+ }
+#else
+ wString.Copy(string8);
+#endif
+
+ TInt result((wObserver->GetBinaryContentHandler())->TableString(wString));
+
+ NW_String_delete(tempString);
+ delete string16;
+
+ return (result?NW_STAT_SUCCESS:NW_STAT_FAILURE);
+}
+
+// -----------------------------------------------------------------------------
+// Binary_Binary_CB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_Binary_CB(NW_WBXML_Parser_t* /*aParser*/,
+ NW_Uint32 aIndex,
+ void* aContext)
+{
+ CXMLObserver *wObserver = (CXMLObserver*)aContext;
+ return (wObserver->GetBinaryContentHandler())->Binary(aIndex)?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// Binary_Opaque_CB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_Opaque_CB(NW_WBXML_Parser_t *aParser,
+ NW_Uint32 aLength,
+ void * aContext)
+{
+ CXMLObserver *wObserver = (CXMLObserver*)aContext;
+ TPtrC wString((TUint16*)aParser->p, aLength);
+ return (wObserver->GetBinaryContentHandler())->Opaque(aLength, wString)?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+// -----------------------------------------------------------------------------
+// Binary_Entity_CB
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_Entity_CB(NW_WBXML_Parser_t *aParser,
+ NW_Uint32 aIndex,
+ void* aContext)
+{
+ NW_String_t *tempString = NW_String_new();
+ // handle OOM
+ if(tempString == NULL)
+ {
+ return NW_STAT_FAILURE;
+ }
+ NW_String_entityToString(aIndex, tempString, aParser->doc->charset);
+ NW_Ucs2 *ucs2;
+ NW_String_byteToUCS2Char(tempString->storage, tempString->length, &ucs2);
+ // handle OOM
+ if(ucs2 == NULL)
+ {
+ NW_String_delete(tempString);
+ return NW_STAT_FAILURE;
+ }
+ TPtrC wString((TUint16*)ucs2);
+ NW_String_delete(tempString);
+
+ CXMLObserver *wObserver = (CXMLObserver*)aContext;
+ TInt result((wObserver->GetBinaryContentHandler())->Entity(aIndex, wString));
+ delete (void*)wString.Ptr();
+
+ return (result?NW_STAT_SUCCESS:NW_STAT_FAILURE);
+}
+
+// -----------------------------------------------------------------------------
+// Binary_Exception_CB For parse errors
+// -----------------------------------------------------------------------------
+//
+NW_Status_t Binary_Exception_CB(NW_WBXML_Parser_t* /*aParser*/,
+ NW_WBXML_Exception_t /*aException*/,
+ void* aContext)
+{
+
+ CXMLObserver *wObserver = (CXMLObserver*)aContext;
+ return (wObserver->GetBinaryContentHandler())->Exception()?NW_STAT_SUCCESS:NW_STAT_FAILURE;
+}
+
+
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+// -----------------------------------------------------------------------------
+// CXMLReader::CXMLReader
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CXMLReader::CXMLReader()
+{
+
+}
+
+// -----------------------------------------------------------------------------
+// CXMLReader::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CXMLReader::ConstructL()
+{
+ iParserObserver = CXMLObserver::NewL();
+ // Default parser = XML , not WBXML
+ iIsBinary = FALSE;
+}
+
+// -----------------------------------------------------------------------------
+// ?classname::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CXMLReader* CXMLReader::NewL()
+{
+ CXMLReader* self = new( ELeave ) CXMLReader();
+
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop();
+
+ return self;
+}
+
+// Destructor
+CXMLReader::~CXMLReader()
+{
+ if(iParserObserver)
+ {
+ delete iParserObserver;
+ }
+
+}
+
+// -----------------------------------------------------------------------------
+// CXMLReader::SetFeature
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CXMLReader::SetFeature(TXMLFeature aFeature, TBool aStatus)
+{
+ TInt wReturn;
+ wReturn=0;
+
+ switch(aFeature)
+ {
+ case EXMLBinary:
+ iIsBinary = aStatus;
+ wReturn = KErrNone;
+ break;
+ case EXMLValidation:
+ wReturn = KErrNotSupported;
+ break;
+ default:
+ wReturn = KErrNotSupported;
+ break;
+ }
+ return wReturn;
+}
+
+// -----------------------------------------------------------------------------
+// CXMLReader::GetFeature
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CXMLReader::GetFeature(TXMLFeature aFeature, TBool &aStatus)
+{
+ TInt wReturn;
+ wReturn=0;
+
+ switch(aFeature)
+ {
+ case EXMLBinary:
+ aStatus = iIsBinary;
+ wReturn = KErrNone;
+ break;
+ case EXMLValidation:
+ aStatus = FALSE;
+ wReturn = KErrNotSupported;
+ break;
+ default:
+ wReturn = KErrNotSupported;
+ break;
+ }
+ return wReturn;
+}
+
+// -----------------------------------------------------------------------------
+// CXMLReader::SetContentHandler
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CXMLReader::SetContentHandler(MXMLContentHandler* aParserObserver)
+{
+ iParserObserver->SetContentHandler(aParserObserver);
+ return KErrNone;
+}
+
+// -----------------------------------------------------------------------------
+// CXMLReader::SetContentHandler
+// Set binary XML content handler
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CXMLReader::SetContentHandler(MWBXMLContentHandler* aParserObserver)
+{
+ iParserObserver->SetContentHandler(aParserObserver);
+ return KErrNone;
+}
+
+// -----------------------------------------------------------------------------
+// CXMLReader::Parse
+// Reades the input file, and calls ParseL(RFile&).
+// @ exception can Leave due to OOM
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CXMLReader::ParseL(RFs& aRFs, const TDesC& aFileToParse)
+{
+ RFile wXMLFile;
+
+ //Open file
+ User::LeaveIfError(wXMLFile.Open(aRFs, aFileToParse, EFileRead | EFileShareReadersOnly));
+ CleanupClosePushL(wXMLFile);
+ ParseL(wXMLFile);
+ CleanupStack::PopAndDestroy(); // wXMLFile
+}
+
+// -----------------------------------------------------------------------------
+// CXMLReader::Parse
+// Reades the input from the opened file into buffer, and calls RunL.
+// @ exception can Leave due to OOM
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CXMLReader::ParseL(RFile& aOpenedFile)
+{
+ TInt wSize;
+ User::LeaveIfError(aOpenedFile.Size(wSize));
+
+ HBufC8 * binaryBuffer = HBufC8::NewLC(wSize);
+ TPtr8 binaryBufferPtr = binaryBuffer->Des();
+ User::LeaveIfError(aOpenedFile.Read(binaryBufferPtr, wSize));
+
+ if(!iIsBinary)
+ {
+ TInt hichar = (CEditableText::EReversedByteOrderMark & 0xFF00)>>8;
+ TInt lochar = CEditableText::EReversedByteOrderMark & 0xFF;
+ TInt bytesPerChar = 1;
+ if(binaryBufferPtr.Ptr()[0] == hichar && binaryBufferPtr.Ptr()[1] == lochar)
+ {
+ bytesPerChar = 2;
+ }
+
+ HBufC * dataBuffer = HBufC::NewLC(wSize/bytesPerChar);
+ TPtr dataBufferPtr = dataBuffer->Des();
+
+ if(bytesPerChar == 2)
+ {
+ dataBufferPtr.Set((TUint16*)binaryBufferPtr.Ptr()+1,
+ wSize/bytesPerChar-1,
+ wSize/bytesPerChar-1);
+ }
+ else
+ {
+ CnvUtfConverter::ConvertToUnicodeFromUtf8(dataBufferPtr, binaryBuffer->Des());
+ }
+ User::LeaveIfError(ParseXML(dataBufferPtr));
+ CleanupStack::Pop(); // dataBuffer
+ CleanupStack::PopAndDestroy(); // binaryBuffer
+ delete dataBuffer;
+ }
+ else
+ {
+ User::LeaveIfError(ParseWBXML(binaryBufferPtr));
+ CleanupStack::PopAndDestroy(); // binaryBuffer
+ }
+}
+
+// -----------------------------------------------------------------------------
+// CXMLReader::ParseL
+// Copies aBuff into input buffer and calls RunL
+// @ exception can Leave due to OOM
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CXMLReader::ParseL(const TDesC8& aBuff) // change the allocations
+{
+
+
+ if(!iIsBinary)
+ {
+ HBufC * dataBuffer = HBufC::NewLC(aBuff.Size());
+ TPtr dataBufferPtr = dataBuffer->Des();
+ CnvUtfConverter::ConvertToUnicodeFromUtf8(dataBufferPtr, aBuff);
+ User::LeaveIfError(ParseXML(dataBufferPtr));
+ CleanupStack::PopAndDestroy(); // dataBuffer
+ }
+ else
+ {
+ User::LeaveIfError(ParseWBXML(aBuff));
+ }
+}
+
+
+
+// -----------------------------------------------------------------------------
+// CXMLReader::ParseXML
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CXMLReader::ParseXML(const TDesC& aBuff)
+{
+ NW_Status_t status;
+ struct NW_XML_Parser_EventCallbacks_s cb;
+ struct NW_XML_Reader_s reader;
+
+ Mem::FillZ(&cb, sizeof(NW_XML_Parser_EventCallbacks_s));
+
+ // cXML callbacks
+ cb.StartDocument_CB = StartDocumentCB;
+ cb.EndDocument_CB = EndDocumentCB;
+ cb.Tag_Start_CB = BeginElementCB;
+ cb.Attr_Start_CB = AttributeStartCB;
+ cb.Attr_VarVal_CB = AttributeValueCB;
+ cb.Attributes_End_CB = AttributesEndCB;
+ cb.Tag_End_CB = EndElementCB;
+ cb.Content_CB = ContentCB;
+ cb.Cdata_CB = CdataCB;
+ cb.Comment_CB = CommentCB;
+ cb.PiForm_CB = PiCB;
+ cb.pClientPointer = (void*)iParserObserver;
+ cb.Entity_CB = EntityCB;
+ cb.Attr_Entity_VarVal_CB = AttrEntityVarValCB;
+
+ // Remove whitespace from beginning
+ TInt start(aBuff.Locate('<'));
+
+ if (start == -1)
+ {
+ return KErrParseFailed;
+ }
+
+ status = NW_XML_Reader_InitFromBuffer(&reader, aBuff.Right(aBuff.Length()-start).Size(),
+ (unsigned char*)aBuff.Right(aBuff.Length()-start).Ptr());
+ NW_XML_Reader_SetEncoding(&reader, HTTP_iso_10646_ucs_2);
+
+ // parse it!
+ status = NW_XML_Parse(&reader, &cb);
+
+ ASSERT(!(reader.length % 2));
+ TPtrC16 wChar((const TUint16*)reader.pBuf, reader.length / 2);
+ MXMLContentHandler* aContentHandler = iParserObserver->GetContentHandler();
+ aContentHandler->DataBuffer(wChar);
+
+
+ if (!NW_STAT_IS_SUCCESS(status))
+ {
+ return KErrParseFailed;
+ }
+ return KErrNone;
+}
+
+// -----------------------------------------------------------------------------
+// CXMLReader::ParseWBXML
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CXMLReader::ParseWBXML(const TDesC8& aBuff)
+{
+ // WBXML CallBacks
+ struct NW_WBXML_EventHandler_s binaryCB;
+
+ Mem::FillZ(&binaryCB, sizeof(NW_WBXML_EventHandler_s));
+
+ // State change events
+ binaryCB.StartDocument_CB = Binary_StartDocument_CB;
+ binaryCB.EndDocument_CB = Binary_EndDocument_CB;
+ binaryCB.Pi_CB = Binary_Pi_CB;
+ binaryCB.Pi_End_CB = Binary_Pi_End_CB;
+ binaryCB.Tag_Start_CB = Binary_Tag_Start_CB;
+ binaryCB.Tag_End_CB = Binary_Tag_End_CB;
+ binaryCB.Attr_Start_CB = Binary_Attr_Start_CB;
+ binaryCB.Attr_Val_CB = Binary_Attr_Val_CB;
+ binaryCB.Content_CB = Binary_Content_CB;
+ binaryCB.CodePage_CB = Binary_CodePage_CB;
+ binaryCB.Extension_CB = Binary_Extension_CB;
+ // Handle data types
+ binaryCB.Token_CB = Binary_Token_CB;
+ binaryCB.FQToken_CB = Binary_FQToken_CB;
+ binaryCB.InlineString_CB = Binary_InlineString_CB;
+ binaryCB.TableString_CB = Binary_TableString_CB;
+ binaryCB.Binary_CB = Binary_Binary_CB;
+ binaryCB.Opaque_CB = Binary_Opaque_CB;
+ binaryCB.Entity_CB = Binary_Entity_CB;
+ // For parse errors
+ binaryCB.Exception_CB = Binary_Exception_CB;
+
+ // init dictionarys
+ NW_WBXML_Dictionary_t *dictionaries[DICTIONARY_COUNT];
+ dictionaries[0] = (NW_WBXML_Dictionary_t *)&NW_SyncML_1_0_WBXMLDictionary;
+ dictionaries[1] = (NW_WBXML_Dictionary_t *)&NW_Wml_1_0_WBXMLDictionary;
+ dictionaries[2] = (NW_WBXML_Dictionary_t *)&NW_Wml_1_1_WBXMLDictionary;
+ dictionaries[3] = (NW_WBXML_Dictionary_t *)&NW_Wml_1_2_WBXMLDictionary;
+ dictionaries[4] = (NW_WBXML_Dictionary_t *)&NW_Wml_1_3_WBXMLDictionary;
+ dictionaries[5] = (NW_WBXML_Dictionary_t *)&NW_XHTML_WBXMLDictionary;
+ dictionaries[6] = (NW_WBXML_Dictionary_t *)&NW_SL_WBXMLDictionary;
+// dictionaries[7] = (NW_WBXML_Dictionary_t *)&SL_dictionary;
+// dictionaries[8] = (NW_WBXML_Dictionary_t *)&NW_wap_prov_doc_WBXMLDictionary;
+// dictionaries[9] = (NW_WBXML_Dictionary_t *)&push_nokprov_dictionary;
+
+ if ((NW_WBXML_Dictionary_initialize (DICTIONARY_COUNT, dictionaries)) != NW_STAT_SUCCESS)
+ {
+ return KErrDictionaryInitFailed;
+ }
+
+ NW_Status_t status;
+
+ // create parser
+ NW_WBXML_Parser_t *parser = (NW_WBXML_Parser_t*)User::Alloc(sizeof(NW_WBXML_Parser_t));
+ if(parser == NULL)
+ {
+ NW_WBXML_Dictionary_destroy();
+ return KErrParseFailed;
+ }
+ NW_WBXML_Parser_newInPlace(parser);
+
+ // create document
+ NW_WBXML_Document_t *doc = (NW_WBXML_Document_t*)User::Alloc(sizeof(NW_WBXML_Document_t));
+ if(doc == NULL)
+ {
+ NW_WBXML_Dictionary_destroy();
+ User::Free(parser);
+ parser = NULL;
+ return KErrParseFailed;
+ }
+ status = NW_WBXML_Document_construct(doc, SL_1_0_PUBLIC_ID);
+ if(status != NW_STAT_SUCCESS)
+ {
+ NW_WBXML_Dictionary_destroy();
+ User::Free(parser);
+ parser = NULL;
+ User::Free(doc);
+ doc = NULL;
+ return KErrParseFailed;
+ }
+
+
+ status =NW_WBXML_Parser_registerHandler(parser, &binaryCB, (void*)iParserObserver);
+
+
+ if (status == NW_STAT_SUCCESS)
+ {
+ status = NW_WBXML_Parser_parseBuffer(parser, doc, (NW_Byte*)aBuff.Ptr(), (NW_Uint32)aBuff.Length());
+ }
+
+ NW_WBXML_Dictionary_destroy();
+
+ User::Free(parser);
+ parser = NULL;
+ NW_WBXML_Document_destruct(doc);
+ User::Free(doc);
+ doc = NULL;
+ if(status != NW_STAT_SUCCESS)
+ {
+ return KErrParseFailed;
+ }
+ return KErrNone;
+}
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/src/RXMLReader.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,135 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+
+
+// INCLUDE FILES
+#include <xml/RXMLReader.h>
+#include "CXMLReader.h"
+
+
+
+// requirement for E32 DLLs
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+// -----------------------------------------------------------------------------
+// RXMLReader::CreateL()
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RXMLReader::CreateL()
+ {
+ iImplementation = CXMLReader::NewL();
+ }
+
+
+
+// -----------------------------------------------------------------------------
+// RXMLReader::Destroy()
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RXMLReader::Destroy()
+ {
+ if(iImplementation)
+ {
+ delete iImplementation;
+ iImplementation=NULL;
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// RXMLReader::Destroy()
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RXMLReader::Close()
+ {
+ Destroy();
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLReader::SetFeature
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RXMLReader::SetFeature(TXMLFeature aFeature, TBool aStatus)
+ {
+ return iImplementation->SetFeature(aFeature, aStatus);
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLReader::GetFeature
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RXMLReader::GetFeature(TXMLFeature aFeature, TBool& aStatus)
+ {
+ return iImplementation->GetFeature(aFeature, aStatus);
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLReader::SetContentHandler
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RXMLReader::SetContentHandler(MXMLContentHandler* aParserObserver)
+ {
+ return iImplementation->SetContentHandler(aParserObserver);
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLReader::SetContentHandler
+// Set binary XML content handler
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RXMLReader::SetContentHandler(MWBXMLContentHandler* aParserObserver)
+ {
+ return iImplementation->SetContentHandler(aParserObserver);
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLReader::Parse
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RXMLReader::ParseL(RFs &aRFs, const TDesC& aFileToParse)
+ {
+ iImplementation->ParseL(aRFs, aFileToParse);
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLReader::Parse
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RXMLReader::ParseL(const TDesC8& aBuff)
+ {
+ iImplementation->ParseL(aBuff);
+ }
+
+// -----------------------------------------------------------------------------
+// CXMLReader::Parse
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RXMLReader::ParseL(RFile& aOpenedFile)
+ {
+ iImplementation->ParseL(aOpenedFile);
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/src/sl_dict.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,198 @@
+/*
+* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/*
+** WARNING
+**
+** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED
+** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM
+**
+** This file generated on Tue Sep 30 14:30:25 2003
+** (coordinated universal time)
+**
+** Command line: dict_creator sl.dict sl_dict.c sl_dict.h
+*/
+
+/*
+ * Dictionary = SL
+ * Public id = 6
+ * Doc Type = -//WAPFORUM//DTD SL 1.0//EN
+ */
+
+#include "sl_dict.h"
+
+
+static const NW_Ucs2 NW_SL_ElementTag_sl[] = {'s','l','\0'};
+
+/*
+** WARNING
+**
+** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED
+** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM
+**
+** This file generated on Tue Sep 30 14:30:25 2003
+** (coordinated universal time)
+**
+** Command line: dict_creator sl.dict sl_dict.c sl_dict.h
+*/
+
+/*
+ * tag entries - sorted by token
+ */
+static const
+NW_WBXML_DictEntry_t NW_SL_tag_token_0[1] = {
+ {0x05, (NW_String_UCS2Buff_t *) NW_SL_ElementTag_sl}
+};
+
+/*
+** WARNING
+**
+** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED
+** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM
+**
+** This file generated on Tue Sep 30 14:30:25 2003
+** (coordinated universal time)
+**
+** Command line: dict_creator sl.dict sl_dict.c sl_dict.h
+*/
+
+/*
+ * tag entries - sorted by name
+ */
+static const
+NW_Byte NW_SL_tag_name_0[1] = {
+ 0,
+};
+
+static const NW_Ucs2 NW_SL_AttributeTag_action_execute_low[] = {'a','c','t','i','o','n','=','e','x','e','c','u','t','e','-','l','o','w','\0'};
+static const NW_Ucs2 NW_SL_AttributeTag_action_execute_high[] = {'a','c','t','i','o','n','=','e','x','e','c','u','t','e','-','h','i','g','h','\0'};
+static const NW_Ucs2 NW_SL_AttributeTag_action_cache[] = {'a','c','t','i','o','n','=','c','a','c','h','e','\0'};
+static const NW_Ucs2 NW_SL_AttributeTag_href[] = {'h','r','e','f','\0'};
+static const NW_Ucs2 NW_SL_AttributeTag_href_http___[] = {'h','r','e','f','=','h','t','t','p',':','/','/','\0'};
+static const NW_Ucs2 NW_SL_AttributeTag_href_http___www_[] = {'h','r','e','f','=','h','t','t','p',':','/','/','w','w','w','.','\0'};
+static const NW_Ucs2 NW_SL_AttributeTag_href_https___[] = {'h','r','e','f','=','h','t','t','p','s',':','/','/','\0'};
+static const NW_Ucs2 NW_SL_AttributeTag_href_https___www_[] = {'h','r','e','f','=','h','t','t','p','s',':','/','/','w','w','w','.','\0'};
+static const NW_Ucs2 NW_SL_AttributeTag_action[] = {'a','c','t','i','o','n','\0'};
+static const NW_Ucs2 NW_SL_AttributeTag__com_[] = {'.','c','o','m','/','\0'};
+static const NW_Ucs2 NW_SL_AttributeTag__edu_[] = {'.','e','d','u','/','\0'};
+static const NW_Ucs2 NW_SL_AttributeTag__net_[] = {'.','n','e','t','/','\0'};
+static const NW_Ucs2 NW_SL_AttributeTag__org_[] = {'.','o','r','g','/','\0'};
+
+/*
+** WARNING
+**
+** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED
+** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM
+**
+** This file generated on Tue Sep 30 14:30:25 2003
+** (coordinated universal time)
+**
+** Command line: dict_creator sl.dict sl_dict.c sl_dict.h
+*/
+
+/*
+ * attribute entries - sorted by token
+ */
+static const
+NW_WBXML_DictEntry_t NW_SL_attribute_token_0[13] = {
+ {0x05, (NW_String_UCS2Buff_t *) NW_SL_AttributeTag_action_execute_low},
+ {0x06, (NW_String_UCS2Buff_t *) NW_SL_AttributeTag_action_execute_high},
+ {0x07, (NW_String_UCS2Buff_t *) NW_SL_AttributeTag_action_cache},
+ {0x08, (NW_String_UCS2Buff_t *) NW_SL_AttributeTag_href},
+ {0x09, (NW_String_UCS2Buff_t *) NW_SL_AttributeTag_href_http___},
+ {0x0a, (NW_String_UCS2Buff_t *) NW_SL_AttributeTag_href_http___www_},
+ {0x0b, (NW_String_UCS2Buff_t *) NW_SL_AttributeTag_href_https___},
+ {0x0c, (NW_String_UCS2Buff_t *) NW_SL_AttributeTag_href_https___www_},
+ {0x0d, (NW_String_UCS2Buff_t *) NW_SL_AttributeTag_action},
+ {0x85, (NW_String_UCS2Buff_t *) NW_SL_AttributeTag__com_},
+ {0x86, (NW_String_UCS2Buff_t *) NW_SL_AttributeTag__edu_},
+ {0x87, (NW_String_UCS2Buff_t *) NW_SL_AttributeTag__net_},
+ {0x88, (NW_String_UCS2Buff_t *) NW_SL_AttributeTag__org_}
+};
+
+/*
+** WARNING
+**
+** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED
+** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM
+**
+** This file generated on Tue Sep 30 14:30:25 2003
+** (coordinated universal time)
+**
+** Command line: dict_creator sl.dict sl_dict.c sl_dict.h
+*/
+
+/*
+ * attribute entries - sorted by name
+ */
+static const
+NW_Byte NW_SL_attribute_name_0[13] = {
+ 9,
+ 10,
+ 11,
+ 12,
+ 8,
+ 2,
+ 1,
+ 0,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+};
+
+/*
+ * Tag codepage table
+ */
+static const
+NW_WBXML_Codepage_t NW_SL_tag_codepages[1] = {
+ {1, (NW_WBXML_DictEntry_t*)&NW_SL_tag_token_0[0], (NW_Byte *)&NW_SL_tag_name_0[0]},
+};
+
+/*
+ * Attribute codepage table
+ */
+static const
+NW_WBXML_Codepage_t NW_SL_attribute_codepages[1] = {
+ {13, (NW_WBXML_DictEntry_t*)&NW_SL_attribute_token_0[0], (NW_Byte *)&NW_SL_attribute_name_0[0]},
+};
+
+static const NW_Ucs2 NW_SL_docType[] = {'-','/','/','W','A','P','F','O','R','U','M','/','/','D','T','D',' ','S','L',' ','1','.','0','/','/','E','N','\0'};
+
+/*
+ * Dictionary
+ */
+const NW_WBXML_Dictionary_t NW_SL_WBXMLDictionary = {
+ NW_SL_PublicId,
+ (NW_Ucs2 *)NW_SL_docType,
+ 1, (NW_WBXML_Codepage_t*)&NW_SL_tag_codepages[0],
+ 1, (NW_WBXML_Codepage_t*)&NW_SL_attribute_codepages[0],
+};
+
+/*
+** WARNING
+**
+** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED
+** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM
+**
+** This file generated on Tue Sep 30 14:30:25 2003
+** (coordinated universal time)
+**
+** Command line: dict_creator sl.dict sl_dict.c sl_dict.h
+*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/src/syncml_1_0_dict.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,339 @@
+/*
+* Copyright (c) 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/*
+** WARNING
+**
+** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED
+** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM
+**
+** This file generated on Thu Jun 7 15:00:08 2001
+** (coordinated universal time)
+**
+** Command line: dict_creator syncml_1.0.dict syncml_1_0_dict.c syncml_1_0_dict.h
+*/
+
+/*
+ * Dictionary = SyncML_1_0
+ * Public id = 0x0FD1
+ * Doc Type = -//SYNCML//DTD SyncML v1.0//EN
+ */
+
+#include <xml/cxml/nw_wbxml_dictionary.h>
+
+
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Add[] = {'A','d','d','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Alert[] = {'A','l','e','r','t','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Archive[] = {'A','r','c','h','i','v','e','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Atomic[] = {'A','t','o','m','i','c','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Chal[] = {'C','h','a','l','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Cmd[] = {'C','m','d','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_CmdID[] = {'C','m','d','I','D','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_CmdRef[] = {'C','m','d','R','e','f','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Copy[] = {'C','o','p','y','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Cred[] = {'C','r','e','d','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Data[] = {'D','a','t','a','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Delete[] = {'D','e','l','e','t','e','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Exec[] = {'E','x','e','c','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Final[] = {'F','i','n','a','l','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Get[] = {'G','e','t','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Item[] = {'I','t','e','m','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Lang[] = {'L','a','n','g','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_LocName[] = {'L','o','c','N','a','m','e','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_LocURI[] = {'L','o','c','U','R','I','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Map[] = {'M','a','p','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_MapItem[] = {'M','a','p','I','t','e','m','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Meta[] = {'M','e','t','a','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_MsgID[] = {'M','s','g','I','D','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_MsgRef[] = {'M','s','g','R','e','f','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_NoResp[] = {'N','o','R','e','s','p','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_NoResults[] = {'N','o','R','e','s','u','l','t','s','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Put[] = {'P','u','t','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Replace[] = {'R','e','p','l','a','c','e','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_RespURI[] = {'R','e','s','p','U','R','I','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Results[] = {'R','e','s','u','l','t','s','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Search[] = {'S','e','a','r','c','h','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Sequence[] = {'S','e','q','u','e','n','c','e','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_SessionID[] = {'S','e','s','s','i','o','n','I','D','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_SftDel[] = {'S','f','t','D','e','l','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Source[] = {'S','o','u','r','c','e','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_SourceRef[] = {'S','o','u','r','c','e','R','e','f','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Status[] = {'S','t','a','t','u','s','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Sync[] = {'S','y','n','c','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_SyncBody[] = {'S','y','n','c','B','o','d','y','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_SyncHdr[] = {'S','y','n','c','H','d','r','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_SyncML[] = {'S','y','n','c','M','L','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Target[] = {'T','a','r','g','e','t','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_TargetRef[] = {'T','a','r','g','e','t','R','e','f','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Reserved[] = {'R','e','s','e','r','v','e','d','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_VerDTD[] = {'V','e','r','D','T','D','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_VerProto[] = {'V','e','r','P','r','o','t','o','\0'};
+
+/*
+** WARNING
+**
+** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED
+** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM
+**
+** This file generated on Thu Jun 7 15:00:08 2001
+** (coordinated universal time)
+**
+** Command line: dict_creator syncml_1.0.dict syncml_1_0_dict.c syncml_1_0_dict.h
+*/
+
+/*
+ * tag entries - sorted by token
+ */
+static const
+NW_WBXML_DictEntry_t NW_SyncML_1_0_tag_token_0[46] = {
+ {0x05, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Add},
+ {0x06, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Alert},
+ {0x07, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Archive},
+ {0x08, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Atomic},
+ {0x09, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Chal},
+ {0x0a, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Cmd},
+ {0x0b, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_CmdID},
+ {0x0c, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_CmdRef},
+ {0x0d, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Copy},
+ {0x0e, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Cred},
+ {0x0f, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Data},
+ {0x10, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Delete},
+ {0x11, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Exec},
+ {0x12, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Final},
+ {0x13, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Get},
+ {0x14, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Item},
+ {0x15, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Lang},
+ {0x16, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_LocName},
+ {0x17, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_LocURI},
+ {0x18, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Map},
+ {0x19, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_MapItem},
+ {0x1a, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Meta},
+ {0x1b, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_MsgID},
+ {0x1c, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_MsgRef},
+ {0x1d, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_NoResp},
+ {0x1e, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_NoResults},
+ {0x1f, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Put},
+ {0x20, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Replace},
+ {0x21, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_RespURI},
+ {0x22, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Results},
+ {0x23, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Search},
+ {0x24, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Sequence},
+ {0x25, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_SessionID},
+ {0x26, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_SftDel},
+ {0x27, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Source},
+ {0x28, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_SourceRef},
+ {0x29, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Status},
+ {0x2a, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Sync},
+ {0x2b, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_SyncBody},
+ {0x2c, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_SyncHdr},
+ {0x2d, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_SyncML},
+ {0x2e, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Target},
+ {0x2f, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_TargetRef},
+ {0x30, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Reserved},
+ {0x31, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_VerDTD},
+ {0x32, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_VerProto}
+};
+
+/*
+** WARNING
+**
+** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED
+** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM
+**
+** This file generated on Thu Jun 7 15:00:08 2001
+** (coordinated universal time)
+**
+** Command line: dict_creator syncml_1.0.dict syncml_1_0_dict.c syncml_1_0_dict.h
+*/
+
+/*
+ * tag entries - sorted by name
+ */
+static const
+NW_Byte NW_SyncML_1_0_tag_name_0[46] = {
+ 0,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26,
+ 27,
+ 43,
+ 28,
+ 29,
+ 30,
+ 31,
+ 32,
+ 33,
+ 34,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 44,
+ 45,
+};
+
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Anchor[] = {'A','n','c','h','o','r','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_EMI[] = {'E','M','I','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Format[] = {'F','o','r','m','a','t','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_FreeID[] = {'F','r','e','e','I','D','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_FreeMem[] = {'F','r','e','e','M','e','m','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Last[] = {'L','a','s','t','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Mark[] = {'M','a','r','k','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_MaxMsgSize[] = {'M','a','x','M','s','g','S','i','z','e','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Mem[] = {'M','e','m','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_MetInf[] = {'M','e','t','I','n','f','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Next[] = {'N','e','x','t','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_NextNonce[] = {'N','e','x','t','N','o','n','c','e','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_SharedMem[] = {'S','h','a','r','e','d','M','e','m','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Size[] = {'S','i','z','e','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Type[] = {'T','y','p','e','\0'};
+static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Version[] = {'V','e','r','s','i','o','n','\0'};
+
+/*
+** WARNING
+**
+** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED
+** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM
+**
+** This file generated on Thu Jun 7 15:00:08 2001
+** (coordinated universal time)
+**
+** Command line: dict_creator syncml_1.0.dict syncml_1_0_dict.c syncml_1_0_dict.h
+*/
+
+/*
+ * tag entries - sorted by token
+ */
+static const
+NW_WBXML_DictEntry_t NW_SyncML_1_0_tag_token_1[16] = {
+ {0x05, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Anchor},
+ {0x06, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_EMI},
+ {0x07, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Format},
+ {0x08, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_FreeID},
+ {0x09, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_FreeMem},
+ {0x0a, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Last},
+ {0x0b, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Mark},
+ {0x0c, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_MaxMsgSize},
+ {0x0d, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Mem},
+ {0x0e, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_MetInf},
+ {0x0f, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Next},
+ {0x10, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_NextNonce},
+ {0x11, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_SharedMem},
+ {0x12, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Size},
+ {0x13, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Type},
+ {0x14, (NW_String_UCS2Buff_t *) NW_SyncML_1_0_ElementTag_Version}
+};
+
+/*
+** WARNING
+**
+** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED
+** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM
+**
+** This file generated on Thu Jun 7 15:00:08 2001
+** (coordinated universal time)
+**
+** Command line: dict_creator syncml_1.0.dict syncml_1_0_dict.c syncml_1_0_dict.h
+*/
+
+/*
+ * tag entries - sorted by name
+ */
+static const
+NW_Byte NW_SyncML_1_0_tag_name_1[16] = {
+ 0,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+};
+
+/*
+ * Tag codepage table
+ */
+static const
+NW_WBXML_Codepage_t NW_SyncML_1_0_tag_codepages[2] = {
+ {46, (NW_WBXML_DictEntry_t*)&NW_SyncML_1_0_tag_token_0[0], (NW_Byte *)&NW_SyncML_1_0_tag_name_0[0]},
+ {16, (NW_WBXML_DictEntry_t*)&NW_SyncML_1_0_tag_token_1[0], (NW_Byte *)&NW_SyncML_1_0_tag_name_1[0]},
+};
+
+/*
+ * Attribute codepage table
+ */
+
+static const NW_Ucs2 NW_SyncML_1_0_docType[] = {'-','/','/','S','Y','N','C','M','L','/','/','D','T','D',' ','S','y','n','c','M','L',' ','v','1','.','0','/','/','E','N','\0'};
+
+/*
+ * Dictionary
+ */
+const NW_WBXML_Dictionary_t NW_SyncML_1_0_WBXMLDictionary = {
+ 0x0FD1,
+ (NW_Ucs2 *)NW_SyncML_1_0_docType,
+ 2, (NW_WBXML_Codepage_t*)&NW_SyncML_1_0_tag_codepages[0],
+ 0, 0,
+};
+
+/*
+** WARNING
+**
+** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED
+** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM
+**
+** This file generated on Thu Jun 7 15:00:08 2001
+** (coordinated universal time)
+**
+** Command line: dict_creator syncml_1.0.dict syncml_1_0_dict.c syncml_1_0_dict.h
+*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/src/wml_1_1_dict.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,613 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/*
+** This file is not generated by the dictionary creator. If you need any help
+** to edit this file please see Shaun Keller/Frank Rchichi/Ramesh Bapanapalli.
+*/
+
+#include "nw_wml1x_wml_1_3_tokens.h"
+#include <xml/cxml/nw_wbxml_dictionary.h>
+
+
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_pre[] = {'p','r','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_a[] = {'a','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_td[] = {'t','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_tr[] = {'t','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_table[] = {'t','a','b','l','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_p[] = {'p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_postfield[] = {'p','o','s','t','f','i','e','l','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_anchor[] = {'a','n','c','h','o','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_access[] = {'a','c','c','e','s','s','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_b[] = {'b','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_big[] = {'b','i','g','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_br[] = {'b','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_card[] = {'c','a','r','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_do[] = {'d','o','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_em[] = {'e','m','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_fieldset[] = {'f','i','e','l','d','s','e','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_go[] = {'g','o','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_head[] = {'h','e','a','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_i[] = {'i','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_img[] = {'i','m','g','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_input[] = {'i','n','p','u','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_meta[] = {'m','e','t','a','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_noop[] = {'n','o','o','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_prev[] = {'p','r','e','v','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_onevent[] = {'o','n','e','v','e','n','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_optgroup[] = {'o','p','t','g','r','o','u','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_option[] = {'o','p','t','i','o','n','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_refresh[] = {'r','e','f','r','e','s','h','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_select[] = {'s','e','l','e','c','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_small[] = {'s','m','a','l','l','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_strong[] = {'s','t','r','o','n','g','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_template[] = {'t','e','m','p','l','a','t','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_timer[] = {'t','i','m','e','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_u[] = {'u','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_setvar[] = {'s','e','t','v','a','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_wml[] = {'w','m','l','\0'};
+
+/*
+ * tag entries - sorted by token
+ */
+static const
+NW_WBXML_DictEntry_t NW_Wml_1_3_tag_token_0[36] = {
+ {0x1b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_pre},
+ {0x1c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_a},
+ {0x1d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_td},
+ {0x1e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_tr},
+ {0x1f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_table},
+ {0x20, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_p},
+ {0x21, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_postfield},
+ {0x22, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_anchor},
+ {0x23, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_access},
+ {0x24, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_b},
+ {0x25, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_big},
+ {0x26, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_br},
+ {0x27, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_card},
+ {0x28, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_do},
+ {0x29, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_em},
+ {0x2a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_fieldset},
+ {0x2b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_go},
+ {0x2c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_head},
+ {0x2d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_i},
+ {0x2e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_img},
+ {0x2f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_input},
+ {0x30, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_meta},
+ {0x31, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_noop},
+ {0x32, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_prev},
+ {0x33, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_onevent},
+ {0x34, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_optgroup},
+ {0x35, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_option},
+ {0x36, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_refresh},
+ {0x37, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_select},
+ {0x38, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_small},
+ {0x39, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_strong},
+ {0x3b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_template},
+ {0x3c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_timer},
+ {0x3d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_u},
+ {0x3e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_setvar},
+ {0x3f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_wml}
+};
+
+/*
+ * tag entries - sorted by name
+ */
+static const
+NW_Byte NW_Wml_1_3_tag_name_0[36] = {
+ 1,
+ 8,
+ 7,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 24,
+ 25,
+ 26,
+ 5,
+ 6,
+ 0,
+ 23,
+ 27,
+ 28,
+ 34,
+ 29,
+ 30,
+ 4,
+ 2,
+ 31,
+ 32,
+ 3,
+ 33,
+ 35,
+};
+
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_zzzunknown[] = {'z','z','z','u','n','k','n','o','w','n','\0'};
+
+/*
+ * tag entries - sorted by token
+ */
+static const
+NW_WBXML_DictEntry_t NW_Wml_1_3_tag_token_1[1] = {
+ {0x18, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_zzzunknown}
+};
+
+/*
+ * tag entries - sorted by name
+ */
+static const
+NW_Byte NW_Wml_1_3_tag_name_1[1] = {
+ 0,
+};
+
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_accept_charset[] = {'a','c','c','e','p','t','-','c','h','a','r','s','e','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align_bottom[] = {'a','l','i','g','n','=','b','o','t','t','o','m','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align_center[] = {'a','l','i','g','n','=','c','e','n','t','e','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align_left[] = {'a','l','i','g','n','=','l','e','f','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align_middle[] = {'a','l','i','g','n','=','m','i','d','d','l','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align_right[] = {'a','l','i','g','n','=','r','i','g','h','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align_top[] = {'a','l','i','g','n','=','t','o','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_alt[] = {'a','l','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_content[] = {'c','o','n','t','e','n','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_domain[] = {'d','o','m','a','i','n','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_emptyok_false[] = {'e','m','p','t','y','o','k','=','f','a','l','s','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_emptyok_true[] = {'e','m','p','t','y','o','k','=','t','r','u','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_format[] = {'f','o','r','m','a','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_height[] = {'h','e','i','g','h','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_hspace[] = {'h','s','p','a','c','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_ivalue[] = {'i','v','a','l','u','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_iname[] = {'i','n','a','m','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_label[] = {'l','a','b','e','l','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_localsrc[] = {'l','o','c','a','l','s','r','c','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_maxlength[] = {'m','a','x','l','e','n','g','t','h','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_method_get[] = {'m','e','t','h','o','d','=','g','e','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_method_post[] = {'m','e','t','h','o','d','=','p','o','s','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_mode_nowrap[] = {'m','o','d','e','=','n','o','w','r','a','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_mode_wrap[] = {'m','o','d','e','=','w','r','a','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_multiple_false[] = {'m','u','l','t','i','p','l','e','=','f','a','l','s','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_multiple_true[] = {'m','u','l','t','i','p','l','e','=','t','r','u','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_name[] = {'n','a','m','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_newcontext_false[] = {'n','e','w','c','o','n','t','e','x','t','=','f','a','l','s','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_newcontext_true[] = {'n','e','w','c','o','n','t','e','x','t','=','t','r','u','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_onpick[] = {'o','n','p','i','c','k','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_onenterbackward[] = {'o','n','e','n','t','e','r','b','a','c','k','w','a','r','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_onenterforward[] = {'o','n','e','n','t','e','r','f','o','r','w','a','r','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_ontimer[] = {'o','n','t','i','m','e','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_optional_false[] = {'o','p','t','i','o','n','a','l','=','f','a','l','s','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_optional_true[] = {'o','p','t','i','o','n','a','l','=','t','r','u','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_path[] = {'p','a','t','h','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_scheme[] = {'s','c','h','e','m','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_sendreferer_false[] = {'s','e','n','d','r','e','f','e','r','e','r','=','f','a','l','s','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_sendreferer_true[] = {'s','e','n','d','r','e','f','e','r','e','r','=','t','r','u','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_size[] = {'s','i','z','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_src[] = {'s','r','c','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_ordered_true[] = {'o','r','d','e','r','e','d','=','t','r','u','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_ordered_false[] = {'o','r','d','e','r','e','d','=','f','a','l','s','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_tabindex[] = {'t','a','b','i','n','d','e','x','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_title[] = {'t','i','t','l','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type[] = {'t','y','p','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_accept[] = {'t','y','p','e','=','a','c','c','e','p','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_delete[] = {'t','y','p','e','=','d','e','l','e','t','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_help[] = {'t','y','p','e','=','h','e','l','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_password[] = {'t','y','p','e','=','p','a','s','s','w','o','r','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_onpick[] = {'t','y','p','e','=','o','n','p','i','c','k','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_onenterbackward[] = {'t','y','p','e','=','o','n','e','n','t','e','r','b','a','c','k','w','a','r','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_onenterforward[] = {'t','y','p','e','=','o','n','e','n','t','e','r','f','o','r','w','a','r','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_ontimer[] = {'t','y','p','e','=','o','n','t','i','m','e','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_zzzunknown[] = {'z','z','z','u','n','k','n','o','w','n','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_options[] = {'t','y','p','e','=','o','p','t','i','o','n','s','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_prev[] = {'t','y','p','e','=','p','r','e','v','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_reset[] = {'t','y','p','e','=','r','e','s','e','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_text[] = {'t','y','p','e','=','t','e','x','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_vnd_[] = {'t','y','p','e','=','v','n','d','.','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_href[] = {'h','r','e','f','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_href_http___[] = {'h','r','e','f','=','h','t','t','p',':','/','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_href_https___[] = {'h','r','e','f','=','h','t','t','p','s',':','/','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_value[] = {'v','a','l','u','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_vspace[] = {'v','s','p','a','c','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_width[] = {'w','i','d','t','h','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_xml_lang[] = {'x','m','l',':','l','a','n','g','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align[] = {'a','l','i','g','n','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_columns[] = {'c','o','l','u','m','n','s','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_class[] = {'c','l','a','s','s','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_id[] = {'i','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_forua_false[] = {'f','o','r','u','a','=','f','a','l','s','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_forua_true[] = {'f','o','r','u','a','=','t','r','u','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_src_http___[] = {'s','r','c','=','h','t','t','p',':','/','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_src_https___[] = {'s','r','c','=','h','t','t','p','s',':','/','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_http_equiv[] = {'h','t','t','p','-','e','q','u','i','v','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_http_equiv_Content_Type[] = {'h','t','t','p','-','e','q','u','i','v','=','C','o','n','t','e','n','t','-','T','y','p','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_content_application_vnd_wap_wmlc_charset_[] = {'c','o','n','t','e','n','t','=','a','p','p','l','i','c','a','t','i','o','n','/','v','n','d','.','w','a','p','.','w','m','l','c',';','c','h','a','r','s','e','t','=','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_http_equiv_Expires[] = {'h','t','t','p','-','e','q','u','i','v','=','E','x','p','i','r','e','s','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_accesskey[] = {'a','c','c','e','s','s','k','e','y','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_enctype[] = {'e','n','c','t','y','p','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_enctype_application_x_www_form_urlencoded[] = {'e','n','c','t','y','p','e','=','a','p','p','l','i','c','a','t','i','o','n','/','x','-','w','w','w','-','f','o','r','m','-','u','r','l','e','n','c','o','d','e','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_enctype_multipart_form_data[] = {'e','n','c','t','y','p','e','=','m','u','l','t','i','p','a','r','t','/','f','o','r','m','-','d','a','t','a','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_xml_space_preserve[] = {'x','m','l',':','s','p','a','c','e','=','p','r','e','s','e','r','v','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_xml_space_default[] = {'x','m','l',':','s','p','a','c','e','=','d','e','f','a','u','l','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_cache_control_no_cache[] = {'c','a','c','h','e','-','c','o','n','t','r','o','l','=','n','o','-','c','a','c','h','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_cache_control[] = {'c','a','c','h','e','-','c','o','n','t','r','o','l','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_emptyok[] = {'e','m','p','t','y','o','k','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_forua[] = {'f','o','r','u','a','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_method[] = {'m','e','t','h','o','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_mode[] = {'m','o','d','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_multiple[] = {'m','u','l','t','i','p','l','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_optional[] = {'o','p','t','i','o','n','a','l','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_newcontext[] = {'n','e','w','c','o','n','t','e','x','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_ordered[] = {'o','r','d','e','r','e','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_sendreferer[] = {'s','e','n','d','r','e','f','e','r','e','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_xml_space[] = {'x','m','l',':','s','p','a','c','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag__com_[] = {'.','c','o','m','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag__edu_[] = {'.','e','d','u','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag__net_[] = {'.','n','e','t','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag__org_[] = {'.','o','r','g','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_accept[] = {'a','c','c','e','p','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_bottom[] = {'b','o','t','t','o','m','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_clear[] = {'c','l','e','a','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_delete[] = {'d','e','l','e','t','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_help[] = {'h','e','l','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_http___[] = {'h','t','t','p',':','/','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_http___www_[] = {'h','t','t','p',':','/','/','w','w','w','.','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_https___[] = {'h','t','t','p','s',':','/','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_https___www_[] = {'h','t','t','p','s',':','/','/','w','w','w','.','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_middle[] = {'m','i','d','d','l','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_nowrap[] = {'n','o','w','r','a','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_options[] = {'o','p','t','i','o','n','s','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_password[] = {'p','a','s','s','w','o','r','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_reset[] = {'r','e','s','e','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_text[] = {'t','e','x','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_top[] = {'t','o','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_unknown[] = {'u','n','k','n','o','w','n','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_www_[] = {'w','w','w','.','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_wrap[] = {'w','r','a','p','\0'};
+
+/*
+** The following 4 definisions are to handle duplicated tag names.
+** This duplication is due to having the same "tag name" for attribute name and value.
+*/
+
+#define NW_Wml_1_3_AttributeValueTag_onpick NW_Wml_1_3_AttributeTag_onpick
+#define NW_Wml_1_3_AttributeValueTag_onenterbackward NW_Wml_1_3_AttributeTag_onenterbackward
+#define NW_Wml_1_3_AttributeValueTag_onenterforward NW_Wml_1_3_AttributeTag_onenterforward
+#define NW_Wml_1_3_AttributeValueTag_ontimer NW_Wml_1_3_AttributeTag_ontimer
+
+/*
+ * attribute entries - sorted by token
+ */
+static const
+NW_WBXML_DictEntry_t NW_Wml_1_3_attribute_token_0[124] = {
+ {0x05, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_accept_charset},
+ {0x06, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align_bottom},
+ {0x07, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align_center},
+ {0x08, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align_left},
+ {0x09, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align_middle},
+ {0x0a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align_right},
+ {0x0b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align_top},
+ {0x0c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_alt},
+ {0x0d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_content},
+ {0x0f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_domain},
+ {0x10, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_emptyok_false},
+ {0x11, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_emptyok_true},
+ {0x12, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_format},
+ {0x13, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_height},
+ {0x14, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_hspace},
+ {0x15, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_ivalue},
+ {0x16, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_iname},
+ {0x18, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_label},
+ {0x19, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_localsrc},
+ {0x1a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_maxlength},
+ {0x1b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_method_get},
+ {0x1c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_method_post},
+ {0x1d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_mode_nowrap},
+ {0x1e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_mode_wrap},
+ {0x1f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_multiple_false},
+ {0x20, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_multiple_true},
+ {0x21, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_name},
+ {0x22, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_newcontext_false},
+ {0x23, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_newcontext_true},
+ {0x24, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_onpick},
+ {0x25, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_onenterbackward},
+ {0x26, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_onenterforward},
+ {0x27, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_ontimer},
+ {0x28, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_optional_false},
+ {0x29, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_optional_true},
+ {0x2a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_path},
+ {0x2e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_scheme},
+ {0x2f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_sendreferer_false},
+ {0x30, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_sendreferer_true},
+ {0x31, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_size},
+ {0x32, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_src},
+ {0x33, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_ordered_true},
+ {0x34, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_ordered_false},
+ {0x35, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_tabindex},
+ {0x36, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_title},
+ {0x37, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type},
+ {0x38, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_accept},
+ {0x39, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_delete},
+ {0x3a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_help},
+ {0x3b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_password},
+ {0x3c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_onpick},
+ {0x3d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_onenterbackward},
+ {0x3e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_onenterforward},
+ {0x3f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_ontimer},
+ {0x40, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_zzzunknown},
+ {0x45, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_options},
+ {0x46, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_prev},
+ {0x47, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_reset},
+ {0x48, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_text},
+ {0x49, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_vnd_},
+ {0x4a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_href},
+ {0x4b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_href_http___},
+ {0x4c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_href_https___},
+ {0x4d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_value},
+ {0x4e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_vspace},
+ {0x4f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_width},
+ {0x50, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_xml_lang},
+ {0x52, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align},
+ {0x53, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_columns},
+ {0x54, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_class},
+ {0x55, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_id},
+ {0x56, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_forua_false},
+ {0x57, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_forua_true},
+ {0x58, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_src_http___},
+ {0x59, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_src_https___},
+ {0x5a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_http_equiv},
+ {0x5b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_http_equiv_Content_Type},
+ {0x5c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_content_application_vnd_wap_wmlc_charset_},
+ {0x5d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_http_equiv_Expires},
+ {0x5e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_accesskey},
+ {0x5f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_enctype},
+ {0x60, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_enctype_application_x_www_form_urlencoded},
+ {0x61, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_enctype_multipart_form_data},
+ {0x62, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_xml_space_preserve},
+ {0x63, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_xml_space_default},
+ {0x64, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_cache_control_no_cache},
+ {0x65, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_cache_control},
+ {0x66, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_emptyok},
+ {0x67, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_forua},
+ {0x68, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_method},
+ {0x69, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_mode},
+ {0x6a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_multiple},
+ {0x6b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_optional},
+ {0x6c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_newcontext},
+ {0x6d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_ordered},
+ {0x6e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_sendreferer},
+ {0x6f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_xml_space},
+ {0x85, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag__com_},
+ {0x86, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag__edu_},
+ {0x87, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag__net_},
+ {0x88, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag__org_},
+ {0x89, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_accept},
+ {0x8a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_bottom},
+ {0x8b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_clear},
+ {0x8c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_delete},
+ {0x8d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_help},
+ {0x8e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_http___},
+ {0x8f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_http___www_},
+ {0x90, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_https___},
+ {0x91, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_https___www_},
+ {0x93, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_middle},
+ {0x94, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_nowrap},
+ {0x95, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeValueTag_onpick},
+ {0x96, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeValueTag_onenterbackward},
+ {0x97, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeValueTag_onenterforward},
+ {0x98, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeValueTag_ontimer},
+ {0x99, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_options},
+ {0x9a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_password},
+ {0x9b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_reset},
+ {0x9d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_text},
+ {0x9e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_top},
+ {0x9f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_unknown},
+ {0xa0, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_wrap},
+ {0xa1, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_www_}
+};
+
+/*
+ * attribute entries - sorted by name
+ */
+static const
+NW_Byte NW_Wml_1_3_attribute_name_0[124] = {
+ 97,
+ 98,
+ 99,
+ 100,
+ 101,
+ 0,
+ 79,
+ 67,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 102,
+ 86,
+ 85,
+ 69,
+ 103,
+ 68,
+ 8,
+ 77,
+ 104,
+ 9,
+ 87,
+ 10,
+ 11,
+ 80,
+ 81,
+ 82,
+ 12,
+ 88,
+ 71,
+ 72,
+ 13,
+ 105,
+ 60,
+ 61,
+ 62,
+ 14,
+ 75,
+ 76,
+ 78,
+ 106,
+ 107,
+ 108,
+ 109,
+ 70,
+ 16,
+ 15,
+ 17,
+ 18,
+ 19,
+ 89,
+ 20,
+ 21,
+ 110,
+ 90,
+ 22,
+ 23,
+ 91,
+ 24,
+ 25,
+ 26,
+ 93,
+ 27,
+ 28,
+ 111,
+ 30,
+ 113,
+ 31,
+ 114,
+ 29,
+ 112,
+ 32,
+ 115,
+ 92,
+ 33,
+ 34,
+ 116,
+ 94,
+ 42,
+ 41,
+ 117,
+ 35,
+ 118,
+ 36,
+ 95,
+ 37,
+ 38,
+ 39,
+ 40,
+ 73,
+ 74,
+ 43,
+ 119,
+ 44,
+ 120,
+ 45,
+ 46,
+ 47,
+ 48,
+ 51,
+ 52,
+ 50,
+ 53,
+ 55,
+ 49,
+ 56,
+ 57,
+ 58,
+ 59,
+ 121,
+ 63,
+ 64,
+ 65,
+ 122,
+ 123,
+ 66,
+ 96,
+ 84,
+ 83,
+ 54,
+};
+
+/*
+ * Tag codepage table
+ */
+static const
+NW_WBXML_Codepage_t NW_Wml_1_3_tag_codepages[2] = {
+ {36, (NW_WBXML_DictEntry_t*)&NW_Wml_1_3_tag_token_0[0], (NW_Byte *)&NW_Wml_1_3_tag_name_0[0]},
+ {1, (NW_WBXML_DictEntry_t*)&NW_Wml_1_3_tag_token_1[0], (NW_Byte *)&NW_Wml_1_3_tag_name_1[0]},
+};
+
+/*
+ * Attribute codepage table
+ */
+static const
+NW_WBXML_Codepage_t NW_Wml_1_3_attribute_codepages[1] = {
+ {124, (NW_WBXML_DictEntry_t*)&NW_Wml_1_3_attribute_token_0[0], (NW_Byte *)&NW_Wml_1_3_attribute_name_0[0]},
+};
+
+static const NW_Ucs2 NW_Wml_1_0_docType[] = {'-','/','/','W','A','P','F','O','R','U','M','/','/','D','T','D',' ','W','M','L',' ','1','.','0','/','/','E','N','\0'};
+static const NW_Ucs2 NW_Wml_1_1_docType[] = {'-','/','/','W','A','P','F','O','R','U','M','/','/','D','T','D',' ','W','M','L',' ','1','.','1','/','/','E','N','\0'};
+static const NW_Ucs2 NW_Wml_1_2_docType[] = {'-','/','/','W','A','P','F','O','R','U','M','/','/','D','T','D',' ','W','M','L',' ','1','.','2','/','/','E','N','\0'};
+static const NW_Ucs2 NW_Wml_1_3_docType[] = {'-','/','/','W','A','P','F','O','R','U','M','/','/','D','T','D',' ','W','M','L',' ','1','.','3','/','/','E','N','\0'};
+
+/*
+ * Dictionaries
+ */
+const NW_WBXML_Dictionary_t NW_Wml_1_0_WBXMLDictionary = {
+ NW_Wml_1_0_PublicId,
+ (NW_Ucs2 *)NW_Wml_1_0_docType,
+ 2, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_tag_codepages[0],
+ 1, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_attribute_codepages[0],
+};
+
+const NW_WBXML_Dictionary_t NW_Wml_1_1_WBXMLDictionary = {
+ NW_Wml_1_1_PublicId,
+ (NW_Ucs2 *)NW_Wml_1_1_docType,
+ 2, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_tag_codepages[0],
+ 1, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_attribute_codepages[0],
+};
+
+const NW_WBXML_Dictionary_t NW_Wml_1_2_WBXMLDictionary = {
+ NW_Wml_1_2_PublicId,
+ (NW_Ucs2 *)NW_Wml_1_2_docType,
+ 2, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_tag_codepages[0],
+ 1, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_attribute_codepages[0],
+};
+
+const NW_WBXML_Dictionary_t NW_Wml_1_3_WBXMLDictionary = {
+ NW_Wml_1_3_PublicId,
+ (NW_Ucs2 *)NW_Wml_1_3_docType,
+ 2, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_tag_codepages[0],
+ 1, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_attribute_codepages[0],
+};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/src/wml_1_3_dict.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,639 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/*
+** WARNING
+**
+** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED
+** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM
+**
+** This file generated on Wed Apr 24 14:59:12 2002
+** (coordinated universal time)
+**
+** Command line: r:\Shared\shaun\dict_creator\dict_creator.exe wml_1_3.dict wml_1_3_tokendict.c wml_1_3_tokendict.h
+*/
+/*
+** This file is generated by the dictionary creator and includes some hand-edits.
+** If you need any help to edit this file please see Shaun Keller/Frank Rchichi/Ramesh Bapanapalli.
+*/
+
+/*
+ * Dictionary = Wml_1_3
+ * Public id = 0x0A
+ * Doc Type = -//WAPFORUM//DTD WML 1.3//EN
+ */
+#include "nw_wml1x_wml_1_3_tokens.h"
+#include <xml/cxml/nw_wbxml_dictionary.h>
+
+
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_pre[] = {'p','r','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_a[] = {'a','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_td[] = {'t','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_tr[] = {'t','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_table[] = {'t','a','b','l','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_p[] = {'p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_postfield[] = {'p','o','s','t','f','i','e','l','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_anchor[] = {'a','n','c','h','o','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_access[] = {'a','c','c','e','s','s','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_b[] = {'b','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_big[] = {'b','i','g','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_br[] = {'b','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_card[] = {'c','a','r','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_do[] = {'d','o','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_em[] = {'e','m','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_fieldset[] = {'f','i','e','l','d','s','e','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_go[] = {'g','o','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_head[] = {'h','e','a','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_i[] = {'i','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_img[] = {'i','m','g','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_input[] = {'i','n','p','u','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_meta[] = {'m','e','t','a','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_noop[] = {'n','o','o','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_prev[] = {'p','r','e','v','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_onevent[] = {'o','n','e','v','e','n','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_optgroup[] = {'o','p','t','g','r','o','u','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_option[] = {'o','p','t','i','o','n','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_refresh[] = {'r','e','f','r','e','s','h','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_select[] = {'s','e','l','e','c','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_small[] = {'s','m','a','l','l','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_strong[] = {'s','t','r','o','n','g','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_template[] = {'t','e','m','p','l','a','t','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_timer[] = {'t','i','m','e','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_u[] = {'u','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_setvar[] = {'s','e','t','v','a','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_wml[] = {'w','m','l','\0'};
+
+/*
+ * tag entries - sorted by token
+ */
+static const
+NW_WBXML_DictEntry_t NW_Wml_1_3_tag_token_0[36] = {
+ {0x1b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_pre},
+ {0x1c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_a},
+ {0x1d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_td},
+ {0x1e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_tr},
+ {0x1f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_table},
+ {0x20, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_p},
+ {0x21, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_postfield},
+ {0x22, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_anchor},
+ {0x23, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_access},
+ {0x24, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_b},
+ {0x25, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_big},
+ {0x26, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_br},
+ {0x27, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_card},
+ {0x28, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_do},
+ {0x29, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_em},
+ {0x2a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_fieldset},
+ {0x2b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_go},
+ {0x2c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_head},
+ {0x2d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_i},
+ {0x2e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_img},
+ {0x2f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_input},
+ {0x30, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_meta},
+ {0x31, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_noop},
+ {0x32, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_prev},
+ {0x33, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_onevent},
+ {0x34, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_optgroup},
+ {0x35, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_option},
+ {0x36, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_refresh},
+ {0x37, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_select},
+ {0x38, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_small},
+ {0x39, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_strong},
+ {0x3b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_template},
+ {0x3c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_timer},
+ {0x3d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_u},
+ {0x3e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_setvar},
+ {0x3f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_wml}
+};
+
+/*
+ * tag entries - sorted by name
+ */
+static const
+NW_Uint8 NW_Wml_1_3_tag_name_0[36] = {
+ 1,
+ 8,
+ 7,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 24,
+ 25,
+ 26,
+ 5,
+ 6,
+ 0,
+ 23,
+ 27,
+ 28,
+ 34,
+ 29,
+ 30,
+ 4,
+ 2,
+ 31,
+ 32,
+ 3,
+ 33,
+ 35,
+};
+
+static const NW_Ucs2 NW_Wml_1_3_ElementTag_zzzunknown[] = {'z','z','z','u','n','k','n','o','w','n','\0'};
+
+/*
+ * tag entries - sorted by token
+ */
+static const
+NW_WBXML_DictEntry_t NW_Wml_1_3_tag_token_1[1] = {
+ {0x18, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_zzzunknown}
+};
+
+/*
+ * tag entries - sorted by name
+ */
+static const
+NW_Uint8 NW_Wml_1_3_tag_name_1[1] = {
+ 0,
+};
+
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_accept_charset[] = {'a','c','c','e','p','t','-','c','h','a','r','s','e','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align_bottom[] = {'a','l','i','g','n','=','b','o','t','t','o','m','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align_center[] = {'a','l','i','g','n','=','c','e','n','t','e','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align_left[] = {'a','l','i','g','n','=','l','e','f','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align_middle[] = {'a','l','i','g','n','=','m','i','d','d','l','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align_right[] = {'a','l','i','g','n','=','r','i','g','h','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align_top[] = {'a','l','i','g','n','=','t','o','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_alt[] = {'a','l','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_content[] = {'c','o','n','t','e','n','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_domain[] = {'d','o','m','a','i','n','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_emptyok_false[] = {'e','m','p','t','y','o','k','=','f','a','l','s','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_emptyok_true[] = {'e','m','p','t','y','o','k','=','t','r','u','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_format[] = {'f','o','r','m','a','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_height[] = {'h','e','i','g','h','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_hspace[] = {'h','s','p','a','c','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_ivalue[] = {'i','v','a','l','u','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_iname[] = {'i','n','a','m','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_label[] = {'l','a','b','e','l','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_localsrc[] = {'l','o','c','a','l','s','r','c','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_maxlength[] = {'m','a','x','l','e','n','g','t','h','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_method_get[] = {'m','e','t','h','o','d','=','g','e','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_method_post[] = {'m','e','t','h','o','d','=','p','o','s','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_mode_nowrap[] = {'m','o','d','e','=','n','o','w','r','a','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_mode_wrap[] = {'m','o','d','e','=','w','r','a','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_multiple_false[] = {'m','u','l','t','i','p','l','e','=','f','a','l','s','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_multiple_true[] = {'m','u','l','t','i','p','l','e','=','t','r','u','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_name[] = {'n','a','m','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_newcontext_false[] = {'n','e','w','c','o','n','t','e','x','t','=','f','a','l','s','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_newcontext_true[] = {'n','e','w','c','o','n','t','e','x','t','=','t','r','u','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_onpick[] = {'o','n','p','i','c','k','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_onenterbackward[] = {'o','n','e','n','t','e','r','b','a','c','k','w','a','r','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_onenterforward[] = {'o','n','e','n','t','e','r','f','o','r','w','a','r','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_ontimer[] = {'o','n','t','i','m','e','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_optional_false[] = {'o','p','t','i','o','n','a','l','=','f','a','l','s','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_optional_true[] = {'o','p','t','i','o','n','a','l','=','t','r','u','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_path[] = {'p','a','t','h','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_scheme[] = {'s','c','h','e','m','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_sendreferer_false[] = {'s','e','n','d','r','e','f','e','r','e','r','=','f','a','l','s','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_sendreferer_true[] = {'s','e','n','d','r','e','f','e','r','e','r','=','t','r','u','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_size[] = {'s','i','z','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_src[] = {'s','r','c','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_ordered_true[] = {'o','r','d','e','r','e','d','=','t','r','u','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_ordered_false[] = {'o','r','d','e','r','e','d','=','f','a','l','s','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_tabindex[] = {'t','a','b','i','n','d','e','x','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_title[] = {'t','i','t','l','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type[] = {'t','y','p','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_accept[] = {'t','y','p','e','=','a','c','c','e','p','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_delete[] = {'t','y','p','e','=','d','e','l','e','t','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_help[] = {'t','y','p','e','=','h','e','l','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_password[] = {'t','y','p','e','=','p','a','s','s','w','o','r','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_onpick[] = {'t','y','p','e','=','o','n','p','i','c','k','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_onenterbackward[] = {'t','y','p','e','=','o','n','e','n','t','e','r','b','a','c','k','w','a','r','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_onenterforward[] = {'t','y','p','e','=','o','n','e','n','t','e','r','f','o','r','w','a','r','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_ontimer[] = {'t','y','p','e','=','o','n','t','i','m','e','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_zzzunknown[] = {'z','z','z','u','n','k','n','o','w','n','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_options[] = {'t','y','p','e','=','o','p','t','i','o','n','s','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_prev[] = {'t','y','p','e','=','p','r','e','v','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_reset[] = {'t','y','p','e','=','r','e','s','e','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_text[] = {'t','y','p','e','=','t','e','x','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_vnd_[] = {'t','y','p','e','=','v','n','d','.','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_href[] = {'h','r','e','f','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_href_http___[] = {'h','r','e','f','=','h','t','t','p',':','/','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_href_https___[] = {'h','r','e','f','=','h','t','t','p','s',':','/','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_value[] = {'v','a','l','u','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_vspace[] = {'v','s','p','a','c','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_width[] = {'w','i','d','t','h','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_xml_lang[] = {'x','m','l',':','l','a','n','g','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align[] = {'a','l','i','g','n','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_columns[] = {'c','o','l','u','m','n','s','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_class[] = {'c','l','a','s','s','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_id[] = {'i','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_forua_false[] = {'f','o','r','u','a','=','f','a','l','s','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_forua_true[] = {'f','o','r','u','a','=','t','r','u','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_src_http___[] = {'s','r','c','=','h','t','t','p',':','/','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_src_https___[] = {'s','r','c','=','h','t','t','p','s',':','/','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_http_equiv[] = {'h','t','t','p','-','e','q','u','i','v','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_http_equiv_Content_Type[] = {'h','t','t','p','-','e','q','u','i','v','=','C','o','n','t','e','n','t','-','T','y','p','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_content_application_vnd_wap_wmlc_charset_[] = {'c','o','n','t','e','n','t','=','a','p','p','l','i','c','a','t','i','o','n','/','v','n','d','.','w','a','p','.','w','m','l','c',';','c','h','a','r','s','e','t','=','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_http_equiv_Expires[] = {'h','t','t','p','-','e','q','u','i','v','=','E','x','p','i','r','e','s','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_accesskey[] = {'a','c','c','e','s','s','k','e','y','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_enctype[] = {'e','n','c','t','y','p','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_enctype_application_x_www_form_urlencoded[] = {'e','n','c','t','y','p','e','=','a','p','p','l','i','c','a','t','i','o','n','/','x','-','w','w','w','-','f','o','r','m','-','u','r','l','e','n','c','o','d','e','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_enctype_multipart_form_data[] = {'e','n','c','t','y','p','e','=','m','u','l','t','i','p','a','r','t','/','f','o','r','m','-','d','a','t','a','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_xml_space_preserve[] = {'x','m','l',':','s','p','a','c','e','=','p','r','e','s','e','r','v','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_xml_space_default[] = {'x','m','l',':','s','p','a','c','e','=','d','e','f','a','u','l','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_cache_control_no_cache[] = {'c','a','c','h','e','-','c','o','n','t','r','o','l','=','n','o','-','c','a','c','h','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_cache_control[] = {'c','a','c','h','e','-','c','o','n','t','r','o','l','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_emptyok[] = {'e','m','p','t','y','o','k','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_forua[] = {'f','o','r','u','a','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_method[] = {'m','e','t','h','o','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_mode[] = {'m','o','d','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_multiple[] = {'m','u','l','t','i','p','l','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_optional[] = {'o','p','t','i','o','n','a','l','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_newcontext[] = {'n','e','w','c','o','n','t','e','x','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_ordered[] = {'o','r','d','e','r','e','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_sendreferer[] = {'s','e','n','d','r','e','f','e','r','e','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_xml_space[] = {'x','m','l',':','s','p','a','c','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag__com_[] = {'.','c','o','m','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag__edu_[] = {'.','e','d','u','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag__net_[] = {'.','n','e','t','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag__org_[] = {'.','o','r','g','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_accept[] = {'a','c','c','e','p','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_bottom[] = {'b','o','t','t','o','m','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_clear[] = {'c','l','e','a','r','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_delete[] = {'d','e','l','e','t','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_help[] = {'h','e','l','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_http___[] = {'h','t','t','p',':','/','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_http___www_[] = {'h','t','t','p',':','/','/','w','w','w','.','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_https___[] = {'h','t','t','p','s',':','/','/','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_https___www_[] = {'h','t','t','p','s',':','/','/','w','w','w','.','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_middle[] = {'m','i','d','d','l','e','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_nowrap[] = {'n','o','w','r','a','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_options[] = {'o','p','t','i','o','n','s','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_password[] = {'p','a','s','s','w','o','r','d','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_reset[] = {'r','e','s','e','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_text[] = {'t','e','x','t','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_top[] = {'t','o','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_unknown[] = {'u','n','k','n','o','w','n','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_wrap[] = {'w','r','a','p','\0'};
+static const NW_Ucs2 NW_Wml_1_3_AttributeTag_www_[] = {'w','w','w','.','\0'};
+/*
+** The following 4 definisions are to handle duplicated tag names.
+** This duplication is due to having the same "tag name" for attribute name and value.
+*/
+
+#define NW_Wml_1_3_AttributeValueTag_onpick NW_Wml_1_3_AttributeTag_onpick
+#define NW_Wml_1_3_AttributeValueTag_onenterbackward NW_Wml_1_3_AttributeTag_onenterbackward
+#define NW_Wml_1_3_AttributeValueTag_onenterforward NW_Wml_1_3_AttributeTag_onenterforward
+#define NW_Wml_1_3_AttributeValueTag_ontimer NW_Wml_1_3_AttributeTag_ontimer
+
+/*
+ * attribute entries - sorted by token
+ */
+static const
+NW_WBXML_DictEntry_t NW_Wml_1_3_attribute_token_0[124] = {
+ {0x05, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_accept_charset},
+ {0x06, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align_bottom},
+ {0x07, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align_center},
+ {0x08, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align_left},
+ {0x09, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align_middle},
+ {0x0a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align_right},
+ {0x0b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align_top},
+ {0x0c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_alt},
+ {0x0d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_content},
+ {0x0f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_domain},
+ {0x10, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_emptyok_false},
+ {0x11, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_emptyok_true},
+ {0x12, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_format},
+ {0x13, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_height},
+ {0x14, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_hspace},
+ {0x15, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_ivalue},
+ {0x16, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_iname},
+ {0x18, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_label},
+ {0x19, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_localsrc},
+ {0x1a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_maxlength},
+ {0x1b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_method_get},
+ {0x1c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_method_post},
+ {0x1d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_mode_nowrap},
+ {0x1e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_mode_wrap},
+ {0x1f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_multiple_false},
+ {0x20, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_multiple_true},
+ {0x21, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_name},
+ {0x22, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_newcontext_false},
+ {0x23, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_newcontext_true},
+ {0x24, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_onpick},
+ {0x25, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_onenterbackward},
+ {0x26, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_onenterforward},
+ {0x27, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_ontimer},
+ {0x28, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_optional_false},
+ {0x29, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_optional_true},
+ {0x2a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_path},
+ {0x2e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_scheme},
+ {0x2f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_sendreferer_false},
+ {0x30, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_sendreferer_true},
+ {0x31, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_size},
+ {0x32, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_src},
+ {0x33, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_ordered_true},
+ {0x34, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_ordered_false},
+ {0x35, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_tabindex},
+ {0x36, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_title},
+ {0x37, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type},
+ {0x38, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_accept},
+ {0x39, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_delete},
+ {0x3a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_help},
+ {0x3b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_password},
+ {0x3c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_onpick},
+ {0x3d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_onenterbackward},
+ {0x3e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_onenterforward},
+ {0x3f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_ontimer},
+ {0x40, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_zzzunknown},
+ {0x45, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_options},
+ {0x46, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_prev},
+ {0x47, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_reset},
+ {0x48, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_text},
+ {0x49, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_vnd_},
+ {0x4a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_href},
+ {0x4b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_href_http___},
+ {0x4c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_href_https___},
+ {0x4d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_value},
+ {0x4e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_vspace},
+ {0x4f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_width},
+ {0x50, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_xml_lang},
+ {0x52, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align},
+ {0x53, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_columns},
+ {0x54, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_class},
+ {0x55, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_id},
+ {0x56, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_forua_false},
+ {0x57, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_forua_true},
+ {0x58, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_src_http___},
+ {0x59, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_src_https___},
+ {0x5a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_http_equiv},
+ {0x5b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_http_equiv_Content_Type},
+ {0x5c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_content_application_vnd_wap_wmlc_charset_},
+ {0x5d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_http_equiv_Expires},
+ {0x5e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_accesskey},
+ {0x5f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_enctype},
+ {0x60, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_enctype_application_x_www_form_urlencoded},
+ {0x61, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_enctype_multipart_form_data},
+ {0x62, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_xml_space_preserve},
+ {0x63, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_xml_space_default},
+ {0x64, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_cache_control_no_cache},
+ {0x65, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_cache_control},
+ {0x66, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_emptyok},
+ {0x67, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_forua},
+ {0x68, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_method},
+ {0x69, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_mode},
+ {0x6a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_multiple},
+ {0x6b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_optional},
+ {0x6c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_newcontext},
+ {0x6d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_ordered},
+ {0x6e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_sendreferer},
+ {0x6f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_xml_space},
+ {0x85, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag__com_},
+ {0x86, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag__edu_},
+ {0x87, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag__net_},
+ {0x88, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag__org_},
+ {0x89, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_accept},
+ {0x8a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_bottom},
+ {0x8b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_clear},
+ {0x8c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_delete},
+ {0x8d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_help},
+ {0x8e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_http___},
+ {0x8f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_http___www_},
+ {0x90, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_https___},
+ {0x91, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_https___www_},
+ {0x93, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_middle},
+ {0x94, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_nowrap},
+ {0x95, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeValueTag_onpick},
+ {0x96, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeValueTag_onenterbackward},
+ {0x97, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeValueTag_onenterforward},
+ {0x98, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeValueTag_ontimer},
+ {0x99, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_options},
+ {0x9a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_password},
+ {0x9b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_reset},
+ {0x9d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_text},
+ {0x9e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_top},
+ {0x9f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_unknown},
+ {0xa0, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_wrap},
+ {0xa1, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_www_}
+};
+
+/*
+ * attribute entries - sorted by name
+ */
+static const
+NW_Uint8 NW_Wml_1_3_attribute_name_0[124] = {
+ 97,
+ 98,
+ 99,
+ 100,
+ 101,
+ 0,
+ 79,
+ 67,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 102,
+ 86,
+ 85,
+ 69,
+ 103,
+ 68,
+ 8,
+ 77,
+ 104,
+ 9,
+ 87,
+ 10,
+ 11,
+ 80,
+ 81,
+ 82,
+ 12,
+ 88,
+ 71,
+ 72,
+ 13,
+ 105,
+ 60,
+ 61,
+ 62,
+ 14,
+ 75,
+ 76,
+ 78,
+ 106,
+ 107,
+ 108,
+ 109,
+ 70,
+ 16,
+ 15,
+ 17,
+ 18,
+ 19,
+ 89,
+ 20,
+ 21,
+ 110,
+ 90,
+ 22,
+ 23,
+ 91,
+ 24,
+ 25,
+ 26,
+ 93,
+ 27,
+ 28,
+ 111,
+ 30,
+ 113,
+ 31,
+ 114,
+ 29,
+ 112,
+ 32,
+ 115,
+ 92,
+ 33,
+ 34,
+ 116,
+ 94,
+ 42,
+ 41,
+ 117,
+ 35,
+ 118,
+ 36,
+ 95,
+ 37,
+ 38,
+ 39,
+ 40,
+ 73,
+ 74,
+ 43,
+ 119,
+ 44,
+ 120,
+ 45,
+ 46,
+ 47,
+ 48,
+ 51,
+ 52,
+ 50,
+ 53,
+ 55,
+ 49,
+ 56,
+ 57,
+ 58,
+ 59,
+ 121,
+ 63,
+ 64,
+ 65,
+ 122,
+ 123,
+ 66,
+ 96,
+ 84,
+ 83,
+ 54,
+};
+/*
+ * Tag codepage table
+ */
+static const
+NW_WBXML_Codepage_t NW_Wml_1_3_tag_codepages[2] = {
+ {36, (NW_WBXML_DictEntry_t*)&NW_Wml_1_3_tag_token_0[0], (NW_Byte *)&NW_Wml_1_3_tag_name_0[0]},
+ {1, (NW_WBXML_DictEntry_t*)&NW_Wml_1_3_tag_token_1[0], (NW_Byte *)&NW_Wml_1_3_tag_name_1[0]},
+};
+
+/*
+ * Attribute codepage table
+ */
+static const
+NW_WBXML_Codepage_t NW_Wml_1_3_attribute_codepages[1] = {
+ {124, (NW_WBXML_DictEntry_t*)&NW_Wml_1_3_attribute_token_0[0], (NW_Byte *)&NW_Wml_1_3_attribute_name_0[0]},
+};
+
+static const NW_Ucs2 NW_Wml_1_0_docType[] = {'-','/','/','W','A','P','F','O','R','U','M','/','/','D','T','D',' ','W','M','L',' ','1','.','0','/','/','E','N','\0'};
+static const NW_Ucs2 NW_Wml_1_1_docType[] = {'-','/','/','W','A','P','F','O','R','U','M','/','/','D','T','D',' ','W','M','L',' ','1','.','1','/','/','E','N','\0'};
+static const NW_Ucs2 NW_Wml_1_2_docType[] = {'-','/','/','W','A','P','F','O','R','U','M','/','/','D','T','D',' ','W','M','L',' ','1','.','2','/','/','E','N','\0'};
+static const NW_Ucs2 NW_Wml_1_3_docType[] = {'-','/','/','W','A','P','F','O','R','U','M','/','/','D','T','D',' ','W','M','L',' ','1','.','3','/','/','E','N','\0'};
+
+/*
+ * Dictionaries
+ */
+const NW_WBXML_Dictionary_t NW_Wml_1_0_WBXMLDictionary = {
+ NW_Wml_1_0_PublicId,
+ (NW_Ucs2 *)NW_Wml_1_0_docType,
+ 2, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_tag_codepages[0],
+ 1, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_attribute_codepages[0],
+};
+
+const NW_WBXML_Dictionary_t NW_Wml_1_1_WBXMLDictionary = {
+ NW_Wml_1_1_PublicId,
+ (NW_Ucs2 *)NW_Wml_1_1_docType,
+ 2, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_tag_codepages[0],
+ 1, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_attribute_codepages[0],
+};
+
+const NW_WBXML_Dictionary_t NW_Wml_1_2_WBXMLDictionary = {
+ NW_Wml_1_2_PublicId,
+ (NW_Ucs2 *)NW_Wml_1_2_docType,
+ 2, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_tag_codepages[0],
+ 1, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_attribute_codepages[0],
+};
+
+const NW_WBXML_Dictionary_t NW_Wml_1_3_WBXMLDictionary = {
+ NW_Wml_1_3_PublicId,
+ (NW_Ucs2 *)NW_Wml_1_3_docType,
+ 2, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_tag_codepages[0],
+ 1, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_attribute_codepages[0],
+};
+
+/*
+** WARNING
+**
+** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED
+** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM
+**
+** This file generated on Wed Apr 24 14:59:12 2002
+** (coordinated universal time)
+**
+** Command line: r:\Shared\shaun\dict_creator\dict_creator.exe wml_1_3.dict wml_1_3_tokendict.c wml_1_3_tokendict.h
+*/
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/xmlparser/src/xhtml_1_0_dict.c Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,732 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/*
+** NOTE:
+**
+** We are currently hand editing this file and nw_xhtml_xhtml_1_0_tokens.h.
+**
+** However, I did use the dict_create.exe program in cxml\dictionary to generate
+** and then merge with these files.
+**
+** Joel Parks 2002.08.27
+**
+** This file generated on Tue Aug 27 15:33:29 2002
+** (coordinated universal time)
+**
+** Command line: dict_creator xhtml_1_0.dict xhtml_1_0_dict.c nw_xhtml_xhtml_1_0_tokens.h
+*/
+
+/*
+ * Dictionary = XHTML_1_0
+ * Public id = 4
+ * Doc Type = -//WAPFORUM//DTD WML 2.0//EN
+ */
+
+#include "nw_xhtml_xhtml_1_0_tokens.h"
+#include <xml/cxml/nw_wbxml_dictionary.h>
+
+
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_body[] = {'b','o','d','y','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_head[] = {'h','e','a','d','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_html[] = {'h','t','m','l','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_title[] = {'t','i','t','l','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_kbd[] = {'k','b','d','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_meta[] = {'m','e','t','a','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_abbr[] = {'a','b','b','r','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_acronym[] = {'a','c','r','o','n','y','m','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_address[] = {'a','d','d','r','e','s','s','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_br[] = {'b','r','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_cite[] = {'c','i','t','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_dfn[] = {'d','f','n','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_div[] = {'d','i','v','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_em[] = {'e','m','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_h1[] = {'h','1','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_h2[] = {'h','2','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_h3[] = {'h','3','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_h4[] = {'h','4','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_h5[] = {'h','5','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_h6[] = {'h','6','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_p[] = {'p','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_q[] = {'q','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_strong[] = {'s','t','r','o','n','g','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_var[] = {'v','a','r','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_blockquote[] = {'b','l','o','c','k','q','u','o','t','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_pre[] = {'p','r','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_b[] = {'b','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_a[] = {'a','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_link[] = {'l','i','n','k','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_code[] = {'c','o','d','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_big[] = {'b','i','g','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_base[] = {'b','a','s','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_marquee[] = {'m','a','r','q','u','e','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_hr[] = {'h','r','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_span[] = {'s','p','a','n','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_i[] = {'i','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_small[] = {'s','m','a','l','l','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_u[] = {'u','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_dl[] = {'d','l','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_dt[] = {'d','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_dd[] = {'d','d','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_ol[] = {'o','l','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_ul[] = {'u','l','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_li[] = {'l','i','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_fieldset[] = {'f','i','e','l','d','s','e','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_input[] = {'i','n','p','u','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_form[] = {'f','o','r','m','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_label[] = {'l','a','b','e','l','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_select[] = {'s','e','l','e','c','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_option[] = {'o','p','t','i','o','n','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_optgroup[] = {'o','p','t','g','r','o','u','p','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_textarea[] = {'t','e','x','t','a','r','e','a','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_caption[] = {'c','a','p','t','i','o','n','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_table[] = {'t','a','b','l','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_td[] = {'t','d','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_th[] = {'t','h','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_tr[] = {'t','r','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_img[] = {'i','m','g','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_style[] = {'s','t','y','l','e','\0'};
+
+
+/*
+ * tag entries - sorted by token
+ */
+static const
+NW_WBXML_DictEntry_t XHTML_1_0_tag_token_0[59] = {
+ {0x05, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_body},
+ {0x06, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_head},
+ {0x07, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_html},
+ {0x08, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_title},
+ {0x09, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_kbd},
+ {0x0a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_meta},
+ {0x0b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_abbr},
+ {0x0c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_acronym},
+ {0x0d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_address},
+ {0x0e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_br},
+ {0x0f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_cite},
+ {0x10, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_dfn},
+ {0x11, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_div},
+ {0x12, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_em},
+ {0x13, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_h1},
+ {0x14, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_h2},
+ {0x15, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_h3},
+ {0x16, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_h4},
+ {0x17, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_h5},
+ {0x18, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_h6},
+ {0x19, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_p},
+ {0x1a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_q},
+ {0x1b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_strong},
+ {0x1c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_var},
+ {0x1d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_blockquote},
+ {0x1e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_pre},
+ {0x1f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_b},
+ {0x20, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_a},
+ {0x21, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_link},
+ {0x22, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_code},
+ {0x23, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_big},
+ {0x24, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_base},
+ {0x25, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_marquee},
+ {0x26, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_hr},
+ {0x27, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_span},
+ {0x28, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_i},
+ {0x29, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_small},
+ {0x2a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_u},
+ {0x2b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_dl},
+ {0x2c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_dt},
+ {0x2d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_dd},
+ {0x2e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_ol},
+ {0x2f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_ul},
+ {0x30, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_li},
+ {0x31, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_fieldset},
+ {0x32, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_input},
+ {0x33, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_form},
+ {0x34, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_label},
+ {0x35, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_select},
+ {0x36, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_option},
+ {0x37, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_optgroup},
+ {0x38, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_textarea},
+ {0x39, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_caption},
+ {0x3a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_table},
+ {0x3b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_td},
+ {0x3c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_th},
+ {0x3d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_tr},
+ {0x3e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_img},
+ {0x3f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_style}
+};
+
+
+/*
+ * tag entries - sorted by name
+ */
+static const
+NW_Byte XHTML_1_0_tag_name_0[59] = {
+ 27,
+ 6,
+ 7,
+ 8,
+ 26,
+ 31,
+ 30,
+ 24,
+ 0,
+ 9,
+ 52,
+ 10,
+ 29,
+ 40,
+ 11,
+ 12,
+ 38,
+ 39,
+ 13,
+ 44,
+ 46,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 1,
+ 33,
+ 2,
+ 35,
+ 57,
+ 45,
+ 4,
+ 47,
+ 43,
+ 28,
+ 32,
+ 5,
+ 41,
+ 50,
+ 49,
+ 20,
+ 25,
+ 21,
+ 48,
+ 36,
+ 34,
+ 22,
+ 58,
+ 53,
+ 54,
+ 51,
+ 55,
+ 3,
+ 56,
+ 37,
+ 42,
+ 23,
+};
+
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_samp[] = {'s','a','m','p','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_thead[] = {'t','h','e','a','d','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_tbody[] = {'t','b','o','d','y','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_tfoot[] = {'t','f','o','o','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_noscript[] = {'n','o','s','c','r','i','p','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_script[] = {'s','c','r','i','p','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_zzzunknown[] = {'z','z','z','u','n','k','n','o','w','n','\0'};
+
+
+/*
+ * tag entries - sorted by token
+ */
+static const
+NW_WBXML_DictEntry_t XHTML_1_0_tag_token_1[7] = {
+ {0x14, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_samp},
+ {0x15, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_thead},
+ {0x16, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_tbody},
+ {0x17, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_tfoot},
+ {0x18, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_noscript},
+ {0x19, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_script},
+ {0x1a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_zzzunknown}
+};
+
+
+/*
+ * tag entries - sorted by name
+ */
+static const
+NW_Byte XHTML_1_0_tag_name_1[7] = {
+ 4,
+ 0,
+ 5,
+ 2,
+ 3,
+ 1,
+ 6,
+};
+
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_abbr[] = {'a','b','b','r','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_accept_charset[] = {'a','c','c','e','p','t','-','c','h','a','r','s','e','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_accept[] = {'a','c','c','e','p','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_accesskey[] = {'a','c','c','e','s','s','k','e','y','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_action[] = {'a','c','t','i','o','n','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_align[] = {'a','l','i','g','n','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_alink[] = {'a','l','i','n','k','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_alt[] = {'a','l','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_axis[] = {'a','x','i','s','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_bgcolor[] = {'b','g','c','o','l','o','r','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_border[] = {'b','o','r','d','e','r','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_cellpadding[] = {'c','e','l','l','p','a','d','d','i','n','g','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_char[] = {'c','h','a','r','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_charoff[] = {'c','h','a','r','o','f','f','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_charset[] = {'c','h','a','r','s','e','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_checked[] = {'c','h','e','c','k','e','d','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_cite[] = {'c','i','t','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_class[] = {'c','l','a','s','s','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_clear[] = {'c','l','e','a','r','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_code[] = {'c','o','d','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_codebase[] = {'c','o','d','e','b','a','s','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_codetype[] = {'c','o','d','e','t','y','p','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_color[] = {'c','o','l','o','r','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_cols[] = {'c','o','l','s','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_colspan[] = {'c','o','l','s','p','a','n','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_dir[] = {'d','i','r','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_disabled[] = {'d','i','s','a','b','l','e','d','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_enctype[] = {'e','n','c','t','y','p','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_height[] = {'h','e','i','g','h','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_href[] = {'h','r','e','f','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_hspace[] = {'h','s','p','a','c','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_id[] = {'i','d','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_label[] = {'l','a','b','e','l','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_link[] = {'l','i','n','k','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_maxlength[] = {'m','a','x','l','e','n','g','t','h','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_media[] = {'m','e','d','i','a','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_method[] = {'m','e','t','h','o','d','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_multiple[] = {'m','u','l','t','i','p','l','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_name[] = {'n','a','m','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_noshade[] = {'n','o','s','h','a','d','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_nowrap[] = {'n','o','w','r','a','p','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_readonly[] = {'r','e','a','d','o','n','l','y','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_rel[] = {'r','e','l','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_rev[] = {'r','e','v','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_rows[] = {'r','o','w','s','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_rowspan[] = {'r','o','w','s','p','a','n','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_selected[] = {'s','e','l','e','c','t','e','d','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_size[] = {'s','i','z','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_src[] = {'s','r','c','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_start[] = {'s','t','a','r','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_style[] = {'s','t','y','l','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_tabindex[] = {'t','a','b','i','n','d','e','x','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_title[] = {'t','i','t','l','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_type[] = {'t','y','p','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_valign[] = {'v','a','l','i','g','n','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_value[] = {'v','a','l','u','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_version[] = {'v','e','r','s','i','o','n','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_vspace[] = {'v','s','p','a','c','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_width[] = {'w','i','d','t','h','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_none[] = {'n','o','n','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_left[] = {'l','e','f','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_right[] = {'r','i','g','h','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_normal[] = {'n','o','r','m','a','l','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_italic[] = {'i','t','a','l','i','c','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_bold[] = {'b','o','l','d','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_circle[] = {'c','i','r','c','l','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_disc[] = {'d','i','s','c','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_square[] = {'s','q','u','a','r','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_always[] = {'a','l','w','a','y','s','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_avoid[] = {'a','v','o','i','d','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_center[] = {'c','e','n','t','e','r','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_justify[] = {'j','u','s','t','i','f','y','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_underline[] = {'u','n','d','e','r','l','i','n','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_blink[] = {'b','l','i','n','k','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_marquee[] = {'m','a','r','q','u','e','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_top[] = {'t','o','p','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_middle[] = {'m','i','d','d','l','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_bottom[] = {'b','o','t','t','o','m','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_baseline[] = {'b','a','s','e','l','i','n','e','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_get[] = {'g','e','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_post[] = {'p','o','s','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_ltr[] = {'l','t','r','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_rtl[] = {'r','t','l','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_yes[] = {'y','e','s','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_no[] = {'n','o','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_auto[] = {'a','u','t','o','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_button[] = {'b','u','t','t','o','n','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_submit[] = {'s','u','b','m','i','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_reset[] = {'r','e','s','e','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag__1[] = {'1','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_all[] = {'a','l','l','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_text[] = {'t','e','x','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_password[] = {'p','a','s','s','w','o','r','d','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_checkbox[] = {'c','h','e','c','k','b','o','x','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_radio[] = {'r','a','d','i','o','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_hidden[] = {'h','i','d','d','e','n','\0'};
+
+
+/*
+ * attribute entries - sorted by token
+ */
+static const
+NW_WBXML_DictEntry_t XHTML_1_0_attribute_token_0[96] = {
+ {0x05, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_abbr},
+ {0x06, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_accept_charset},
+ {0x07, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_accept},
+ {0x08, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_accesskey},
+ {0x09, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_action},
+ {0x0a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_align},
+ {0x0b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_alink},
+ {0x0c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_alt},
+ {0x0e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_axis},
+ {0x10, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_bgcolor},
+ {0x11, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_border},
+ {0x12, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_cellpadding},
+ {0x13, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_char},
+ {0x14, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_charoff},
+ {0x15, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_charset},
+ {0x16, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_checked},
+ {0x17, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_cite},
+ {0x18, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_class},
+ {0x1a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_clear},
+ {0x1b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_code},
+ {0x1c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_codebase},
+ {0x1d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_codetype},
+ {0x1e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_color},
+ {0x1f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_cols},
+ {0x20, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_colspan},
+ {0x28, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_dir},
+ {0x29, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_disabled},
+ {0x2a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_enctype},
+ {0x30, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_height},
+ {0x31, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_href},
+ {0x33, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_hspace},
+ {0x35, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_id},
+ {0x37, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_label},
+ {0x3a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_link},
+ {0x3e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_maxlength},
+ {0x3f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_media},
+ {0x45, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_method},
+ {0x46, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_multiple},
+ {0x47, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_name},
+ {0x4a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_noshade},
+ {0x4b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_nowrap},
+ {0x61, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_readonly},
+ {0x62, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_rel},
+ {0x63, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_rev},
+ {0x64, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_rows},
+ {0x65, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_rowspan},
+ {0x6a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_selected},
+ {0x6c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_size},
+ {0x6e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_src},
+ {0x70, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_start},
+ {0x71, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_style},
+ {0x73, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_tabindex},
+ {0x76, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_title},
+ {0x77, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_type},
+ {0x79, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_valign},
+ {0x7a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_value},
+ {0x7c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_version},
+ {0x7e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_vspace},
+ {0x7f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_width},
+ {0x85, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_none},
+ {0x86, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_left},
+ {0x87, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_right},
+ {0x88, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_normal},
+ {0x89, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_italic},
+ {0x8a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_bold},
+ {0x8b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_circle},
+ {0x8c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_disc},
+ {0x8d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_square},
+ {0x8e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_always},
+ {0x8f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_avoid},
+ {0x90, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_center},
+ {0x91, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_justify},
+ {0x92, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_underline},
+ {0x93, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_blink},
+ {0x94, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_marquee},
+ {0x95, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_top},
+ {0x96, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_middle},
+ {0x97, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_bottom},
+ {0x98, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_baseline},
+ {0x9a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_get},
+ {0x9b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_post},
+ {0x9d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_ltr},
+ {0x9e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_rtl},
+ {0xa0, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_yes},
+ {0xa1, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_no},
+ {0xa2, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_auto},
+ {0xa3, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_button},
+ {0xa4, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_submit},
+ {0xa5, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_reset},
+ {0xae, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag__1},
+ {0xb3, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_all},
+ {0xb8, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_text},
+ {0xb9, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_password},
+ {0xba, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_checkbox},
+ {0xbb, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_radio},
+ {0xbc, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_hidden}
+};
+
+
+/*
+ * attribute entries - sorted by name
+ */
+static const
+NW_Byte XHTML_1_0_attribute_name_0[96] = {
+ 89,
+ 0,
+ 2,
+ 1,
+ 3,
+ 4,
+ 5,
+ 6,
+ 90,
+ 7,
+ 68,
+ 85,
+ 69,
+ 8,
+ 78,
+ 9,
+ 73,
+ 64,
+ 10,
+ 77,
+ 86,
+ 11,
+ 70,
+ 12,
+ 13,
+ 14,
+ 93,
+ 15,
+ 65,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26,
+ 66,
+ 27,
+ 79,
+ 28,
+ 95,
+ 29,
+ 30,
+ 31,
+ 63,
+ 71,
+ 32,
+ 60,
+ 33,
+ 81,
+ 74,
+ 34,
+ 35,
+ 36,
+ 76,
+ 37,
+ 38,
+ 84,
+ 59,
+ 62,
+ 39,
+ 40,
+ 92,
+ 80,
+ 94,
+ 41,
+ 42,
+ 88,
+ 43,
+ 61,
+ 44,
+ 45,
+ 82,
+ 46,
+ 47,
+ 67,
+ 48,
+ 49,
+ 50,
+ 87,
+ 51,
+ 91,
+ 52,
+ 75,
+ 53,
+ 72,
+ 54,
+ 55,
+ 56,
+ 57,
+ 58,
+ 83,
+};
+
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_zzzunknown[] = {'z','z','z','u','n','k','n','o','w','n','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_xml_stylesheet[] = {'x','m','l','-','s','t','y','l','e','s','h','e','e','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_alternate[] = {'a','l','t','e','r','n','a','t','e','\0'};
+
+
+/*
+ * attribute entries - sorted by token
+ */
+static const
+NW_WBXML_DictEntry_t XHTML_1_0_attribute_token_1[3] = {
+ {0x05, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_zzzunknown},
+ {0x06, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_xml_stylesheet},
+ {0x07, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_alternate},
+};
+
+
+/*
+ * attribute entries - sorted by name
+ */
+static const
+NW_Byte XHTML_1_0_attribute_name_1[3] = {
+ 2,
+ 1,
+ 0,
+};
+
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_center[] = {'c','e','n','t','e','r','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_dir[] = {'d','i','r','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_font[] = {'f','o','n','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_menu[] = {'m','e','n','u','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_ElementTag_blink[] = {'b','l','i','n','k','\0'};
+
+
+/*
+ * tag entries - sorted by token
+ */
+static const
+NW_WBXML_DictEntry_t XHTML_1_0_tag_token_2[5] = {
+ {0x05, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_center},
+ {0x06, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_dir},
+ {0x07, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_font},
+ {0x08, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_menu},
+ {0x09, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_blink}
+};
+
+
+/*
+ * tag entries - sorted by name
+ */
+static const
+NW_Byte XHTML_1_0_tag_name_2[5] = {
+ 4,
+ 0,
+ 1,
+ 2,
+ 3,
+};
+
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_behavior[] = {'b','e','h','a','v','i','o','r','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_direction[] = {'d','i','r','e','c','t','i','o','n','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_loop[] = {'l','o','o','p','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_scrollamount[] = {'s','c','r','o','l','l','a','m','o','u','n','t','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_scrolldelay[] = {'s','c','r','o','l','l','d','e','l','a','y','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_cti[] = {'c','t','i','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_telbook[] = {'t','e','l','b','o','o','k','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_email[] = {'e','m','a','i','l','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_A[] = {'A','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_a[] = {'a','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_I[] = {'I','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_i[] = {'i','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_scroll[] = {'s','c','r','o','l','l','\0'};
+static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_slide[] = {'s','l','i','d','e','\0'};
+
+
+/*
+ * attribute entries - sorted by token
+ */
+static const
+NW_WBXML_DictEntry_t XHTML_1_0_attribute_token_2[15] = {
+ {0x05, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_behavior},
+ {0x06, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_direction},
+ {0x07, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_loop},
+ {0x08, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_scrollamount},
+ {0x09, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_scrolldelay},
+ {0x0b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_cti},
+ {0x0d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_telbook},
+ {0x0f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_email},
+ {0x86, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_A},
+ {0x87, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_a},
+ {0x88, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_I},
+ {0x89, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_i},
+ {0x8a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_scroll},
+ {0x8b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_slide},
+ {0x8c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_alternate}
+};
+
+
+/*
+ * attribute entries - sorted by name
+ */
+static const
+NW_Byte XHTML_1_0_attribute_name_2[15] = {
+ 8,
+ 10,
+ 9,
+ 14,
+ 0,
+ 5,
+ 1,
+ 7,
+ 11,
+ 2,
+ 12,
+ 3,
+ 4,
+ 13,
+ 6,
+};
+
+/*
+ * Tag codepage table
+ */
+static const
+NW_WBXML_Codepage_t XHTML_1_0_tag_codepages[3] = {
+ {59, (NW_WBXML_DictEntry_t*)&XHTML_1_0_tag_token_0[0], (NW_Byte *)&XHTML_1_0_tag_name_0[0]},
+ {7, (NW_WBXML_DictEntry_t*)&XHTML_1_0_tag_token_1[0], (NW_Byte *)&XHTML_1_0_tag_name_1[0]},
+ {5, (NW_WBXML_DictEntry_t*)&XHTML_1_0_tag_token_2[0], (NW_Byte *)&XHTML_1_0_tag_name_2[0]},
+};
+
+/*
+ * Attribute codepage table
+ */
+static const
+NW_WBXML_Codepage_t XHTML_1_0_attribute_codepages[3] = {
+ {96, (NW_WBXML_DictEntry_t*)&XHTML_1_0_attribute_token_0[0], (NW_Byte *)&XHTML_1_0_attribute_name_0[0]},
+ {3, (NW_WBXML_DictEntry_t*)&XHTML_1_0_attribute_token_1[0], (NW_Byte *)&XHTML_1_0_attribute_name_1[0]},
+ {15, (NW_WBXML_DictEntry_t*)&XHTML_1_0_attribute_token_2[0], (NW_Byte *)&XHTML_1_0_attribute_name_2[0]},
+};
+
+static const NW_Ucs2 NW_XHTML_1_0_docType[] = {'-','/','/','W','A','P','F','O','R','U','M','/','/','D','T','D',' ','W','M','L',' ','2','.','0','/','/','E','N','\0'};
+
+/*
+ * Dictionary
+ */
+const NW_WBXML_Dictionary_t NW_XHTML_WBXMLDictionary = {
+ NW_xhtml_1_0_PublicId,
+ (NW_Ucs2 *)NW_XHTML_1_0_docType,
+ 3, (NW_WBXML_Codepage_t*)&XHTML_1_0_tag_codepages[0],
+ 3, (NW_WBXML_Codepage_t*)&XHTML_1_0_attribute_codepages[0],
+};
+
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_app.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_app.h Thu Jul 22 16:49:54 2010 +0100
@@ -21,9 +21,8 @@
extern "C" {
#endif /* __cplusplus */
-#include <libxml2_tree.h>
-#include <libxml2_xmlio.h>
-
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_xmlio.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_keysdata.h"
#include "xmlsec_keys.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_base64.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_base64.h Thu Jul 22 16:49:54 2010 +0100
@@ -16,7 +16,7 @@
extern "C" {
#endif /* __cplusplus */
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
#include "xmlsec_config.h"
#include "xmlsec_xmlsec.h"
#include "xmlsec_transforms.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_bn.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_bn.h Thu Jul 22 16:49:54 2010 +0100
@@ -16,7 +16,7 @@
extern "C" {
#endif /* __cplusplus */
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
#include "xmlsec_config.h"
#include "xmlsec_xmlsec.h"
#include "xmlsec_buffer.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_buffer.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_buffer.h Thu Jul 22 16:49:54 2010 +0100
@@ -16,7 +16,7 @@
extern "C" {
#endif /* __cplusplus */
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
#include "xmlsec_config.h"
#include "xmlsec_xmlsec.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_dl.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_dl.h Thu Jul 22 16:49:54 2010 +0100
@@ -25,8 +25,8 @@
#ifndef XMLSEC_NO_CRYPTO_DYNAMIC_LOADING
-#include <libxml2_tree.h>
-#include <libxml2_xmlio.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_xmlio.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_keysdata.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_io.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_io.h Thu Jul 22 16:49:54 2010 +0100
@@ -16,8 +16,8 @@
extern "C" {
#endif /* __cplusplus */
-#include <libxml2_tree.h>
-#include <libxml2_xmlio.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_xmlio.h>
#include "xmlsec_config.h"
#include "xmlsec_xmlsec.h"
#include "xmlsec_transforms.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_keyinfo.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_keyinfo.h Thu Jul 22 16:49:54 2010 +0100
@@ -19,7 +19,7 @@
#include <time.h>
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
#include "xmlsec_config.h"
#include "xmlsec_xmlsec.h"
#include "xmlsec_list.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_keysdata.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_keysdata.h Thu Jul 22 16:49:54 2010 +0100
@@ -16,7 +16,7 @@
extern "C" {
#endif /* __cplusplus */
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
#include "xmlsec_config.h"
#include "xmlsec_xmlsec.h"
#include "xmlsec_buffer.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_membuf.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_membuf.h Thu Jul 22 16:49:54 2010 +0100
@@ -16,7 +16,7 @@
extern "C" {
#endif /* __cplusplus */
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
#include "xmlsec_config.h"
#include "xmlsec_xmlsec.h"
#include "xmlsec_buffer.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_nodeset.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_nodeset.h Thu Jul 22 16:49:54 2010 +0100
@@ -16,8 +16,8 @@
extern "C" {
#endif /* __cplusplus */
-#include <libxml2_tree.h>
-#include <libxml2_xpath.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_xpath.h>
#include "xmlsec_config.h"
#include "xmlsec_xmlsec.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_parser.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_parser.h Thu Jul 22 16:49:54 2010 +0100
@@ -16,7 +16,7 @@
extern "C" {
#endif /* __cplusplus */
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
#include "xmlsec_config.h"
#include "xmlsec_xmlsec.h"
#include "xmlsec_transforms.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_private.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_private.h Thu Jul 22 16:49:54 2010 +0100
@@ -21,8 +21,8 @@
extern "C" {
#endif /* __cplusplus */
-#include <libxml2_tree.h>
-#include <libxml2_xmlio.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_xmlio.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_keysdata.h"
@@ -492,7 +492,7 @@
void* cryptoAppDefaultPwdCallback;
};
-#include <libxml2_xmlstring.h>
+#include <stdapis/libxml2/libxml2_xmlstring.h>
#define xmlSecStrPrintf xmlStrPrintf
#define xmlSecStrVPrintf xmlStrVPrintf
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_privatexkms.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_privatexkms.h Thu Jul 22 16:49:54 2010 +0100
@@ -23,8 +23,8 @@
#endif /* __cplusplus */
#include <stdio.h>
-#include <libxml2_tree.h>
-#include <libxml2_parser.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_parser.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_buffer.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_soap.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_soap.h Thu Jul 22 16:49:54 2010 +0100
@@ -18,7 +18,7 @@
extern "C" {
#endif /* __cplusplus */
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
#include "xmlsec_xmlsec.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_strings.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_strings.h Thu Jul 22 16:49:54 2010 +0100
@@ -16,7 +16,7 @@
extern "C" {
#endif /* __cplusplus */
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
#include "xmlsec_config.h"
#include "xmlsec_xmlsec.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_templates.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_templates.h Thu Jul 22 16:49:54 2010 +0100
@@ -16,7 +16,7 @@
extern "C" {
#endif /* __cplusplus */
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
#include "xmlsec_config.h"
#include "xmlsec_xmlsec.h"
#include "xmlsec_transforms.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_transforms.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_transforms.h Thu Jul 22 16:49:54 2010 +0100
@@ -16,8 +16,8 @@
extern "C" {
#endif /* __cplusplus */
-#include <libxml2_tree.h>
-#include <libxml2_xpath.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_xpath.h>
#include "xmlsec_config.h"
#include "xmlsec_xmlsec.h"
#include "xmlsec_buffer.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_x509.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_x509.h Thu Jul 22 16:49:54 2010 +0100
@@ -17,8 +17,8 @@
#endif /* __cplusplus */
#include <stdio.h>
-#include <libxml2_tree.h>
-#include <libxml2_parser.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_parser.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_buffer.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_xkms.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_xkms.h Thu Jul 22 16:49:54 2010 +0100
@@ -20,8 +20,8 @@
#endif /* __cplusplus */
#include <stdio.h>
-#include <libxml2_tree.h>
-#include <libxml2_parser.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_parser.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_buffer.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_xmldsig.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_xmldsig.h Thu Jul 22 16:49:54 2010 +0100
@@ -20,8 +20,8 @@
extern "C" {
#endif /* __cplusplus */
-#include <libxml2_tree.h>
-#include <libxml2_parser.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_parser.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_list.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_xmlenc.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_xmlenc.h Thu Jul 22 16:49:54 2010 +0100
@@ -20,8 +20,8 @@
#endif /* __cplusplus */
#include <stdio.h>
-#include <libxml2_tree.h>
-#include <libxml2_parser.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_parser.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_buffer.h"
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_xmlsec.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_xmlsec.h Thu Jul 22 16:49:54 2010 +0100
@@ -16,14 +16,14 @@
extern "C" {
#endif /* __cplusplus */
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
#include "xmlsec_config.h"
#include "xmlsec_version.h"
#include "xmlsec_exports.h"
#include "xmlsec_strings.h"
//added for symbian port
-#include <libxml2_xmlmemory.h>
+#include <stdapis/libxml2/libxml2_xmlmemory.h>
/***********************************************************************
*
--- a/xmlsecurityengine/xmlsec/inc/xmlsec_xmltree.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/inc/xmlsec_xmltree.h Thu Jul 22 16:49:54 2010 +0100
@@ -16,8 +16,8 @@
extern "C" {
#endif /* __cplusplus */
#include "xmlsec_config.h"
-#include <libxml2_tree.h>
-#include <libxml2_xpath.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_xpath.h>
#include "xmlsec_xmlsec.h"
/**
--- a/xmlsecurityengine/xmlsec/src/xmlsec_app.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_app.c Thu Jul 22 16:49:54 2010 +0100
@@ -19,7 +19,7 @@
#include <string.h>
#include <time.h>
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_app.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_base64.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_base64.c Thu Jul 22 16:49:54 2010 +0100
@@ -15,8 +15,8 @@
#include <stdio.h>
#include <string.h>
-#include <libxml2_tree.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#include "xmlsec_xmlsec.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_bn.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_bn.c Thu Jul 22 16:49:54 2010 +0100
@@ -16,8 +16,8 @@
#include <string.h>
#include <ctype.h>
-#include <libxml2_tree.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_xmltree.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_buffer.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_buffer.c Thu Jul 22 16:49:54 2010 +0100
@@ -16,8 +16,8 @@
#include <ctype.h>
#include <errno.h>
-#include <libxml2_tree.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_xmltree.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_c14n.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_c14n.c Thu Jul 22 16:49:54 2010 +0100
@@ -15,9 +15,9 @@
#include <stdio.h>
#include <string.h>
-#include <libxml2_tree.h>
-#include <libxml2_c14n.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_c14n.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_keys.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_dl.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_dl.c Thu Jul 22 16:49:54 2010 +0100
@@ -16,7 +16,7 @@
#include <string.h>
#include <time.h>
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_app.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_enveloped.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_enveloped.c Thu Jul 22 16:49:54 2010 +0100
@@ -14,9 +14,9 @@
#include <stdlib.h>
#include <string.h>
-#include <libxml2_tree.h>
-#include <libxml2_xpath.h>
-#include <libxml2_xpathinternals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_xpath.h>
+#include <stdapis/libxml2/libxml2_xpathinternals.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_xmltree.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_errors.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_errors.c Thu Jul 22 16:49:54 2010 +0100
@@ -16,7 +16,7 @@
#include <stdarg.h>
#include <time.h>
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_xmltree.h"
@@ -25,7 +25,7 @@
//added for symbian port
-#include "libxml2_globals.h"
+#include <stdapis/libxml2/libxml2_globals.h>
#define XMLSEC_ERRORS_BUFFER_SIZE 1024
--- a/xmlsecurityengine/xmlsec/src/xmlsec_io.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_io.c Thu Jul 22 16:49:54 2010 +0100
@@ -16,10 +16,10 @@
#include <stdio.h> //added for symbian
-#include <libxml2_tree.h>
-#include <libxml2_uri.h>
-#include <libxml2_xmlio.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_uri.h>
+#include <stdapis/libxml2/libxml2_xmlio.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#ifdef LIBXML_HTTP_ENABLED
#include <libxml2_nanohttp.h>
--- a/xmlsecurityengine/xmlsec/src/xmlsec_keyinfo.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_keyinfo.c Thu Jul 22 16:49:54 2010 +0100
@@ -46,8 +46,8 @@
#include <stdlib.h>
#include <string.h>
-#include <libxml2_tree.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_xmltree.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_keys.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_keys.c Thu Jul 22 16:49:54 2010 +0100
@@ -14,8 +14,8 @@
#include <stdlib.h>
#include <string.h>
-#include <libxml2_tree.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_xmltree.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_keysdata.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_keysdata.c Thu Jul 22 16:49:54 2010 +0100
@@ -15,8 +15,8 @@
#include <stdlib.h>
#include <string.h>
-#include <libxml2_tree.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_xmltree.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_keysmngr.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_keysmngr.c Thu Jul 22 16:49:54 2010 +0100
@@ -16,9 +16,9 @@
#include <string.h>
#include <errno.h>
-#include <libxml2_tree.h>
-#include <libxml2_parser.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_parser.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_xmltree.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_list.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_list.c Thu Jul 22 16:49:54 2010 +0100
@@ -14,8 +14,8 @@
#include <stdlib.h>
#include <string.h>
-#include <libxml2_tree.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_list.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_membuf.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_membuf.c Thu Jul 22 16:49:54 2010 +0100
@@ -14,7 +14,9 @@
#include <stdlib.h>
#include <string.h>
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+
+
#include "xmlsec_xmlsec.h"
#include "xmlsec_buffer.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_nodeset.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_nodeset.c Thu Jul 22 16:49:54 2010 +0100
@@ -14,10 +14,10 @@
#include <stdlib.h>
#include <string.h>
-#include <libxml2_tree.h>
-#include <libxml2_xpath.h>
-#include <libxml2_xpathinternals.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_xpath.h>
+#include <stdapis/libxml2/libxml2_xpathinternals.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_nodeset.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_parser.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_parser.c Thu Jul 22 16:49:54 2010 +0100
@@ -14,9 +14,9 @@
#include <stdlib.h>
#include <string.h>
-#include <libxml2_tree.h>
-#include <libxml2_parser.h>
-#include <libxml2_parserinternals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_parser.h>
+#include <stdapis/libxml2/libxml2_parserinternals.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_xmltree.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_soap.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_soap.c Thu Jul 22 16:49:54 2010 +0100
@@ -16,8 +16,8 @@
#include <stdlib.h>
#include <string.h>
-#include <libxml2_tree.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_xmltree.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_strings.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_strings.c Thu Jul 22 16:49:54 2010 +0100
@@ -11,7 +11,8 @@
*/
#include "xmlsec_globals.h"
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+
#include "xmlsec_xmlsec.h"
#include "xmlsec_strings.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_templates.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_templates.c Thu Jul 22 16:49:54 2010 +0100
@@ -14,8 +14,8 @@
#include <stdlib.h>
#include <string.h>
-#include <libxml2_tree.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_xmltree.h"
@@ -26,7 +26,7 @@
#include "xmlsec_errors.h"
//added for symbian port
-#include <libxml2_parser.h>
+#include <stdapis/libxml2/libxml2_parser.h>
static int useNewLine = 1;
--- a/xmlsecurityengine/xmlsec/src/xmlsec_transforms.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_transforms.c Thu Jul 22 16:49:54 2010 +0100
@@ -46,10 +46,10 @@
#include <stdio.h>
#include <string.h>
-#include <libxml2_tree.h>
-#include <libxml2_xpath.h>
-#include <libxml2_xpointer.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_xpath.h>
+#include <stdapis/libxml2/libxml2_xpointer.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_buffer.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_x509.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_x509.c Thu Jul 22 16:49:54 2010 +0100
@@ -15,8 +15,8 @@
#include <stdio.h>
#include <string.h>
-#include <libxml2_tree.h>
-#include <libxml2_parser.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_parser.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_buffer.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_xkms.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_xkms.c Thu Jul 22 16:49:54 2010 +0100
@@ -19,9 +19,9 @@
#include <stdio.h>
#include <string.h>
-#include <libxml2_tree.h>
-#include <libxml2_parser.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_parser.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_buffer.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_xmldsig.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_xmldsig.c Thu Jul 22 16:49:54 2010 +0100
@@ -19,9 +19,9 @@
#include <stdio.h>
#include <string.h>
-#include <libxml2_tree.h>
-#include <libxml2_parser.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_parser.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_buffer.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_xmlenc.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_xmlenc.c Thu Jul 22 16:49:54 2010 +0100
@@ -18,9 +18,9 @@
#include <stdio.h>
#include <string.h>
-#include <libxml2_tree.h>
-#include <libxml2_parser.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_parser.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_buffer.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_xmlsec.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_xmlsec.c Thu Jul 22 16:49:54 2010 +0100
@@ -14,7 +14,8 @@
#include <stdlib.h>
#include <stdio.h>
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+
#include "xmlsec_xmlsec.h"
#include "xmlsec_xmltree.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_xmltree.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_xmltree.c Thu Jul 22 16:49:54 2010 +0100
@@ -15,11 +15,12 @@
#include <string.h>
#include <ctype.h>
-#include <libxml2_tree.h>
-#include <libxml2_valid.h>
-#include <libxml2_xpath.h>
-#include <libxml2_xpathinternals.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_valid.h>
+#include <stdapis/libxml2/libxml2_xpath.h>
+#include <stdapis/libxml2/libxml2_xpathinternals.h>
+
#include "xmlsec_xmlsec.h"
#include "xmlsec_xmltree.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_xpath.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_xpath.c Thu Jul 22 16:49:54 2010 +0100
@@ -14,12 +14,13 @@
#include <stdlib.h>
#include <string.h>
-#include <libxml2_tree.h>
-#include <libxml2_xpath.h>
-#include <libxml2_xpathinternals.h>
-#include <libxml2_xpointer.h>
-#include <libxml2_valid.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_valid.h>
+#include <stdapis/libxml2/libxml2_xpath.h>
+#include <stdapis/libxml2/libxml2_xpathinternals.h>
+#include <stdapis/libxml2/libxml2_xpointer.h>
+
#include "xmlsec_xmlsec.h"
#include "xmlsec_xmltree.h"
--- a/xmlsecurityengine/xmlsec/src/xmlsec_xslt.c Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_xslt.c Thu Jul 22 16:49:54 2010 +0100
@@ -16,8 +16,8 @@
#include <stdlib.h>
#include <string.h>
-#include <libxml2_tree.h>
-#include <libxml2_xmlmemory.h> //added for symbian port
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_xmlmemory.h>//added for symbian port
#include <libxslt/libxslt_xslt.h>
#include <libxslt/libxslt_xsltinternals.h>
#include <libxslt/libxslt_transform.h>
--- a/xmlsecurityengine/xmlseccrypto/src/xmlsecc_evp.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlseccrypto/src/xmlsecc_evp.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -1386,7 +1386,7 @@
xmlNodePtr node, xmlSecKeyInfoCtxPtr keyInfoCtx) {
xmlSecKeyDataPtr data;
xmlNodePtr cur;
- RSA *rsa=NULL;
+ //RSA *rsa=NULL;
int ret;
xmlSecAssert2(id == xmlSecSymbianCryptoKeyDataRsaId, -1);
--- a/xmlsecurityengine/xmlseccrypto/src/xmlsecc_hmac.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlseccrypto/src/xmlsecc_hmac.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -13,7 +13,7 @@
#include <string.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#include <e32err.h> //definition of KErrNoMemory
#include "xmlsec_xmlsec.h"
--- a/xmlsecurityengine/xmlseccrypto/src/xmlsecc_x509.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlseccrypto/src/xmlsecc_x509.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -22,8 +22,8 @@
#include <errno.h>
#include <time.h>
-#include <libxml2_tree.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_globals.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_xmltree.h"
--- a/xmlsecurityengine/xmlseccrypto/src/xmlsecc_x509vfy.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlseccrypto/src/xmlsecc_x509vfy.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -20,7 +20,7 @@
#include <ctype.h>
#include <errno.h>
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
#include "xmlsec_xmlsec.h"
#include "xmlsec_xmltree.h"
--- a/xmlsecurityengine/xmlseccrypto/src/xmlsecc_x509wrapper.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlseccrypto/src/xmlsecc_x509wrapper.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -278,7 +278,7 @@
User::LeaveIfError( aCertStore->iSymbianCertStore->GetError() );
certdata=aCertStore->iSymbianCertStore->GetRetrieveCertData();
certX509 = CX509Certificate::NewLC(*certdata);
- aCertStore->iRootCertsSCS.Append((CX509Certificate *)certX509);
+ User::LeaveIfError(aCertStore->iRootCertsSCS.Append((CX509Certificate *)certX509));
CleanupStack::Pop(certX509);
}
aCertStore->iCertChain = CSymbianCertChain::NewL();
--- a/xmlsecurityengine/xmlsecwrapper/inc/xmlsecwglobalstate.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsecwrapper/inc/xmlsecwglobalstate.h Thu Jul 22 16:49:54 2010 +0100
@@ -18,7 +18,7 @@
#ifndef C_GLOABALSTATE_H
#define C_GLOABALSTATE_H
-#include <xmlengdomimplementation.h>
+#include <xml/dom/xmlengdomimplementation.h>
class CXmlSecKeyManager;
/**
--- a/xmlsecurityengine/xmlsecwrapper/inc/xmlsecwtemplate.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsecwrapper/inc/xmlsecwtemplate.h Thu Jul 22 16:49:54 2010 +0100
@@ -21,11 +21,11 @@
#include <e32std.h>
#include <f32file.h>
-#include <xmlengdom.h>
-#include <libxml2_tree.h>
-#include <libxml2_xmlmemory.h>
-#include <libxml2_parser.h>
-#include <libxml2_globals.h>
+#include <xml/dom/xmlengdom.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_xmlmemory.h>
+#include <stdapis/libxml2/libxml2_parser.h>
+#include <stdapis/libxml2/libxml2_globals.h>
class XmlSecTemplate
{
--- a/xmlsecurityengine/xmlsecwrapper/src/xmlsecwencrypt.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsecwrapper/src/xmlsecwencrypt.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -18,15 +18,15 @@
#include <e32std.h>
// XML Engine
-#include <libxml2_tree.h>
-#include <libxml2_xmlmemory.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_xmlmemory.h>
+#include <stdapis/libxml2/libxml2_globals.h>
-#include <xmlengmem.h>
-#include <xmlengxestd.h>
-#include <xmlengutils.h>
+#include <xml/utils/xmlengmem.h>
+#include <xml/utils/xmlengxestd.h>
+#include <xml/utils/xmlengutils.h>
-#include <xmlengdom.h>
+#include <xml/dom/xmlengdom.h>
// XML Sec
#include "xmlsec_crypto.h"
--- a/xmlsecurityengine/xmlsecwrapper/src/xmlsecwinit.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsecwrapper/src/xmlsecwinit.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -15,8 +15,8 @@
*
*/
// XML Engine
-#include <libxml2_globals.h>
-#include <xmlengxestd.h>
+#include <stdapis/libxml2/libxml2_globals.h>
+#include <xml/utils/xmlengxestd.h>
// XML Sec
#include "xmlsec_crypto.h"
--- a/xmlsecurityengine/xmlsecwrapper/src/xmlsecwinternalutils.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsecwrapper/src/xmlsecwinternalutils.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -18,7 +18,7 @@
#include <e32base.h>
-#include <libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_tree.h>
#include "xmlsec_error_flag.h"
--- a/xmlsecurityengine/xmlsecwrapper/src/xmlsecwkeymanager.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsecwrapper/src/xmlsecwkeymanager.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -18,8 +18,9 @@
#include <e32base.h>
-#include <libxml2_globals.h>
-#include <xmlengmem.h>
+#include <stdapis/libxml2/libxml2_globals.h>
+
+#include <xml/utils/xmlengmem.h>
#include "xmlsec_crypto.h"
#include "xmlsec_xmlsec.h"
--- a/xmlsecurityengine/xmlsecwrapper/src/xmlsecwsign.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsecwrapper/src/xmlsecwsign.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -16,17 +16,18 @@
*/
// XML Engine
-#include <libxml2_tree.h>
-#include <libxml2_xmlmemory.h>
-#include <libxml2_parser.h>
-#include <libxml2_globals.h>
+#include <stdapis/libxml2/libxml2_tree.h>
+#include <stdapis/libxml2/libxml2_xmlmemory.h>
+#include <stdapis/libxml2/libxml2_parser.h>
+#include <stdapis/libxml2/libxml2_globals.h>
-#include <xmlengmem.h>
-#include <xmlengxestd.h>
-#include <xmlengutils.h>
-#include <xmlengxestrings.h>
+#include <xml/utils/xmlengmem.h>
+#include <xml/utils/xmlengxestd.h>
+#include <xml/utils/xmlengutils.h>
-#include <xmlengdom.h>
+#include <xml/utils/xmlengxestrings.h>
+
+#include <xml/dom/xmlengdom.h>
// XML Sec
#include "xmlsec_crypto.h"
--- a/xmlsecurityengine/xmlsecwrapper/src/xmlsecwtemplate.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsecurityengine/xmlsecwrapper/src/xmlsecwtemplate.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -26,9 +26,9 @@
#include "xmlsec_xmlsec.h"
#include "xmlsec_xmltree.h"
-#include <xmlengdocument.h>
-#include <xmlengdomparser.h>
-#include <xmlengutils.h>
+#include <xml/dom/xmlengdocument.h>
+#include <xml/dom/xmlengdomparser.h>
+#include <xml/utils/xmlengutils.h>
// ---------------------------------------------------------------------------
// Set Template
--- a/xmlsrv_info/xmlsrv_metadata/xmlsrv_metadata.mrp Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsrv_info/xmlsrv_metadata/xmlsrv_metadata.mrp Thu Jul 22 16:49:54 2010 +0100
@@ -1,19 +1,3 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
component xmlsrv_metadata
source \sf\os\xmlsrv\xmlsrv_info\xmlsrv_metadata
source \sf\os\xmlsrv\package_definition.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/cxml_library_api.metaxml Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" ?>
+<api id="04ef59b95116027992902fad17fab34a" dataversion="1.0">
+ <name>cXmlLibrary API</name>
+ <description>Compat XML Parser Library API.</description>
+ <type>c++</type>
+ <subsystem>BrowserUtilities</subsystem>
+ <libs>
+ </libs>
+ <release category="domain" sinceversion="3.2"/>
+ <attributes>
+ <htmldocprovided>no</htmldocprovided>
+ <adaptation>no</adaptation>
+ </attributes>
+</api>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Build information for the cXmlLibrary API.
+*
+*/
+#include <platform_paths.hrh>
+//#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh"
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+// All in one header file for clients.
+../inc/nw_cXML_Parser.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_cXML_Parser.h)
+
+// Individual header files for cXML Parser
+../inc/cxml_proj.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/cxml_proj.h)
+../inc/cxml_file_if.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/cxml_file_if.h)
+../inc/cxml_nw2cxmltypes.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/cxml_nw2cxmltypes.h)
+../inc/cxml_str.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/cxml_str.h)
+../inc/cxml_type_def.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/cxml_type_def.h)
+../inc/nw_dom.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_dom.h)
+../inc/nw_dom_document.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_dom_document.h)
+../inc/nw_dom_node.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_dom_node.h)
+../inc/nw_dom_element.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_dom_element.h)
+../inc/nw_dom_attribute.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_dom_attribute.h)
+../inc/nw_dom_text.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_dom_text.h)
+../inc/nw_encoder_domencoder.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_encoder_domencoder.h)
+../inc/nw_encoder_stringtable.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_encoder_stringtable.h)
+../inc/nw_encoder_wbxmlwriter.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_encoder_wbxmlwriter.h)
+../inc/nw_string_string.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_string_string.h)
+../inc/nw_string_char.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_string_char.h)
+../inc/nw_tinydom.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_tinydom.h)
+../inc/nw_tinydom_utils.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_tinydom_utils.h)
+../inc/nw_tinytree.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_tinytree.h)
+../inc/nw_tinytree_ebuffer.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_tinytree_ebuffer.h)
+../inc/nw_tinytree_treevector.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_tinytree_treevector.h)
+../inc/nw_wbxml_event.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_wbxml_event.h)
+../inc/nw_wbxml_opaque.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_wbxml_opaque.h)
+../inc/nw_wbxml_token.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_wbxml_token.h)
+../inc/nw_wbxml_dictionary.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_wbxml_dictionary.h)
+../inc/nw_wbxml_reader.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_wbxml_reader.h)
+../inc/nw_wbxml_parse.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_wbxml_parse.h)
+../inc/nw_wbxml_document.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_wbxml_document.h)
+../inc/nw_xmlp_xmlreader.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_xmlp_xmlreader.h)
+../inc/nw_xmlp_xmlparser.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_xmlp_xmlparser.h)
+../inc/nw_xmlp_xmlp2wbxml.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nw_xmlp_xmlp2wbxml.h)
+../inc/nwx_status.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/cxml/nwx_status.h)
+
+PRJ_MMPFILES
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/cxml_file_if.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Provides a single header for the cXML Parser
+*
+*/
+
+
+
+#ifndef _CXML_FILE_IF_H_
+#define _CXML_FILE_IF_H_
+
+#include <xml/cxml/cxml_proj.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /** ----------------------------------------------------------------------- **
+ @function: CXML_File_Read
+ @synopsis: Read the contents from the file and store in a buffer.
+ @scope: public
+
+ @parameters:
+ [in] fileName
+
+
+ [out] CXML_Uint8* buf
+ Buffer to store the file contents and buffer need to freed from the
+ calling function.
+ (-1): In case of error.
+
+
+ [out] CXML_Uint32* bufferLen
+ Length of the Buffer
+
+ @description: Read contents from the file and store these in a buffer to be
+ read by the cXML parser.
+
+ @returns:
+ In case of file related failures: Error codes is returned defined in
+ nwx_status.h
+ NW_STAT_FAILURE : For any general error.
+ NW_STAT_SUCCESS: For success
+ -----------------------------------------------------------------------------------**/
+
+IMPORT_C
+NW_Status_t CXML_Read_From_File(NW_Byte* fileName,NW_Uint8** buf, NW_Int32* bufferLen);
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif //_CXML_FILE_IF_H_
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/cxml_nw2cxmlTypes.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2003 - 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef CXML_NW2CXMLTYPES_H
+#define CXML_NW2CXMLTYPES_H
+
+#include <xml/cxml/cxml_type_def.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+
+/* Data types */
+#define NW_Bool CXML_Bool
+#define NW_Byte CXML_Byte
+#define NW_Word CXML_Word
+#define NW_Dword CXML_Dword
+#define NW_Uint8 CXML_Uint8
+#define NW_Uint16 CXML_Uint16
+#define NW_Uint32 CXML_Uint32
+#define NW_Int8 CXML_Int8
+#define NW_Int16 CXML_Int16
+#define NW_Int32 CXML_Int32
+#define NW_Ucs2 CXML_Ucs2
+
+#define NW_TRUE CXML_TRUE
+#define NW_FALSE CXML_FALSE
+#define NW_ASSERT(x) CXML_ASSERT(x)
+#define NW_REQUIRED_PARAM(x) CXML_REQUIRED_PARAM(x)
+
+#define NW_UINT16_MAX CXML_UINT16_MAX
+#define NW_UINT32_MAX CXML_UINT32_MAX
+#define NW_INT32_MIN CXML_INT32_MIN
+#define NW_INT32_MAX CXML_INT32_MAX
+#define NW_UINT16_CAST(expr) CXML_UINT16_CAST(expr)
+#define NW_UINT32_CAST(expr) CXML_UINT32_CAST(expr)
+#define NW_INT32_CAST(expr) CXML_INT32_CAST(expr)
+#define NW_Buffer_t CXML_Buffer_t
+
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* CXML_NW2CXMLTYPES_H */
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/cxml_proj.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2003 - 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: cxml_proj.h
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+#ifndef CXML_PROJ_H
+#define CXML_PROJ_H
+
+
+
+#ifndef NOKIA_MOBILE_BROWSER
+
+#include <xml/cxml/cxml_nw2cxmlTypes.h>
+#endif
+
+#include <xml/cxml/nwx_status.h>
+
+#include <xml/cxml/cxml_type_def.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* CXML_PROJ_H */
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/cxml_str.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2003 - 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/***************************************************************************
+** File: cxml_str.h
+** Purpose: Provides the interfaces to CXML string API
+**************************************************************************/
+
+#ifndef CXML_STR_H
+#define CXML_STR_H
+
+#warning The CXML API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Includes
+*/
+#include <xml/cxml/cxml_type_def.h>
+
+CXML_Ucs2 CXML_Str_ToLower(const CXML_Ucs2 ch);
+CXML_Ucs2 CXML_Str_ToUpper(const CXML_Ucs2 ch);
+CXML_Int32 CXML_Str_Isspace(const CXML_Ucs2 ch);
+CXML_Int32 CXML_Str_Isdigit(const CXML_Ucs2 ch);
+CXML_Int32 CXML_Str_Isxdigit(const CXML_Ucs2 ch);
+void CXML_Str_Delete(CXML_Ucs2 *string);
+CXML_Int8*CXML_Str_CvtToAscii(const CXML_Ucs2 *string);
+CXML_Uint32 CXML_Asc_strlen(const CXML_Int8 *s);
+CXML_Ucs2 *CXML_Str_CvtFromAscii(const CXML_Int8 *string);
+CXML_Int32 CXML_Str_StrcmpConst(const CXML_Ucs2 *string1,const CXML_Ucs2 *string2);
+CXML_Int32 CXML_Str_Stricmp(const CXML_Ucs2 *string1,const CXML_Ucs2 *string2);
+
+
+CXML_Int8 *CXML_Asc_strcpy(CXML_Int8 *s1, const CXML_Int8 *s2);
+
+CXML_Int8 *CXML_Asc_strcat(CXML_Int8 *s1, const CXML_Int8 *s2);
+
+CXML_Int8 *CXML_Asc_strncpy(CXML_Int8 *destination, const CXML_Int8 *source, const CXML_Uint32 count);
+
+CXML_Int8 *CXML_Asc_strncat(CXML_Int8 *s1, const CXML_Int8 *s2,const CXML_Uint32 count);
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* CXML_STR_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/cxml_type_def.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,150 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef CXML_TYPE_DEF_H
+#define CXML_TYPE_DEF_H
+
+#warning The CXML API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information
+
+/*
+ * ANSI/ISO C header files needed to define basic data types
+ * (ie. NULL, etc)
+ */
+#include <stdlib.h>
+#include <assert.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Data types in cXML */
+//typedef unsigned char bool8;
+typedef unsigned char byte;
+typedef unsigned short int word;
+typedef unsigned long int dword;
+
+typedef unsigned char uint8;
+typedef unsigned short int uint16;
+typedef unsigned long int uint32;
+
+typedef signed char int8;
+typedef signed short int int16;
+typedef signed long int int32;
+
+typedef unsigned char CXML_Bool; /* NW_FALSE, NW_TRUE */
+typedef byte CXML_Byte; /* 0 ... 0xFF */
+typedef word CXML_Word; /* 0 ... 0xFFFF */
+typedef dword CXML_Dword; /* 0 ... 0xFFFFFFFF */
+
+typedef uint8 CXML_Uint8; /* 0 ... 255 */
+typedef uint16 CXML_Uint16; /* 0 ... 65535 */
+typedef uint32 CXML_Uint32; /* 0 ... 4294967295 */
+
+typedef int8 CXML_Int8; /* -128 ... +127 */
+typedef int16 CXML_Int16; /* -32768 ... +32767 */
+typedef int32 CXML_Int32; /* -2147483648 ... +2147483647 */
+
+typedef unsigned short CXML_Ucs2; /* 0 ... 65535 */
+
+typedef CXML_Uint32 NW_TinyTree_Offset_t;
+
+#define CXML_ASSERT(expr) assert(((CXML_Uint32)(expr)) != 0)
+/* Use following to catch the ASSERT in Wins
+#if defined(__WINS__) && !defined(__WINSCW__)
+int kimono_assert ();
+#define CXML_ASSERT(expr) ((((CXML_Uint32)(expr)) != 0) || kimono_assert())
+#else
+#define CXML_ASSERT(expr) assert(((CXML_Uint32)(expr)) != 0)
+#endif
+*/
+
+#define CXML_TRUE ((CXML_Bool) 0x01U)
+#define CXML_FALSE ((CXML_Bool) 0x00U)
+
+#define CXML_UINT16_MAX ((NW_Uint16) 0xFFFFU)
+#define CXML_UINT32_MAX ((NW_Uint32) 0xFFFFFFFFU)
+#define CXML_INT32_MIN ((NW_Int32) 0x80000000U)
+#define CXML_INT32_MAX ((NW_Int32) 0x7FFFFFFFU)
+
+#define CXML_UINT16_CAST(expr) \
+ ( (CXML_ASSERT((-(CXML_Int16)(expr)) <= 0 && \
+ ((CXML_Uint16)(expr)) <= CXML_UINT16_MAX)), \
+ ((CXML_Uint16)(expr)) )
+
+#define CXML_UINT32_CAST(expr) \
+ ( (CXML_ASSERT((-(CXML_Int32)(expr)) <= 0 && \
+ ((CXML_Uint32)(expr)) <= CXML_UINT32_MAX)), \
+ ((CXML_Uint32)(expr)) )
+
+#define CXML_INT32_CAST(expr) \
+ ( (CXML_ASSERT(((CXML_Int32)(expr)) >= CXML_INT32_MIN && \
+ ((CXML_Int32)(expr)) <= CXML_INT32_MAX)), \
+ ((CXML_Int32)(expr)) )
+
+
+/* Vector types */
+typedef CXML_Uint32 CXML_Vector_Metric_t;
+#define CXML_Vector_AtEnd ((CXML_Vector_Metric_t) ~0)
+#define CXML_Vector_AtFront ((CXML_Vector_Metric_t) 0)
+#define CXML_SEGMENT_LIST_INCREMENT 4
+
+
+#define CXML_ASCII_NULL 0x00
+#define CXML_ASCII_UPPER_A 0x41
+#define CXML_ASCII_UPPER_F 0x46
+#define CXML_ASCII_UPPER_Z 0x5A
+
+#define CXML_ASCII_LOWER_A 0x61
+#define CXML_ASCII_0 0x30
+#define CXML_ASCII_LOWER_F 0x66
+#define CXML_ASCII_9 0x39
+#define CXML_ASCII_LOWER_Z 0x7A
+
+#define CXML_ASCII_SPACE 0x20
+#define CXML_ASCII_HT 0x09
+#define CXML_ASCII_LF 0x0a
+#define CXML_ASCII_VT 0x0b
+#define CXML_ASCII_FF 0x0c
+#define CXML_ASCII_CR 0x0d
+
+/*
+ * Used to supress compiler warnings about required,
+ * but unused function parameters
+ */
+#define CXML_REQUIRED_PARAM(param) if (param) {};
+
+/*
+** Type Declarations
+*/
+typedef struct {
+ CXML_Uint32 length; /* length of the used part of the buffer */
+ CXML_Uint32 allocatedLength; /* How much space was really allocated */
+ CXML_Byte *data; /* the real data */
+} CXML_Buffer_t;
+
+
+
+
+/* Forward declarations */
+typedef struct CXML_Vector_s CXML_Vector_t;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* CXML_TYPE_DEF_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_cXML_Parser.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Provides a single header for the cXML Parser
+*
+*/
+
+
+
+#ifndef NW_CXML_PARSER_H
+#define NW_CXML_PARSER_H
+
+// INCLUDES
+
+// This header file includes all public API headers for the cXML Parser.
+
+
+#include <xml/cxml/nw_xmlp_xmlreader.h>
+#include <xml/cxml/nw_xmlp_xmlparser.h>
+#include <xml/cxml/nw_wbxml_reader.h>
+#include <xml/cxml/nw_wbxml_parse.h>
+#include <xml/cxml/nw_dom_document.h>
+#include <xml/cxml/nw_dom_node.h>
+#include <xml/cxml/nw_dom_element.h>
+#include <xml/cxml/nw_dom_attribute.h>
+#include <xml/cxml/nw_dom_text.h>
+#include <xml/cxml/nw_string_string.h>
+#include <xml/cxml/nw_string_char.h>
+#include <xml/cxml/nw_wbxml_dictionary.h>
+#include <xml/cxml/nw_encoder_domencoder.h>
+#include <xml/cxml/nw_wbxml_document.h>
+#include <xml/cxml/cxml_file_if.h>
+
+// Currently needed for cleanup.
+#include <xml/cxml/nw_tinydom_utils.h>
+
+#endif // NW_CXML_PARSER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_dom.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef NW_DOM_H
+#define NW_DOM_H
+
+#include <xml/cxml/cxml_proj.h>
+#include <xml/cxml/nw_wbxml_parse.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+#ifdef __cplusplus
+} // extern "C" {
+#endif /* __cplusplus */
+
+#endif /* NW_DOM_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_dom_attribute.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,1293 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_DOM
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+#ifndef NW_DOM_ATTRIBUTE_H
+#define NW_DOM_ATTRIBUTE_H
+
+#include <xml/cxml/cxml_proj.h>
+#include <xml/cxml/nw_dom_node.h>
+#include <xml/cxml/nw_tinytree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_DOM_AttributeListIterator
+
+ @synopsis: Iterates over the list of attributes of an element.
+
+ @scope: public
+ @variables:
+ NW_TinyDom_AttrListHandle_t attrListHandle
+ this object
+
+ NW_TinyTree_Node_t* node
+ default
+
+ @description:
+
+ The NW_DOM_AttributeListIterator_t data type can be
+ thought of as a replacement for the NamedNodeMap
+ structure specified in the W3C DOM specification. In
+ this specification, performing getAttributes on an
+ element results in getting a readonly NamedNodeMap
+ structure, whereas in WAP DOM it results in getting a
+ pointer to the NW_DOM_AttributeListIterator_t data
+ type.
+
+ The main difference between the two is that
+ NamedNodeMap allows you to get items using an index,
+ whereas using NW_DOM_AttributeListIterator_t you can
+ iterate over a list of attributes. Other
+ functionality available in NamedNodeMap, such as
+ getNamedItem, setNamedItem, removeNamedItem, is
+ already present in the APIs defined for an
+ ElementNode.
+
+ NW_DOM_AttributeListIterator_t is used to iterate over
+ the list of attributes of an element. Note that when a
+ tree is built by the parser, only the first attribute
+ of an element has a node of its own. For example,
+ <card id="card1" title="example"> has 2 attributes,
+ but only 1 node is allocated, pointing to the first
+ attribute start. In a read-write tree, each added
+ attribute gets a new node.
+** ----------------------------------------------------------------------- **/
+typedef struct NW_DOM_AttributeListIterator_s {
+ /* Used to iterate over the original attributes */
+ NW_TinyDom_AttrListHandle_t attrListHandle;
+ /* Used to iterate over added attributes */
+ NW_TinyTree_Node_t* node;
+}NW_DOM_AttributeListIterator_t;
+
+/* An attribute value in the DOM API */
+
+typedef NW_TinyDom_AttrVal_t NW_DOM_AttrVal_t;
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_DOM_AttributeHandle
+
+ @synopsis: default
+
+ @scope: public
+ @variables:
+ NW_TinyDom_AttributeHandle_t tinyHandle
+ The attribute handle.
+
+ NW_TinyTree_Node_t* node
+ default
+
+ @description: NW_DOM_AttributeHandle_t is used as an extension to
+ support WBXML attributes. In WBXML, attibutes can
+ consist of an attribute start token and several value
+ components. Moreover, an attribute start token can
+ represent either the attribute name, the attribute
+ name and the initial part of the value (a so-called
+ value prefix), or the complete attribute name and
+ value.This type has methods that return these elements
+ and allow iteration over the values. Attribute
+ handles are also supported for XML documents since
+ applications may wish to use the attribute list
+ iterator mechanism for these documents. Attribute list
+ iterators return attribute handles.
+
+ NW_DOM_AttributeHandle is used to iterate over the
+ values of an attribute.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_DOM_AttributeHandle_s{
+ NW_TinyDom_AttributeHandle_t tinyHandle;
+ NW_TinyTree_Node_t* node;
+}NW_DOM_AttributeHandle_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttributeListIterator_new
+
+ @synopsis: Constructor.
+
+ @scope: public
+
+ @description: Allocates memory for NW_DOM_AttributeListIterator.
+ Returns NULL in case of failure to do so.
+
+ @returns: NW_DOM_AttributeListIterator_t*
+ New iterator.
+
+ ** ----------------------------------------------------------------------- **/
+NW_DOM_AttributeListIterator_t*
+NW_DOM_AttributeListIterator_new(void);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttributeListIterator_initialize
+
+ @synopsis: Initialize the iterator.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_AttributeListIterator_t* handle
+ The attribute handle.
+
+ @description: Initialize the iterator.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns this value.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_AttributeListIterator_initialize(NW_DOM_AttributeListIterator_t* handle);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttributeListIterator_delete
+
+ @synopsis: Delete the iterator.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_AttributeListIterator_t* handle
+ The attribute handle.
+
+ @description: Delete the iterator.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns this value.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_AttributeListIterator_delete(NW_DOM_AttributeListIterator_t* handle);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttributeListIterator_getNextAttribute
+
+ @synopsis: Get next attribute.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_AttributeListIterator_t* listIterator
+ Iterator for the attribute list.
+
+ [out] NW_DOM_AttributeHandle_t* attributeHandle
+ A handle for an attribute.
+
+ @description: Get next attribute.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_DOM_BAD_INPUT_PARAM_ERR]
+ Error on input.
+
+ [NW_STAT_WBXML_ITERATE_MORE]
+ More attributes available.
+
+ [NW_STAT_WBXML_ITERATE_DONE]
+ No more attributes available.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_AttributeListIterator_getNextAttribute(NW_DOM_AttributeListIterator_t* listIterator,
+ NW_DOM_AttributeHandle_t* attributeHandle);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttributeHandle_new
+
+ @synopsis: Create new handle.
+
+ @scope: public
+
+ @description: Create new handle.
+
+ @returns: NW_DOM_AttributeHandle_t*
+ Allocates memory for new handle.
+
+ ** ----------------------------------------------------------------------- **/
+NW_DOM_AttributeHandle_t*
+NW_DOM_AttributeHandle_new(void);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttributeHandle_delete
+
+ @synopsis: Delete handle.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_AttributeHandle_t* handle
+ The attribute handle.
+
+ @description: Delete handle.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STATUS_SUCCESS]
+ Always returns NW_STATUS_SUCCESS.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_AttributeHandle_delete(NW_DOM_AttributeHandle_t* handle);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttributeHandle_initWithNode
+
+ @synopsis: Initializes and Attribute Handle with an attribute node.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_AttributeHandle_t* handle
+ The attribute handle.
+
+ [in] NW_TinyDom_Parser_t* parser
+ Parser to assign.
+
+ [in] NW_TinyTree_Node_t* node
+ Node to attach to handle.
+
+ @description: Initializes and Attribute Handle with an attribute node.
+ Note that only some attributes have nodes of their own.
+ Such attributes are initilized by this method.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returned.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_AttributeHandle_initWithNode(NW_DOM_AttributeHandle_t* handle,
+ NW_TinyDom_Parser_t* parser,
+ NW_TinyTree_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttributeHandle_initWithOffset
+
+ @synopsis: Initializes and Attribute Handle with a offset.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_AttributeHandle_t* handle
+ The attribute handle.
+
+ [in] NW_TinyDom_Parser_t* parser
+ Parser to use.
+
+ [in] NW_TinyTree_Offset_t offset
+ Offset to use.
+ @description: Initializes and Attribute Handle with a offset.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returned.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_AttributeHandle_initWithOffset(NW_DOM_AttributeHandle_t* handle,
+ NW_TinyDom_Parser_t* parser,
+ NW_TinyTree_Offset_t offset);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttributeHandle_initWithStartToken
+
+ @synopsis: Initializes an Attribute Handle with a WBXML start token.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_AttributeHandle_t* handle
+ The attribute handle.
+
+ [in] NW_TinyDom_Parser_t* parser
+ Parser to use.
+
+ [in] NW_Uint16 token
+ The attribute start token with page.
+
+ @description: Initializes an Attribute Handle with WBXML start token.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Success
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Out of memory.
+
+ [NW_STAT_FAILURE]
+ Failure
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_AttributeHandle_initWithStartToken(NW_DOM_AttributeHandle_t* handle,
+ NW_TinyDom_Parser_t* parser,
+ NW_Uint16 fqToken);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttributeHandle_addVal
+
+ @synopsis: Appends an attribute value to an existing attribute handle
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_AttributeHandle_t* handle
+ The attribute handle.
+
+ [in] NW_DOM_AttrVal_t* value
+ The attribute value to append to handle
+
+ @description: Appends an attribute value to an existing attribute handle
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Success
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Out of memory.
+
+ [NW_STAT_FAILURE]
+ Failure
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_AttributeHandle_addVal(NW_DOM_AttributeHandle_t* handle,
+ NW_DOM_AttrVal_t* value);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttributeHandle_getName
+
+ @synopsis: Gets attribute name.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_AttributeHandle_t* handle
+ The attribute handle.
+
+ [out] NW_String_t* name
+ Attribute name without prefix.
+
+ @description: Returns the attribute name (without prefix if any)
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Name returned.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Ran out of memory.
+
+ [NW_STAT_DOM_NO_STRING_RETURNED]
+ Name not found.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_AttributeHandle_getName(NW_DOM_AttributeHandle_t* handle,
+ NW_String_t* name);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttributeHandle_getToken
+
+ @synopsis: Gets the token for the Attribute.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_AttributeHandle_t* handle
+ The attribute handle.
+
+ @description: Returns the token for the Attribute.
+
+ @returns: An attribute start token represented as two bytes: the
+ high order 8 bits represent the code page, the remaining
+ bits represent the token; returns 0 if the handle is
+ invalid or the document is not a WBXML document.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Uint16
+NW_DOM_AttributeHandle_getToken(NW_DOM_AttributeHandle_t* handle);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttributeHandle_getValuePrefix
+
+ @synopsis: Gets attribute prefix.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_AttributeHandle_t* handle
+ The attribute handle.
+
+ [out] NW_String_t* prefix
+ Value prefix for the attribute.
+
+ @description: Returns the attribute prefix (for e.g. href="http://"
+ will return "http://". This is a WBXML-specific extension.
+ Behavior is undefined for non-WBXML attributes.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Got prefix.
+
+ [NW_STAT_DOM_NO_VALUE_PREFIX]
+ Error
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Error
+
+ [NW_STAT_DOM_NO_STRING_RETURNED]
+ Error
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_AttributeHandle_getValuePrefix(NW_DOM_AttributeHandle_t* handle,
+ NW_String_t* prefix);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttributeHandle_getNameWithPrefix
+
+ @synopsis: Gets the attribute name.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_AttributeHandle_t* handle
+ The attribute handle.
+
+ [out] NW_String_t* name
+ Attribute name.
+
+ @description: Returns the attribute name (with prefix if any).
+ This is a WBXML-specific extension. Behavior is undefined
+ for non-WBXML attributes.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Name returned.
+
+ [NW_STAT_DOM_NO_STRING_RETURNED]
+ Error
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_AttributeHandle_getNameWithPrefix(NW_DOM_AttributeHandle_t* handle,
+ NW_String_t* name);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttributeHandle_getNextVal
+
+ @synopsis: Get next value from list.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_AttributeHandle_t* handle
+ The attribute handle.
+
+ [out] NW_DOM_AttrVal_t* attrVal
+ The next attribute value.
+
+ @description: Gets a value if one is still available through the
+ iterator. Return status indicates if this is a valid
+ value or the iterator has hit the end of the list.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_WBXML_ITERATE_MORE]
+ Valid value, more in list.
+
+ [NW_STAT_WBXML_ITERATE_DONE]
+ Not valid, done with list.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_AttributeHandle_getNextVal(NW_DOM_AttributeHandle_t* handle,
+ NW_DOM_AttrVal_t* attrVal);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttributeHandle_getValue
+
+ @synopsis: Gets string representation of attribute value.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_AttributeHandle_t* handle
+ The attribute handle.
+
+ [out] NW_String_t* value
+ The attribute value as a string.
+
+ @description: Gets string representation of attribute value.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Value returned.
+
+ [NW_STAT_DOM_NO_STRING_RETURNED]
+ No string found.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_AttributeHandle_getValue(NW_DOM_AttributeHandle_t* handle,
+ NW_String_t* value);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttributeHandle_getEncoding
+
+ @synopsis: Returns the document encoding.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_AttributeHandle_t* handle
+ The attribute handle.
+
+ @description: Returns the document encoding.
+
+ @returns: NW_Uint32
+ Attribute encoding.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Uint32
+NW_DOM_AttributeHandle_getEncoding(NW_DOM_AttributeHandle_t* handle);
+
+
+/* ----------------------------------------------------------------------- **
+ Attribute values:
+ In WBXML documents attribute values can be a combination of string,
+ entity, extension, opaque, or token.
+** ----------------------------------------------------------------------- **/
+
+#define NW_DOM_ATTR_VAL_STRING 1
+#define NW_DOM_ATTR_VAL_EXTENSION 2
+#define NW_DOM_ATTR_VAL_ENTITY 3
+#define NW_DOM_ATTR_VAL_OPAQUE 4
+#define NW_DOM_ATTR_VAL_TOKEN 5
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttrVal_new
+
+ @synopsis: Constructor.
+
+ @scope: public
+
+ @description: Constructor.
+
+ @returns: NW_DOM_AttrVal_t*
+ New attribute value.
+
+ ** ----------------------------------------------------------------------- **/
+NW_DOM_AttrVal_t*
+NW_DOM_AttrVal_new(void);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttrVal_initFromString
+
+ @synopsis: Initialize attribute value from string.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_AttrVal_t* val
+ The AttrVal structure.
+
+ [in] NW_String_t* string
+ String with which to initialize AttrVal.
+
+ @description: Initializes an AttrVal of type NW_DOM_ATTR_VAL_STRING
+ from a string.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Initialized.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_AttrVal_initFromString (NW_DOM_AttrVal_t* val,
+ NW_String_t* string);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttrVal_initFromEntity
+
+ @synopsis: Initializes an attribute value.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_AttrVal_t* val
+ The AttrVal structure.
+
+ [in] NW_Uint32 entity
+ Entity with which to initialize the attribute value.
+
+ @description: Initializes an AttrVal of type NW_DOM_ATTR_VAL_ENTITY.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_AttrVal_initFromEntity (NW_DOM_AttrVal_t* val,
+ NW_Uint32 entity);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttrVal_initFromExtension
+
+ @synopsis: Initializes an attribute value.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_AttrVal_t* val
+ The AttrVal structure.
+
+ [in] NW_Uint16 token
+ Token that specifies the extension type.
+
+ [in] NW_String_t* str
+ String extension value.
+
+ @description: Initializes an AttrVal of type NW_DOM_ATTR_VAL_EXTENSION.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_AttrVal_initFromExtension (NW_DOM_AttrVal_t* val,
+ NW_Uint16 token,
+ NW_String_t* str);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttrVal_initFromExtensionInt
+
+ @synopsis: Initializes an attribute value with the particular extension
+ types EXT_T_[0,1,2] + uint32 where uint32 is not an
+ index into the string table.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_AttrVal_t* val
+ The AttrVal structure.
+
+ [in] NW_Uint16 token
+ Token from which the AttrVal will be initialized.
+ The token must be one of EXT_T_[0,1,2].
+
+ [in] NW_Uint32 x
+ The associated 32-bit unsigned value.
+
+ @description: Initializes an AttrVal with the particular extension
+ types EXT_T_[0,1,2] + uint32 where uint32 is not an
+ index into the string table.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Success.
+
+ [NW_STAT_FAILURE]
+ Failure if token is not one of EXT_T_[0,1,2].
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_AttrVal_initFromExtensionInt (NW_DOM_AttrVal_t* val,
+ NW_Uint16 token,
+ NW_Uint32 x);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttrVal_initFromOpaque
+
+ @synopsis: Initializes an attribute value.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_AttrVal_t* val
+ The AttrVal structure.
+
+ [in] NW_Uint32 length
+ Length of the data from which val will be initialized.
+
+ [in] NW_Byte* data
+ Data from which val will be initialized.
+
+ @description: Initializes an AttrVal of type NW_DOM_ATTR_VAL_OPAQUE.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_AttrVal_initFromOpaque (NW_DOM_AttrVal_t* val,
+ NW_Uint32 length,
+ NW_Byte* data);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttrVal_initFromToken
+
+ @synopsis: Initializes an AttrVal of type NW_DOM_ATTR_VAL_TOKEN
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_AttrVal_t* val
+ The AttrVal structure.
+
+ [in] NW_Uint16 token
+ Token from which AttrVal will be initialized. The token
+ represents the attribute value and includes codepage
+ information in its most significant 8 bits.
+
+ @description: Initializes an AttrVal of type NW_DOM_ATTR_VAL_TOKEN
+ with a token.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_AttrVal_initFromToken (NW_DOM_AttrVal_t* val, NW_Uint16 token);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttrVal_delete
+
+ @synopsis: Destructor.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_AttrVal_t* attrVal
+ The AttrVal structure.
+
+ @description: Destructor.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_AttrVal_delete (NW_DOM_AttrVal_t* attrVal);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttrVal_getType
+
+ @synopsis: Returns the type of attribute value.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_AttrVal_t* val
+ The AttrVal structure.
+
+ @description: Returns the type of attribute value.
+
+ @returns: NW_Uint16
+ NW_DOM_ATTR_VAL enumeration.
+
+ [NW_DOM_ATTR_VAL_EXTENSION]
+ Extension
+ [NW_DOM_ATTR_VAL_STRING]
+ String
+ [NW_DOM_ATTR_VAL_ENTITY]
+ Entity
+ [NW_DOM_ATTR_VAL_TOKEN]
+ Token
+ [NW_DOM_ATTR_VAL_OPAQUE]
+ Opaque
+ [null]
+ Unknown type.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Uint16
+NW_DOM_AttrVal_getType(NW_DOM_AttrVal_t* val);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttrVal_setType
+
+ @synopsis: Sets the type of attribute value.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_AttrVal_t* val
+ The AttrVal structure.
+
+ [in] NW_Uint16 type
+ See NW_DOM_AttrVal_getType for values.
+
+ @description: Sets the type of attribute value.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_AttrVal_setType(NW_DOM_AttrVal_t* val, NW_Uint16 type);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttrVal_toString
+
+ @synopsis: Gets representation of value.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_AttrVal_t* av
+ The AttrVal structure.
+
+ [in-out] NW_String_t* str
+ String representation of attribute value.
+
+ [in] NW_Uint32 encoding
+ default
+
+ @description: Gets representation of value.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ String returned.
+
+ [NW_STAT_DOM_NO_STRING_RETURNED]
+ Invalid type of AttrVal.
+
+ [NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED]
+ Invalid encoding.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_AttrVal_toString(NW_DOM_AttrVal_t* av,
+ NW_String_t* str,
+ NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttrVal_getEntity
+
+ @synopsis: Returns the associated entity.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_AttrVal_t* item
+ The AttrVal structure.
+
+ @description: Returns the associate entity if attribute value is of
+ type NW_DOM_ATTR_VAL_ENTITY.
+
+ @returns: NW_Uint32
+ The entity if val is of type entity; otherwise, 0.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Uint32
+NW_DOM_AttrVal_getEntity(NW_DOM_AttrVal_t* item);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttrVal_getExtensionToken
+
+ @synopsis: Returns extension token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_AttrVal_t* val.
+ The AttrVal structure.
+
+ [out] NW_Uint16* token
+ The token.
+
+ @description: If AttrVal is of type NW_DOM_ATTR_VAL_EXTENSION then
+ assigns token to out parameter and returns NW_STAT_SUCCESS.
+ If not, it returns NW_STAT_FAILURE.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Success.
+
+ [NW_STAT_FAILURE]
+ If AttrVal is of wrong type.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_AttrVal_getExtensionToken(NW_DOM_AttrVal_t* val,
+ NW_Uint16* token);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttrVal_getExtension
+
+ @synopsis: Returns the extension if the attribute.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_AttrVal_t* item
+ The AttrVal structure.
+
+ [out] NW_String_t* str
+ The string associated with the extension.
+
+ @description: Returns the associated extension type if attribute value
+ is of type NW_DOM_ATTR_VAL_EXTENSION.
+
+ @returns: NW_Uint16
+ The extension token; or 0 if there are invalid input
+ parameters or if AttrVal is not of type extension.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Uint16
+NW_DOM_AttrVal_getExtension(NW_DOM_AttrVal_t* item,
+ NW_String_t* str);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttrVal_getExtensionInt
+
+ @synopsis: Only for EXT_T_[0,1,2] where associated value is not
+ a reference to the string table, returns value
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_AttrVal_t* val
+ The AttrVal structure.
+
+ [out] NW_Uint32* x
+ Value associated with extension if it is an extension,
+ otherwise undefined.
+
+ @description: If AttrVal is of type NW_DOM_ATTRVAL_EXTENSION and
+ it was created as EXT_T_[0,1,2] with an associated
+ value that is not a reference to the string table
+ (i.e., created with
+ NW_DOM_AttrVal_initFromExtensionInt()), then it
+ returns the value via the out parameter x and
+ returns NW_STAT_SUCCESS. Otherwise returns
+ NW_STAT_FAILURE and the value of x is undefined.
+
+ @returns: NW_Status_t
+
+ [NW_STAT_SUCCESS]
+ Success.
+
+ [NW_STAT_FAILURE]
+ Failure.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_AttrVal_getExtensionInt(NW_DOM_AttrVal_t* item,
+ NW_Uint32* x);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttrVal_getOpaque
+
+ @synopsis: Returns the associated opaque type.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_AttrVal_t* val
+ The AttrVal structure.
+
+ [out] NW_Uint32* opaqueLen
+ Length of opaque data.
+
+ @description: If attribute value is of type NW_DOM_ATTR_VAL_OPAQUE
+ returns the associated opaque data and length.
+
+ @returns: NW_Byte*
+ A pointer to the opaque data; or NULL if there are
+ invalid input parameters or if AttrVal is not of type
+ Opaque.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Byte*
+NW_DOM_AttrVal_getOpaque(NW_DOM_AttrVal_t* val,
+ NW_Uint32* opaqueLen);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttrVal_getString
+
+ @synopsis: Gets string of the attribute component.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_AttrVal_t* item
+ The AttrVal structure.
+
+ [out] NW_String_t* string
+ String associated with the AttrVal.
+
+ @description: Returns the string if attribute is of type
+ NW_DOM_ATTR_VAL_STRING.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_AttrVal_getString(NW_DOM_AttrVal_t* item,
+ NW_String_t* string);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_AttrVal_getToken
+
+ @synopsis: Returns the associated token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_AttrVal_t* val
+ The AttrVal structure.
+
+ @description: Returns the associated token if attribute value is
+ of type NW_DOM_ATTR_VAL_TOKEN.
+
+ @returns: NW_Uint16
+ The token if the attribute component value is of type
+ token; otherwise 0
+
+ ** ----------------------------------------------------------------------- **/
+NW_Uint16
+NW_DOM_AttrVal_getToken(NW_DOM_AttrVal_t* val);
+
+/* ----------------------------------------------------------------------- **
+ PI Nodes
+** ----------------------------------------------------------------------- **/
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ProcessingInstructionNode_getTarget
+
+ @synopsis: Gets the name of the target for this processing instruction.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ProcessingInstructionNode_t* node
+ A processing instruction node.
+
+ [out] NW_String_t* target
+ Name of the target.
+
+ @description: Gets the name of the target for this processing instruction.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Target returned.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not a DOM_ProcessingInstructionNode_t node.
+
+ [NW_STAT_DOM_NO_STRING_RETURNED]
+ General error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_ProcessingInstructionNode_getTarget(NW_DOM_ProcessingInstructionNode_t* node,
+ NW_String_t* target);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ProcessingInstructionNode_getTargetToken
+
+ @synopsis: Returns the token associated with a WBXML PI node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ProcessingInstructionNode_t* node
+ A processing instruction node.
+
+ @description: Returns the token associated with a WBXML PI node. This
+ method complements the method
+ NW_DOM_ProcessingInstructionNode_getTarget. It is specific
+ to WBXML, and behavior is undefined for non-WBXML nodes.
+
+ @returns: NW_Uint16
+ The token associated with the target (most significant
+ 8 bits represent codepage).
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Uint16
+NW_DOM_ProcessingInstructionNode_getTargetToken (NW_DOM_ProcessingInstructionNode_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ProcessingInstructionNode_getData
+
+ @synopsis: Gets the data associated with this processing instruction.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ProcessingInstructionNode_t* node
+ A processing instruction node.
+
+ [out] NW_String_t* data
+ Data associated with the node.
+
+ @description: Gets the data associated with this processing instruction.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Data returned.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not a NW_DOM_ProcessingInstructionNode_t node.
+
+ [NW_STAT_DOM_NO_STRING_RETURNED]
+ General error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_ProcessingInstructionNode_getData(NW_DOM_ProcessingInstructionNode_t* node,
+ NW_String_t* data);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ProcessingInstructionNode_getHandle
+
+ @synopsis: Gets the attribute handle associated with the node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ProcessingInstructionNode_t* node
+ A processing instruction node.
+
+ [in-out] NW_DOM_AttributeHandle_t* handle
+ Handle to get target and data.
+
+ @description: Gets the attribute handle associated with the node.
+ This supports WBXML only.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Handle returned.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not a processing instruction node.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_ProcessingInstructionNode_getHandle(NW_DOM_ProcessingInstructionNode_t* node,
+ NW_DOM_AttributeHandle_t* handle);
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* NW_DOM_ATTRIBUTE_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_dom_document.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,715 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_DOM
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+#ifndef NW_DOM_DOCUMENT_H
+#define NW_DOM_DOCUMENT_H
+
+#include <xml/cxml/cxml_proj.h>
+#include <xml/cxml/nw_dom_node.h>
+#include <xml/cxml/nw_dom_text.h>
+#include <xml/cxml/nw_dom_element.h>
+#include <xml/cxml/nw_wbxml_dictionary.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_getPublicIdAsNumber
+
+ @synopsis: Gets the public id of the document as an integer.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_DocumentNode_t* d
+ The document node.
+
+ @description: Gets the public id of the document as an integer.
+
+ @returns: NW_Uint32
+ publicID or 0
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Uint32
+NW_DOM_DocumentNode_getPublicIdAsNumber(NW_DOM_DocumentNode_t* d);
+
+
+/** ----------------------------------------------------------------------- **
+
+ @function: NW_DOM_DocumentNode_getPublicId
+
+ @synopsis: Gets the publicid of the document as string (docType).
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_DocumentNode_t* d
+ The document node.
+
+ [out] NW_String_t* str
+ The public id as a string.
+
+ @description: The document type declaration associated with this
+ document is returned.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Error reading node.
+
+ [NW_STAT_SUCCESS]
+ Success.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_DocumentNode_getPublicId(NW_DOM_DocumentNode_t* d,
+ NW_String_t* str);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_getVersion
+
+ @synopsis: Returns the version of the document,
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_DocumentNode_t* doc
+ The document node.
+
+ @description: Returns the version of the document. Returns 0 if this
+ is not valid.
+
+ @returns: NW_Uint8
+ Version number or 0.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Uint8
+NW_DOM_DocumentNode_getVersion(NW_DOM_DocumentNode_t* doc);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_getCharacterEncoding
+
+ @synopsis: Returns the supported encoding of the document.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_DocumentNode_t* doc
+ The document node.
+
+ @description: Returns the supported encoding of the document or 0
+ for invalid document.
+
+ @returns: NW_Uint32
+ Encoding or 0.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Uint32
+NW_DOM_DocumentNode_getCharacterEncoding(NW_DOM_DocumentNode_t* doc);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_getDocumentElement
+
+ @synopsis: Returns child node that is the root of this document
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_DocumentNode_t* doc
+ The document node.
+
+ @description: Returns child node that is the root of this document
+
+ @returns: NW_DOM_DocumentNode_t*
+ Child node that is the root element of the document;
+ NULL if doc is not a document node.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_DOM_ElementNode_t*
+NW_DOM_DocumentNode_getDocumentElement(NW_DOM_DocumentNode_t* doc);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_getElementIteratorByTagName
+
+ @synopsis: Gets the handle to iterate over elements of a given name.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_DocumentNode_t* doc
+ The document node.
+
+ [in] NW_String_t* tagName
+ Name of the element.
+
+ [out] NW_DOM_NodeIterator_t* handle
+ Iterator to iterate over nodes of same name)
+
+ @description: Gets the handle to iterate over elements of a given name.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Success
+
+ [NW_STAT_FAILURE]
+ Failure
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not NW_DOM_DOCUMENT_NODE.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_DocumentNode_getElementIteratorByTagName(NW_DOM_DocumentNode_t* doc,
+ NW_String_t* tagName,
+ NW_DOM_NodeIterator_t* handle);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_getElementIteratorByTagToken
+
+ @synopsis: Gets the iterator to iterate over elements of a given token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_DocumentNode_t* doc
+ The document node.
+
+ [in] NW_Uint16 token
+ Token of the element to be found.
+
+ [out] NW_DOM_NodeIterator_t* handle
+ Iterator to iterate over nodes of same name.
+
+ @description: Gets the iterator to iterate over elements of a given token.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Success
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not NW_DOM_DOCUMENT_NODE.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_DocumentNode_getElementIteratorByTagToken(NW_DOM_DocumentNode_t* doc,
+ NW_Uint16 token,
+ NW_DOM_NodeIterator_t* handle);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_getDictionary
+
+ @synopsis: Returns dictionary used by this document
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_DocumentNode_t* doc
+ The document node.
+
+ @description: Returns dictionary used by this document
+
+ @returns: NW_WBXML_Dictionary_t*
+ Dictionary or null if not found.
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_WBXML_Dictionary_t*
+NW_DOM_DocumentNode_getDictionary(NW_DOM_DocumentNode_t* doc);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_createElementNode
+
+ @synopsis: Creates a new element with the given name.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_DocumentNode_t* doc
+ The document node.
+
+ [in] NW_String_t* name
+ Name of the element to be created.
+
+ @description: Creates a new element with the given name.
+
+ @returns: NW_DOM_ElementNode_t*
+ New element with the given name; NULL if doc is not a
+ document node.
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_DOM_ElementNode_t*
+NW_DOM_DocumentNode_createElementNode(NW_DOM_DocumentNode_t* doc, NW_String_t* name);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_createElementNodeByToken
+
+ @synopsis: Creates a new element with the given token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_DocumentNode_t* doc
+ The document node.
+
+ [in] NW_Uint16 token
+ Token of the element to be created.
+
+ @description: Creates a new element with the given token.
+
+ @returns: NW_DOM_ElementNode_t*
+ New element with the given token; NULL if doc is not a
+ document node or token is an invalid token.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_DOM_ElementNode_t*
+NW_DOM_DocumentNode_createElementNodeByToken(
+ NW_DOM_DocumentNode_t* doc, NW_Uint16 token);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_createTextNodeWithTextItem
+
+ @synopsis: Returns a pointer to the created Text Node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_DocumentNode_t* doc
+ The document node.
+
+ [in] NW_DOM_TextItem_t* data
+ The value for the new text node.
+
+ @description: Returns a pointer to the created Text Node.
+
+ @returns: NW_DOM_TextNode_t*
+ New text node; NULL if if doc is not a document node.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_DOM_TextNode_t*
+NW_DOM_DocumentNode_createTextNodeWithTextItem(
+ NW_DOM_DocumentNode_t* doc, NW_DOM_TextItem_t* data);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_createTextNode
+
+ @synopsis: Creates a text node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_DocumentNode_t* doc
+ The document node.
+
+ [in] NW_String_t* data
+ The value for the new text node.
+
+ @description: Creates a text node with the given data.
+
+ @returns: NW_DOM_TextNode_t*
+ New text node; NULL if if doc is not a document node.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_DOM_TextNode_t*
+NW_DOM_DocumentNode_createTextNode(NW_DOM_DocumentNode_t* doc, NW_String_t* data);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_createCommentNode
+
+ @synopsis: Creates a comment node with the given data.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_DocumentNode_t* doc
+ The document node.
+
+ [in] NW_String_t* data
+ Value for the new comment node.
+
+ @description: Creates a comment node with the given data.
+
+ @returns: NW_DOM_CommentNode_t*
+ New comment node; NULL if doc is not a document node.
+
+ ** ----------------------------------------------------------------------- **/
+NW_DOM_CommentNode_t*
+NW_DOM_DocumentNode_createCommentNode(NW_DOM_DocumentNode_t* doc,
+ NW_String_t* data);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_createCDATASectionNode
+
+ @synopsis: Creates a CDATA section.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_DocumentNode_t* doc
+ The document node.
+
+ [in] NW_String_t* data
+ The value for the new CDATA section node.
+
+ @description: Creates a CDATA section node with the given data.
+
+ @returns: NW_DOM_CDATASectionNode_t*
+ New CData section node; NULL if doc is not a document node.
+
+ ** ----------------------------------------------------------------------- **/
+NW_DOM_CDATASectionNode_t*
+NW_DOM_DocumentNode_createCDATASectionNode(NW_DOM_DocumentNode_t* doc,
+ NW_String_t* data);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_createProcessingInstructionNodeByAttrVal
+
+ @synopsis: Creates a processing instruction node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_DocumentNode_t* doc
+ The document node.
+
+ [in] NW_String_t* target
+ The target for the processing instruction.
+
+ [in] NW_DOM_AttrVal_t* data
+ Data for the processing instruction.
+
+ @description: Creates a processing instruction node with the given data.
+ In WBXML, a processing instruction node can have a combination
+ of opaque, string, token, extension, and entity as the data.
+
+ @returns: NW_DOM_ProcessingInstructionNode_t*
+ New processing instruction node; NULL if this is a node
+ type mismatch.
+
+ ** ----------------------------------------------------------------------- **/
+NW_DOM_ProcessingInstructionNode_t*
+NW_DOM_DocumentNode_createProcessingInstructionNodeByAttrVal(
+ NW_DOM_DocumentNode_t* doc, NW_String_t* target, NW_DOM_AttrVal_t* data);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_createProcessingInstructionNodeByToken
+
+ @synopsis: Creates a processing instruction node.
+
+ @scope: public
+
+ @parameters:
+
+ [in] NW_DOM_DocumentNode_t* doc
+ The document node.
+
+ [in] NW_Uint16 token
+ Token identifying the target.
+
+ [in] NW_DOM_AttrVal_t* data
+ Data for the processing instruction.
+
+ @description: Creates a processing instruction node with the given data.
+ In WBXML, a processing instruction node can have a combination
+ of opaque, string, token, extension, and entity as the data.
+
+ @returns: NW_DOM_ProcessingInstructionNode_t*
+ New processing instruction node; NULL if this is a node type
+ mismatch.
+
+ ** ----------------------------------------------------------------------- **/
+NW_DOM_ProcessingInstructionNode_t*
+NW_DOM_DocumentNode_createProcessingInstructionNodeByToken(
+ NW_DOM_DocumentNode_t* doc, NW_Uint16 token, NW_DOM_AttrVal_t* data);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_createProcessingInstructionNode
+
+ @synopsis: Creates a processing instruction node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_DocumentNode_t* doc
+ The document node.
+
+ [in] NW_String_t* target
+ The target for the processing instruction.
+
+ [in] NW_String_t* data
+ Data for the processing instruction.
+
+ @description: Creates a processing instruction node with the given data.
+
+ @returns: NW_DOM_ProcessingInstructionNode_t*
+ New processing instruction node; NULL if doc is not a document
+ node.
+
+ ** ----------------------------------------------------------------------- **/
+NW_DOM_ProcessingInstructionNode_t*
+NW_DOM_DocumentNode_createProcessingInstructionNode(
+ NW_DOM_DocumentNode_t* doc, NW_String_t* target, NW_String_t* data);
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_TinyDom_Handle
+
+ @synopsis: A handle to hold all the state required to build a tree.
+
+ @scope: public
+ @variables:
+ NW_WBXML_Parser_t wbxmlParser
+ WBXML parser
+
+ NW_TinyDom_Parser_t tinyParser
+ Tiny parser
+
+ NW_TinyDom_Tree_t tinyDOMTree
+ Tiny DOM tree
+
+ NW_WBXML_Writer_t writer
+ WBXML writer
+
+ NW_WBXML_Document_t document
+ WBXML document
+
+ @description: A handle to hold all the state required to build a tree.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_TinyDom_Handle_s{
+ NW_WBXML_Parser_t wbxmlParser;
+ NW_TinyDom_Parser_t tinyParser;
+ NW_TinyDom_Tree_t tinyDOMTree;
+ NW_WBXML_Writer_t writer;
+ NW_WBXML_Document_t document;
+} NW_TinyDom_Handle_t;
+
+
+/* "Factory methods" that generate a dom tree and return the tree
+ * root as a document node
+ */
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_BuildTree
+
+ @synopsis: Create a dom tree by parsing a buffer.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_Handle_t* h
+ Handle for new tree.
+
+ [in] NW_Byte* buffer
+ Buffer to parse.
+
+ [in] NW_Int32 length
+ Length of buffer.
+
+ [in] NW_Bool encoded
+ Encoded if true, otherwise text.
+
+ [in] NW_Uint32 publicID
+ Dictionary to apply.
+
+
+ [in] NW_Bool extTNotStringTable
+ If NW_FALSE then extension tokens EXT_T_[0,1,2] have
+ an associated index into the string table. If NW_TRUE
+ then the NW_Uint32 associated with EXT_T_[0,1,2] is
+ just an anonymous value.
+
+ @description: Create a dom tree by parsing a buffer.
+
+ @returns: NW_DOM_DocumentNode_t*
+ Node of created tree.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_DOM_DocumentNode_t*
+NW_DOM_DocumentNode_BuildTree(NW_TinyDom_Handle_t* h,
+ NW_Byte* buffer,
+ NW_Int32 length,
+ NW_Bool encoded,
+ NW_Uint32 publicID,
+ NW_Bool extTNotStringTable);
+
+
+
+/* ************************************************************************/
+
+/*
+ * Create and populate a dom tree by parsing a buffer, returning the
+ * document node.
+ */
+IMPORT_C
+NW_DOM_DocumentNode_t *
+NW_DOM_DocumentNode_BuildWBXMLTree(NW_TinyDom_Handle_t *h,
+ NW_Byte *buffer,
+ NW_Int32 length,
+ NW_Bool freeBuff,
+ NW_Bool extTNotStringTable);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_createDocumentWithNumberPublicId
+
+ @synopsis: Create an empty dom tree.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_Handle_t* h
+ The tiny DOM handle.
+
+ [in] NW_Uint8 version
+ Version of the document to be created.
+
+ [in] NW_Uint32 publicid
+ Unique identifier for the DTD.
+
+ [in] NW_Uint32 encoding
+ Encoding for the document.
+
+ [in] NW_Bool extTNotStringTable
+ If NW_FALSE then extension tokens EXT_T_[0,1,2] have
+ an associated index into the string table. If NW_TRUE
+ then the NW_Uint32 associated with EXT_T_[0,1,2] is
+ just an anonymous value.
+
+ [in] NW_Bool enableStringTable
+ Set to true for noraml WBXML. Set to false to prevent
+ writable DOM from using a string table.
+
+
+ @description: Create an empty dom tree.
+ In XML and HTML, a public id identifying the DTD is in
+ string form, but in WBXML sometimes numbers identify the
+ well-known DTDs. Thus, there is a need for two methods for
+ document creation.
+
+ @returns: NW_DOM_DocumentNode_t*
+ New document node; NULL if error during creation.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_DOM_DocumentNode_t*
+NW_DOM_DocumentNode_createDocumentWithNumberPublicId(NW_TinyDom_Handle_t* h,
+ NW_Uint8 version,
+ NW_Uint32 publicid,
+ NW_Uint32 encoding,
+ NW_Bool extTNotStringTable,
+ NW_Bool enableStringTable);
+
+/** ----------------------------------------------------------------------- **
+ @function: CXML_DOM_DocumentNode_BuildTree
+
+ @synopsis: Create a dom tree by parsing a buffer and retuen the error
+ status also.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_Handle_t* h
+ Handle for new tree.
+
+ [in] NW_Byte* buffer
+ Buffer to parse.
+
+ [in] NW_Int32 length
+ Length of buffer.
+
+ [in] NW_Bool encoded
+ Encoded if true, otherwise text.
+
+ [in] NW_Uint32 publicID
+ Dictionary to apply.
+
+
+ [in] NW_Bool extTNotStringTable
+ If NW_FALSE then extension tokens EXT_T_[0,1,2] have
+ an associated index into the string table. If NW_TRUE
+ then the NW_Uint32 associated with EXT_T_[0,1,2] is
+ just an anonymous value.
+
+ [out] NW_Status_t* errorStatus
+ Returns the error status code as defined in the WBXML
+ parser if any error is occured during the parsing of WBXML.
+ If DOM tree is created successfully then this return NW_STAT_SUCCESS.
+
+ @description: Create a dom tree by parsing a buffer.
+
+ @returns: NW_DOM_DocumentNode_t*
+ Node of created tree.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_DOM_DocumentNode_t*
+CXML_DOM_DocumentNode_BuildTree(NW_TinyDom_Handle_t* h,
+ NW_Byte* buffer,
+ NW_Int32 length,
+ NW_Bool encoded,
+ NW_Uint32 publicID,
+ NW_Bool extTNotStringTable,
+ NW_Status_t* errorStatus);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_DocumentNode_Delete
+
+ @synopsis: Free the tree created by one of the above methods.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_DocumentNode_t* docNode
+ Tree to free.
+
+ @description: Free the tree created by one of the above methods.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C void
+NW_DOM_DocumentNode_Delete(NW_DOM_DocumentNode_t* docNode);
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* NW_DOM_DOCUMENT_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_dom_element.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,656 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_DOM
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+#ifndef NW_DOM_ELEMENT_H
+#define NW_DOM_ELEMENT_H
+
+#include <xml/cxml/nw_dom_node.h>
+#include <xml/cxml/nw_dom_attribute.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ElementNode_getTagName
+
+ @synopsis: Gets the tag name of the element.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ElementNode_t* elem
+ The element node.
+
+ [in-out] NW_String_t* name
+ The name of the element.
+
+ @description: Gets the tag name of the element.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Got tag name.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ It is not a NW_DOM_ELEMENT_NODE
+
+ [NW_STAT_DOM_NO_STRING_RETURNED]
+ Error.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_ElementNode_getTagName(NW_DOM_ElementNode_t* elem,
+ NW_String_t* name);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ElementNode_getTagToken
+
+ @synopsis: Gets the fully qualified token for the node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ElementNode_t* elem
+ The element node.
+
+ @description: Gets the fully qualified token for the node. The most
+ significant 8 bits are the codepage; the next 8 bits
+ are the token.
+
+ @returns: NW_Uint16
+ The token, including the codepage. Returns 0 if not
+ NW_DOM_ELEMENT_NODE.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Uint16
+NW_DOM_ElementNode_getTagToken(NW_DOM_ElementNode_t* elem);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ElementNode_getAttribute
+
+ @synopsis: Returns attribute value as string.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ElementNode_t* elem
+ The element node.
+
+ [in] NW_String_t* attrName
+ Name of the attribute whose value is to be returned.
+
+ [out] NW_String_t* attrValue
+ The value of the attribute.
+
+ @description: Returns attribute value as string. In the case of WBXML,
+ the value may consist of one or more of the five attribute
+ types concatenated together to form a simple string.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Returned attribute.
+
+ [NW_STAT_NOT_FOUND]
+ Attribute is not found.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not a NW_DOM_ELEMENT_NODE.
+
+ [NW_STAT_DOM_NO_STRING_RETURNED]
+ General error.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_ElementNode_getAttribute(NW_DOM_ElementNode_t* elem,
+ NW_String_t* attrName,
+ NW_String_t* attrValue);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ElementNode_setAttribute
+
+ @synopsis: Sets a named attribute to a value.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ElementNode_t* elem
+ The element node.
+
+ [in] NW_String_t* attrName
+ The attribute whose value is to be set.
+
+ [in] NW_String_t* attrValue
+ The new value of the attribute.
+
+ @description: If the attribute with the given name exists then a its
+ value will be changed to input value, otherwise a new
+ attribute will be created. If the given attribute was
+ already present when the document was parsed the first
+ time, it can not be removed. In this case a new attribute
+ is added, and you will have two attributes with same name.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Attribute set.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not an element node.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Required parameter was NULL.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_ElementNode_setAttribute(NW_DOM_ElementNode_t* elem,
+ NW_String_t* attrName,
+ NW_String_t* attrValue);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ElementNode_removeAttribute
+
+ @synopsis: Removes an attribute.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ElementNode_t* elem
+ The element node.
+
+ [in] NW_String_t* attributeName
+ Name of the attribute to be removed.
+
+ @description: Removes given attribute. Limited Use: You can only remove
+ attributes that you explicitly created and added to the
+ element. None of the attributes in the originally parsed
+ document can be removed.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Removed attribute.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not an NW_DOM_ELEMENT_NODE.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Required parameter was NULL.
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_ElementNode_removeAttribute(NW_DOM_ElementNode_t* elem,
+ NW_String_t* attributeName);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ElementNode_hasAttributes
+
+ @synopsis: Checks whether an element has attributes.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ElementNode_t* elem
+ The element node.
+
+ @description: Returns NW_TRUE if Attributes are present otherwise returns
+ false; If value is true handle can be used to iterate over
+ the Attributes list.
+
+ @returns: NW_Bool
+ Returns NW_TRUE if element has attributes, otherwise NW_FALSE.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Bool
+NW_DOM_ElementNode_hasAttributes(NW_DOM_ElementNode_t* elem);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ElementNode_getAttributeListIterator
+
+ @synopsis: Gets an iterator that enables iteration over the
+ list of attributes.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Node_t* node
+ The element node.
+
+ [out] NW_DOM_AttributeListIterator_t* iterator
+ Handle to iterate over the list of attributes of an element.
+
+ @description: Gets an iterator that enables iteration over the list
+ of attributes. This is a WAP-adapted DOM extension.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Iterator returned.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not an NW_DOM_ELEMENT_NODE.
+
+ [NW_STAT_NOT_FOUND]
+ Iterator could not be found.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_ElementNode_getAttributeListIterator(NW_DOM_Node_t* node,
+ NW_DOM_AttributeListIterator_t* iterator);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ElementNode_getAttributeHandleByName
+
+ @synopsis: Gets an attribute handle by name.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ElementNode_t* elem
+ The element node.
+
+ [in] NW_String_t* attributeName
+ Name of the attribute.
+
+ [out] NW_DOM_AttributeHandle_t* handle
+ Handle to iterate over the different values of an attribute.
+
+ @description: This method returns an AttributeHandle which enables user
+ to evaluate different AttrVals (attribute values) that the
+ attribute may have. This is a WAP-adapted DOM extension.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Handle returned.
+
+ [NW_STAT_NOT_FOUND]
+ Attribute is not found.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not a NW_DOM_ELEMENT_NODE.
+
+ [NW_STAT_FAILURE]
+ Empty name.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_ElementNode_getAttributeHandleByName(NW_DOM_ElementNode_t* elem,
+ NW_String_t* attributeName,
+ NW_DOM_AttributeHandle_t* handle);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ElementNode_getAttributeHandleByToken
+
+ @synopsis: Gets an attribute handle by token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ElementNode_t* elem
+ The element node.
+
+ [in] NW_Uint16 token
+ Token of the attribute.
+
+ [in-out] NW_DOM_AttributeHandle_t* handle
+ Gets different params of an attribute, its name, token, and values.
+
+ @description: This method returns an AttributeHandle which enables user
+ to evaluate different AttrVals (attribute values) that the
+ attribute may have.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Handle returned.
+
+ [NW_STAT_NOT_FOUND]
+ Attribute is not found.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not an NW_DOM_ELEMENT_NODE.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_ElementNode_getAttributeHandleByToken(NW_DOM_ElementNode_t* elem,
+ NW_Uint16 token,
+ NW_DOM_AttributeHandle_t* handle);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ElementNode_getAttributeValueStringByToken
+
+ @synopsis: Gets attribute value as string.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ElementNode_t* elem
+ The element node.
+
+ [in] NW_Uint16 token
+ Token of the attribute whose value is to be returned.
+
+ [out] NW_String_t* attributeValue
+ The value of the attribute.
+
+ @description: Gets attribute value as string.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Attribute value returned.
+
+ [NW_STAT_NOT_FOUND]
+ Attribute is not found.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not an NW_DOM_ELEMENT_NODE.
+
+ [NW_STAT_DOM_NO_STRING_RETURNED]
+ General error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_ElementNode_getAttributeValueStringByToken(NW_DOM_ElementNode_t* elem,
+ NW_Uint16 token,
+ NW_String_t* attributeValue);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ElementNode_setAttributeByToken
+
+ @synopsis: Set attribute by token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ElementNode_t* elem
+ The element node.
+
+ [in] NW_Uint16 token
+ The attribute to be changed.
+
+ [in-out] NW_DOM_AttrVal_t* attrValue
+ The new value of the attribute.
+
+ @description: If the attribute with the given name exists then a its
+ value will be changed to input value, otherwise a new
+ attribute will be created. If the given attribute was
+ already present when the document was parsed the first
+ time, it can not be removed. In this case a new attribute
+ is added, and you will have two attributes with same name.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Attribute set.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not an NW_DOM_ELEMENT_NODE.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Required parameter is null.
+
+ [NW_STAT_NOT_FOUND]
+ Attribute is not found.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_ElementNode_setAttributeByToken(NW_DOM_ElementNode_t* elem,
+ NW_Uint16 token,
+ NW_DOM_AttrVal_t* attrValue);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ElementNode_setAttributeByAttrVal
+
+ @synopsis: Sets atrribute by attribute value.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ElementNode_t* elem
+ The element node.
+
+ [in] NW_String_t* attrName
+ The attribute to be changed.
+
+ [in] NW_DOM_AttrVal_t* attrValue
+ The new value of the attribute.
+
+ @description: If the attribute with the given name exists then a its
+ value will be changed to input value, otherwise a new
+ attribute will be created LIMITATION: If the given
+ attribute was already present when the document was
+ parsed the first time, it can not be removed. In this
+ case a new attribute is added, and you will have two
+ attributes with same name
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Attribute set.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not an NW_DOM_ELEMENT_NODE.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Required parameter is null.
+
+ [NW_STAT_NOT_FOUND]
+ Attribute is not found.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_ElementNode_setAttributeByAttrVal(NW_DOM_ElementNode_t* elem,
+ NW_String_t* attrName,
+ NW_DOM_AttrVal_t* attrValue);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ElementNode_setAttributeByAttributeHandle
+
+ @synopsis: Sets attribute by attribute handle
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ElementNode_t* elem
+ The element node.
+
+ [in] NW_DOM_AttributeHandle_t* handle
+ The attribute handle.
+
+ @description: A new attribute will be created on element.
+ LIMITATION: If the given attribute was already
+ present when the document was parsed the first time,
+ it can not be removed. In this case a new attribute
+ is added, and you will have two attributes with same
+ name
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Attribute set.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not an NW_DOM_ELEMENT_NODE.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Required parameter is null.
+
+ [NW_STAT_NOT_FOUND]
+ Attribute is not found.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_ElementNode_setAttributeByAttributeHandle(NW_DOM_ElementNode_t* elem,
+ NW_DOM_AttributeHandle_t* handle);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ElementNode_removeAttributeByToken
+
+ @synopsis: Remove attribute by token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ElementNode_t* elem
+ The element node.
+
+ [in] NW_Uint16 attributeToken
+ Token of the attribute which is to be removed.
+
+ @description: Removes given attribute. You can only remove attributes
+ that you explicitly created and added to the element.
+ None of the attributes in the originally parsed document
+ can not be removed.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Attribute removed.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not an NW_DOM_ELEMENT_NODE.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Required parameter is null.
+
+ [NW_STAT_NOT_FOUND]
+ Attribute is not found.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_ElementNode_removeAttributeByToken(NW_DOM_ElementNode_t* elem,
+ NW_Uint16 attributeToken);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ElementNode_getElementIteratorByTagName
+
+ @synopsis: Gets the handle to iterate over the elements of a given token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ElementNode_t* elem
+ The element node.
+
+ [in] NW_String_t* name
+ Name of the element to be found.
+
+ [out] NW_DOM_NodeIterator_t* handle
+ Iterator to iterate over elements of a given token.
+
+ @description: Returns a pointer to the next Element with the given name
+ using this node as the root of the subtree.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Got iterator.
+
+ [NW_STAT_FAILURE]
+ Required parameter is null.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not an NW_DOM_ELEMENT_NODE.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_ElementNode_getElementIteratorByTagName(NW_DOM_ElementNode_t* elem,
+ NW_String_t* name,
+ NW_DOM_NodeIterator_t* handle);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_ElementNode_getElementIteratorByTagToken
+
+ @synopsis: Get element iterator by tag token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_ElementNode_t* elem
+ The element node.
+
+ [in] NW_Uint16 token
+ Token of the element to be found.
+
+ [out] NW_DOM_NodeIterator_t* handle
+ Iterator to iterate over elements of a given token.
+
+ @description: Gets the handle to iterate over elements of a given token.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Got iterator.
+
+ [NW_STAT_FAILURE]
+ Required parameter is null.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not an NW_DOM_ELEMENT_NODE.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_ElementNode_getElementIteratorByTagToken(NW_DOM_ElementNode_t* elem,
+ NW_Uint16 token,
+ NW_DOM_NodeIterator_t* handle);
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* NW_DOM_ELEMENT_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_dom_node.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,651 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_DOM
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+#ifndef NW_DOM_NODE_H
+#define NW_DOM_NODE_H
+
+#include <xml/cxml/nw_tinytree.h>
+#include <xml/cxml/nw_tinydom.h>
+#include <xml/cxml/nw_string_string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/** ----------------------------------------------------------------------- **
+ @typedef: NW_DOM_Node
+
+ @synopsis: Dom nodes are defined to be just tiny tree nodes.
+
+ @scope: public
+
+ @type: NW_TinyTree_Node_t
+
+ @description: Dom nodes are defined to be just tiny tree nodes.
+ This allows the Dom API to return the 32 bit pointers
+ it gets from the Tiny Tree and Tiny Dom APIs rather
+ than having to allocate any memory. This memory
+ savings comes at some cost, however: most Tiny Tree
+ API calls require a tree reference, and getting a tree
+ reference from an tiny dom node is an inefficient
+ operation (it requires a linear search of the node's
+ storage segment). We assume that this computation vs
+ memory tradeoff is worthwhile on small platforms. One
+ alternative would be to require the tree as a
+ parameter to many Dom API calls, but this would be a
+ substantial departure from the standard Dom model.
+
+ ** ----------------------------------------------------------------------- **/
+typedef NW_TinyTree_Node_t NW_DOM_Node_t;
+
+/* Specific node types used by the DOM API */
+
+typedef NW_Uint16 NW_DOM_NodeType_t;
+
+#define NW_DOM_ELEMENT_NODE 1
+#define NW_DOM_TEXT_NODE 2
+#define NW_DOM_CDATA_SECTION_NODE 4 /* only for XML */
+#define NW_DOM_PROCESSING_INSTRUCTION_NODE 8
+#define NW_DOM_COMMENT_NODE 16 /* only for XML */
+#define NW_DOM_DOCUMENT_NODE 32
+
+typedef NW_DOM_Node_t NW_DOM_ElementNode_t;
+/*typedef NW_DOM_Node_t NW_DOM_DocumentNode_t; */
+/* Declared in nw_tiny_tree.h */
+typedef NW_DOM_Node_t NW_DOM_TextNode_t;
+typedef NW_DOM_Node_t NW_DOM_CommentNode_t;
+typedef NW_DOM_Node_t NW_DOM_CDATASectionNode_t;
+typedef NW_DOM_Node_t NW_DOM_ProcessingInstructionNode_t;
+
+/* ----------------------------------------------------------------------- **
+ GENERAL NODE METHODS - applicable to all node types
+ These methods will be repeated for other Node types also
+ ** ----------------------------------------------------------------------- **/
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Node_getNodeName
+
+ @synopsis: Get name of node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Node_t* elem
+ The node.
+
+ [in-out] NW_String_t* name
+ The name of the node.
+
+ @description: Get name of node.
+
+ @returns: NW_Status_t
+ Result of operation.
+
+ [NW_STAT_SUCCESS]
+ Node name returned.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Node type could not be determined.
+
+ [NW_STAT_DOM_NO_STRING_RETURNED]
+ Node does not have name.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ It is not a NW_DOM_ELEMENT_NODE
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Ran out of memory trying to allocate string storage.
+
+ [NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED]
+ Illegal character set.
+
+ [NW_STAT_FAILURE]
+ String found but empty.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_Node_getNodeName(NW_DOM_Node_t* elem, NW_String_t* name);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Node_getNodeType
+
+ @synopsis: Gets the type of DOM node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Node_t* node
+ The node.
+
+ @description: Gets the type of DOM node.
+
+ @returns: NW_DOM_NodeType_t
+ Node type or zero if not recognized node.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_DOM_NodeType_t
+NW_DOM_Node_getNodeType(NW_DOM_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Node_getNodeToken
+
+ @synopsis: Gets the token associated with the node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Node_t* node
+ The node.
+
+ @description: Returns fully qualified node token. This includes the
+ token, codepage and a attribute/element flag.
+
+ @returns: NW_Uint16
+ The 8 bit token and 8 bit codepage which includes an
+ attribute/elent flag.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Uint16
+NW_DOM_Node_getNodeToken(NW_DOM_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Node_isWBXML
+
+ @synopsis: Checks if the node was created by parsing WBXML content.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Node_t* node
+ The node.
+
+ @description: Checks if the node was created by parsing WBXML content.
+
+ @returns: NW_Bool
+ NW_TRUE if WBXML type, otherwise NW_FALSE.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Bool
+NW_DOM_Node_isWBXML(NW_DOM_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Node_getParentNode
+
+ @synopsis: Gets the parent of the node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Node_t* node
+ The node.
+
+ @description: Finds parent node of the given node. All nodes except
+ DocumentNode have a parentNode.
+
+ @returns: NW_DOM_Node_t*
+ Parent or NULL if invalid operation or if parent node
+ is a DocumentNode.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_DOM_Node_t*
+NW_DOM_Node_getParentNode(NW_DOM_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Node_getFirstChild
+
+ @synopsis: Finds the first child of the node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Node_t* node
+ The node.
+
+ @description: Returns valid values only for ELEMENT_NODE and DOCUMENT_NODE.
+ These are the only nodes that have children. For other nodes
+ the value is NULL.
+
+ @returns: NW_DOM_Node_t*
+ The first child of this node or NULL if the node has no child.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_DOM_Node_t*
+NW_DOM_Node_getFirstChild(NW_DOM_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Node_getLastChild
+
+ @synopsis: Finds the last child of the node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Node_t* node
+ The node.
+
+ @description: Returns valid values only for ELEMENT_NODE and DOCUMENT_NODE.
+ These are the only nodes that have children. For other nodes
+ the value is either NULL or 0.
+
+ @returns: NW_DOM_Node_t*
+ The last child of this node or NULL if the node has no child.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_DOM_Node_t*
+NW_DOM_Node_getLastChild(NW_DOM_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Node_hasChildNodes
+
+ @synopsis: Checks if the node has any child nodes.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Node_t* node
+ The node.
+
+ @description: Returns valid values only for ELEMENT_NODE and DOCUMENT_NODE.
+ These are the only nodes that have children. For other nodes
+ the value is NULL.
+
+ @returns: NW_Bool
+ NW_TRUE if the node has child nodes, otherwise NW_FALSE.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Bool
+NW_DOM_Node_hasChildNodes(NW_DOM_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Node_getNextSibling
+
+ @synopsis: Gets the next sibling of the node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Node_t* node
+ The node.
+
+ @description: Gets the next sibling of the node.
+
+ @returns: NW_DOM_Node_t*
+ The node immediately following this node, NULL if there
+ is no next sibling or this node is NULL.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_DOM_Node_t*
+NW_DOM_Node_getNextSibling(NW_DOM_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Node_getPreviousSibling
+
+ @synopsis: Gets the previous sibling of the node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Node_t* node
+ The node.
+
+ @description: Gets the previous sibling of the node.
+
+ @returns: NW_DOM_Node_t*
+ The node immediately preceding this node in the DOM tree,
+ NULL if there is no previous sibling or the node is NULL.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_DOM_Node_t*
+NW_DOM_Node_getPreviousSibling(NW_DOM_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Node_getOwnerDocument
+
+ @synopsis: Gets the owner document node of this node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Node_t* node
+ The node.
+
+ @description: Gets the owner document node of this node.
+
+ @returns: NW_DOM_DocumentNode_t*
+ The owner document node (NW_DOM_DocumentNode_t) associated
+ with this node, NULL if the node is NULL or is a DocumentNode.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_DOM_DocumentNode_t*
+NW_DOM_Node_getOwnerDocument(NW_DOM_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Node_insertBefore
+
+ @synopsis: Inserts newChild before the refChild.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_Node_t* node
+ The parent node.
+
+ [in] NW_DOM_Node_t* newChild
+ The node to be inserted.
+
+ [in] NW_DOM_Node_t* refChild
+ The node before which the newChild node should be inserted.
+
+ @description: Inserts the newChild node before the existing refChild
+ node; and if refChild is NULL, inserts it at the end of
+ the list of children.
+
+ @returns: NW_Status_t
+ Result of operation.
+
+ [NW_STAT_SUCCESS]
+ Inserted successfully.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ One of the input parameters was null.
+
+ [NW_STAT_NOT_FOUND]
+ Reference child is not a child of given node.
+
+ [NW_STAT_DOM_WRONG_DOC_ERR]
+ New child was created from a different document than the
+ one that created the node.
+
+ [NW_STAT_DOM_HEIRARCHY_REQ_ERR]
+ Node is of the type that does not allow children of the
+ type of newChild node.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_Node_insertBefore(NW_DOM_Node_t* node,
+ NW_DOM_Node_t* newChild,
+ NW_DOM_Node_t* refChild);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Node_replaceChild
+
+ @synopsis: Replaces oldChild with the newChild.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Node_t* node
+ The node.
+
+ [in] NW_DOM_Node_t* newChild
+ The node that will replace oldChild.
+
+ [in] NW_DOM_Node_t* oldChild
+ The node to be replaced.
+
+ @description: Replaces oldChild with the newChild.
+
+ @returns: NW_Status_t
+ Result of operation.
+
+ [NW_STAT_SUCCESS]
+ Child replaced.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Bad data.
+
+ [NW_STAT_NOT_FOUND]
+ oldChild is not a child of given node.
+
+ [NW_STAT_DOM_WRONG_DOC_ERR]
+ newChild was created from a different document than the
+ one that created the node.
+
+ [NW_STAT_DOM_HEIRARCHY_REQ_ERR]
+ Node is of the type that does not allow children of the
+ type of newChild node.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_Node_replaceChild(NW_DOM_Node_t* node,
+ NW_DOM_Node_t* newChild,
+ NW_DOM_Node_t* oldChild);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Node_removeChild
+
+ @synopsis: Removes the oldChild node as a child of the node.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_Node_t* node
+ The parent node.
+
+ [in] NW_DOM_Node_t* oldChild
+ The child node to be removed.
+
+ @description: Removes the oldChild, and deletes the node and its child nodes.
+
+ @returns: NW_Status_t
+ Result of operation.
+
+ [NW_STAT_SUCCESS]
+ Nodes deleted.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Bad data.
+
+ [NW_STAT_NOT_FOUND]
+ oldChild is not a child of given node.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_Node_removeChild(NW_DOM_Node_t* node,
+ NW_DOM_Node_t* oldChild);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_Node_appendChild
+
+ @synopsis: Appends a new child.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_Node_t* node
+ The node.
+
+ [in] NW_DOM_Node_t* newChild
+ The node to be added.
+
+ @description: Appends a new child.
+
+ @returns: NW_Status_t
+ Result of operation.
+
+ [NW_STAT_SUCCESS]
+ Child node appended.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ An input parameter was null.
+
+ [NW_STAT_DOM_WRONG_DOC_ERR]
+ newChild was created from a different document than the
+ one that created the node.
+
+ [NW_STAT_DOM_HEIRARCHY_REQ_ERR]
+ Node is of the type that does not allow children of the type
+ of the newChild node.
+
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_Node_appendChild(NW_DOM_Node_t* node,
+ NW_DOM_Node_t* newChild);
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_DOM_NodeIterator
+
+ @synopsis: Iterator for walking node list.
+
+ @scope: public
+ @variables:
+ NW_TinyTree_NodeIterator_t nodeIter
+ The node iterator.
+
+ NW_Uint16 token
+ Fully qualified token (i.e. token and codepage)
+
+ @description: NW_DOM_NodeIterator_t is used in lieu of the NodeList
+ object specified in DOM. This data type is an iterator
+ default.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_DOM_NodeIterator_s {
+ NW_TinyTree_NodeIterator_t nodeIter;
+ NW_Uint16 token;
+}NW_DOM_NodeIterator_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_NodeIterator_new
+
+ @synopsis: Creates new NodeIterator.
+
+ @scope: public
+
+ @description: Creates new NodeIterator.
+
+ @returns: NW_DOM_NodeIterator_t*
+ New iterator.
+
+ ** ----------------------------------------------------------------------- **/
+NW_DOM_NodeIterator_t*
+NW_DOM_NodeIterator_new(void);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_NodeIterator_initialize
+
+ @synopsis: Initializes iterator.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_NodeIterator_t* handle
+ The node iterator.
+
+ [in] NW_DOM_Node_t* node
+ Starting point for iteration.
+ [in] NW_Uint16 token
+ Initialize with this token.
+
+ @description: Initializes the Node handle which uses the given node
+ as the starting point to iterate down the tree.
+
+
+ @returns: NW_Status_t
+ Result of operation.
+
+ [NW_STAT_SUCCESS]
+ Iterator initialized.
+
+ [NW_STAT_FAILURE]
+ Required parameter is null.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_NodeIterator_initialize(NW_DOM_NodeIterator_t* handle,
+ NW_DOM_Node_t* node,
+ NW_Uint16 token);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_NodeIterator_delete
+
+ @synopsis: Deletes the handle.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_NodeIterator_t* handle
+ The node iterator.
+
+ @description: Deletes the handle.
+
+ @returns: NW_Status_t
+ Result of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returned.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_NodeIterator_delete(NW_DOM_NodeIterator_t* handle);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_NodeIterator_nextNode
+
+ @synopsis: Returns the next node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_NodeIterator_t* handle
+ The node iterator.
+
+ @description: Returns the next node.
+
+ @returns: NW_DOM_Node_t*
+ The next node if there is one, otherwise NULL.
+
+ ** ----------------------------------------------------------------------- **/
+NW_DOM_Node_t*
+NW_DOM_NodeIterator_nextNode(NW_DOM_NodeIterator_t* handle);
+
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* NW_DOM_NODE_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_dom_text.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,977 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_DOM
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+#ifndef NW_DOM_TEXT_H
+#define NW_DOM_TEXT_H
+
+#include <xml/cxml/cxml_proj.h>
+#include <xml/cxml/nw_dom_node.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/** ----------------------------------------------------------------------- **
+ @typedef: NW_DOM_TextItemIterator
+
+ @synopsis: Used to iterate over the components of a WBXML text item.
+
+ @scope: public
+
+ @type: NW_TinyDom_TextHandle_t
+
+ @description: Used to iterate over the components of a WBXML text item.
+
+ ** ----------------------------------------------------------------------- **/
+typedef NW_TinyDom_TextHandle_t NW_DOM_TextItemIterator_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @typedef: NW_DOM_TextItem
+
+ @synopsis: Extension to support text nodes.
+
+ @scope: public
+
+ @type: NW_TinyDom_Text_t
+
+ @description: DOM_TextItem_t is an extension to support text nodes in
+ WBXML. Text nodes in WBXML can be composed of a list of
+ string, extension, opaque, or entitity data types.
+
+ ** ----------------------------------------------------------------------- **/
+typedef NW_TinyDom_Text_t NW_DOM_TextItem_t;
+
+/* ----------------------------------------------------------------------- **
+ TEXT - SPECIFIC methods
+ ** ----------------------------------------------------------------------- **/
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextNode_getData
+
+ @synopsis: Gets the value of the text node as a string.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_TextNode_t* node
+ The text node.
+
+ [out] NW_String_t* valueString
+ The value of the node
+
+ @description: Gets the value of the text node as a string.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Data returned successfully.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Not a text node
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Unable to allocate memory for string storage.
+
+ [NW_STAT_DOM_NO_STRING_RETURNED]
+ String storage is not assigned.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_TextNode_getData(NW_DOM_TextNode_t* node,
+ NW_String_t* valueString);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextNode_setData
+
+ @synopsis: Creates a new TextNode and replaces the previous one.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_TextNode_t** node
+ The text node.
+
+ [in] NW_String_t* val
+ Value of the text node.
+
+ @description: Creates a new TextNode and replaces the previous one.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ New text node created.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Required parameter was NULL.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_TextNode_setData(NW_DOM_TextNode_t** node,
+ NW_String_t* val);
+
+
+/* ----------------------------------------------------------------------- **
+ TextItem Methods
+ In XML a text node has only string data, but in WBXML a TextNode consists
+ of a list of one or more text items including strings, text entities, etc.
+ ** ----------------------------------------------------------------------- **/
+
+/** ----------------------------------------------------------------------- **
+ @typedef: NW_DOM_TextItemType
+
+ @synopsis: Enumerated text item type.
+
+ @scope: public
+
+ @type: NW_Uint8
+
+ @description: Enumerated text item type.
+
+ ** ----------------------------------------------------------------------- **/
+typedef NW_Uint8 NW_DOM_TextItemType_t;
+
+#define NW_DOM_TEXT_ITEM_STRING 1
+#define NW_DOM_TEXT_ITEM_EXTENSION 2
+#define NW_DOM_TEXT_ITEM_ENTITY 3
+#define NW_DOM_TEXT_ITEM_OPAQUE 4
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItem_new
+
+ @synopsis: Creates net TextItem
+
+ @scope: public
+
+ @description: Creates new text item.
+
+ @returns: NW_DOM_TextItem_t*
+ New text item.
+ ** ----------------------------------------------------------------------- **/
+NW_DOM_TextItem_t*
+NW_DOM_TextItem_new(void);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItem_initFromString
+
+ @synopsis: Initializes a text item with a string.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_TextItem_t* item
+ The text item.
+
+ [in] NW_String_t* string
+ Data from which item will be initialized.
+
+ @description: Initializes a text item with a string.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_TextItem_initFromString (NW_DOM_TextItem_t* item,
+ NW_String_t* string);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItem_initFromEntity
+
+ @synopsis: Initializes a text item with an entity.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_TextItem_t* item
+ The text item.
+
+ [in] NW_Uint32 entity
+ default
+
+ @description: Initializes a Text Item of type NW_DOM_TEXT_ITEM_ENTITY
+ with an entity.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_TextItem_initFromEntity (NW_DOM_TextItem_t* item,
+ NW_Uint32 entity);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItem_initFromExtension
+
+ @synopsis: Initializes a text item with an extension.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_TextItem_t* item
+ The text item.
+
+ [in] NW_Uint16 token
+ Token from which the item will be initialized.
+
+ [in] NW_String_t* str
+ Data from which item will be initialized.
+
+ @description: Initializes a text item with an extension.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_TextItem_initFromExtension (NW_DOM_TextItem_t* item,
+ NW_Uint16 token,
+ NW_String_t* str);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItem_initFromExtensionInt
+
+ @synopsis: Initializes a text item with the particular extension
+ types EXT_T_[0,1,2] + uint32 where uint32 is not an
+ index into the string table.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_TextItem_t* item
+ The text item.
+
+ [in] NW_Uint16 token
+ Token from which the item will be initialized.
+ The token must be one of EXT_T_[0,1,2].
+
+ [in] NW_Uint32 x
+ The associated 32-bit unsigned value.
+
+ @description: Initializes a text item with the particular extension
+ types EXT_T_[0,1,2] + uint32 where uint32 is not an
+ index into the string table.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Success.
+
+ [NW_STAT_FAILURE]
+ Failure if token is not one of EXT_T_[0,1,2].
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_TextItem_initFromExtensionInt (NW_DOM_TextItem_t* item,
+ NW_Uint16 token,
+ NW_Uint32 x);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItem_initFromOpaque
+
+ @synopsis: Initializes a text item with an opaque value.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_TextItem_t* item
+ The text item.
+
+ [in] NW_Uint32 length
+ default
+
+ [in] NW_Byte* data
+ default
+
+ @description: Initializes a Text Item of type NW_DOM_TEXT_ITEM_OPAQUE
+ with an opaque value.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_TextItem_initFromOpaque (NW_DOM_TextItem_t* item,
+ NW_Uint32 length,
+ NW_Byte* data);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItem_delete
+
+ @synopsis: Deallocates a text item.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_TextItem_t* item
+ The text item.
+
+ @description: Deallocates a text item.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_TextItem_delete(NW_DOM_TextItem_t* item);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItem_getType
+
+ @synopsis: Finds the type of a text item.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_TextItem_t* item
+ The text item.
+
+ @description: Finds the type of a text item (one of: extension, string,
+ opaque, or entity).
+
+ @returns: NW_DOM_TextItemType_t
+ Type returned. or zero if unknown.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_DOM_TextItemType_t
+NW_DOM_TextItem_getType(NW_DOM_TextItem_t* item);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItem_setType
+
+ @synopsis: Sets the type of TextItem.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_TextItem_t* item
+ The text item.
+
+ [in] NW_DOM_TextItemType_t type
+ Type to which to set the text item.
+
+ @description: Sets the type of TextItem
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Value set.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Invalid type.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_TextItem_setType(NW_DOM_TextItem_t* item,
+ NW_DOM_TextItemType_t type);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItem_toString
+
+ @synopsis: Creates a string representation of the item.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_TextItem_t* item
+ The text item.
+
+ [out] NW_String_t* string
+ String value.
+
+ [in] NW_Uint32 encoding
+ Encoding to apply.
+
+ @description: Creates a string representation of the item.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ String returned.
+
+ [NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED]
+ If encoding is not supported.
+
+ [NW_STAT_DOM_NO_STRING_RETURNED]
+ Error extracting string.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_TextItem_toString(NW_DOM_TextItem_t* item,
+ NW_String_t* string,
+ NW_Uint32 encoding);
+
+/* ----------------------------------------------------------------------- **
+ The following methods return the a text item component
+ ** ----------------------------------------------------------------------- **/
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItem_getEntity
+
+ @synopsis: Gets TextItem entity.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_TextItem_t* item
+ The text item.
+
+ @description: If item is of type NW_DOM_TEXT_ITEM_ENTITY returns entity
+ otherwise returns zero.
+
+ @returns: NW_Uint32
+ Entity or 0 if not NW_DOM_TEXT_ITEM_ENTITY
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Uint32
+NW_DOM_TextItem_getEntity(NW_DOM_TextItem_t* item);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItem_getString
+
+ @synopsis: Gets Text Item string.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_TextItem_t* item
+ The text item.
+
+ [out] NW_String_t* string
+ String associated with the text item.
+
+ @description: Gets Text Item string if item is of type
+ NW_DOM_TEXT_ITEM_STRING returns and modifies string.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Success default.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Not NW_DOM_TEXT_ITEM_STRING.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Could not allocate memory for string.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_TextItem_getString(NW_DOM_TextItem_t* item,
+ NW_String_t* string);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItem_getExtensionToken
+
+ @synopsis: Returns extension token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_TextItem_t* item
+ The text item.
+
+ [out] NW_Uint16* token
+ The token.
+
+ @description: If TextItem is of type NW_DOM_TEXT_ITEM_EXTENSION then
+ assigns token to out parameter and returns NW_STAT_SUCCESS.
+ If not, it returns NW_STAT_FAILURE.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Success.
+
+ [NW_STAT_FAILURE]
+ If text item is of wrong type.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_TextItem_getExtensionToken(NW_DOM_TextItem_t* item,
+ NW_Uint16* token);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItem_getExtension
+
+ @synopsis: Returns extension token and string.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_TextItem_t* item
+ The text item.
+
+ [out] NW_String_t* str
+ String associated with extension if it is a text extension,
+ otherwise string cleared.
+
+ @description: If TextItem is of type NW_DOM_TEXT_ITEM_EXTENSION returns
+ token ans string for extension. If not, it returns zero
+ and clears the string. Some extensions do not have text
+ associated with them. The string is cleared for these as
+ well. If this is a single token extension then the string
+ is cleared first.
+
+ @returns: NW_Uint16
+ Token or zero if not NW_DOM_TEXT_ITEM_EXTENSION.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Uint16
+NW_DOM_TextItem_getExtension(NW_DOM_TextItem_t* item,
+ NW_String_t* str);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItem_getExtensionInt
+
+ @synopsis: Only for EXT_T_[0,1,2] where associated value is not
+ a reference to the string table, returns value
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_TextItem_t* item
+ The text item.
+
+ [out] NW_Uint32* x
+ Value associated with extension if it is a text extension,
+ otherwise undefined.
+
+ @description: If TextItem is of type NW_DOM_TEXT_ITEM_EXTENSION and
+ it was created as EXT_T_[0,1,2] with an associated
+ value that is not a reference to the string table
+ (i.e., created with
+ NW_DOM_TextItem_initFromExtensionInt()), then it
+ returns the value via the out parameter x and
+ returns NW_STAT_SUCCESS. Otherwise returns
+ NW_STAT_FAILURE and the value of x is undefined.
+
+ @returns: NW_Status_t
+
+ [NW_STAT_SUCCESS]
+ Success.
+
+ [NW_STAT_FAILURE]
+ Failure.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_TextItem_getExtensionInt(NW_DOM_TextItem_t* item,
+ NW_Uint32* x);
+
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItem_getOpaque
+
+ @synopsis: Returns opaque pointer.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_TextItem_t* item
+ The text item.
+
+ [out] NW_Uint32* opaqueLen
+ Length of the opaque data.Not set if NULL pointer returned.
+
+ @description: If TextItem is of type NW_DOM_TEXT_ITEM_OPAQUE returns
+ pointer to opaque.
+
+ @returns: NW_Byte*
+ Opaque data if item is of type opaque; otherwise NULL.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Byte*
+NW_DOM_TextItem_getOpaque(NW_DOM_TextItem_t* item,
+ NW_Uint32* opaqueLen);
+
+
+/* ----------------------------------------------------------------------- **
+ TEXT ITEM ITERATORS - iterate over different text items
+ ** ----------------------------------------------------------------------- **/
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItemIterator_new
+
+ @synopsis: Create new TextItemIterator.
+
+ @scope: public
+
+ @description: Create new TextItemIterator.
+
+ @returns: NW_DOM_TextItemIterator_t*
+ POinter to new iterator.
+
+ ** ----------------------------------------------------------------------- **/
+NW_DOM_TextItemIterator_t*
+NW_DOM_TextItemIterator_new(void);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItemIterator_delete
+
+ @synopsis: Delete TextItemIterator.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_TextItemIterator_t* handle
+ The text item iterator.
+
+ @description: Delete TextItemIterator.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_TextItemIterator_delete(NW_DOM_TextItemIterator_t* handle);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextNode_getTextItemIterator
+
+ @synopsis: Returns TextItemIterator.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_TextNode_t* node
+ The text item iterator.
+
+ [out] NW_DOM_TextItemIterator_t* iterator
+ Iterator to iterate over the text items in a text node.
+
+ @description: Returns TextItemIterator.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Success.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Node is not a text node.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_TextNode_getTextItemIterator(NW_DOM_TextNode_t* node,
+ NW_DOM_TextItemIterator_t* iterator);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextItemIterator_getNextTextItem
+
+ @synopsis: Iterates to the next text item.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_TextItemIterator_t* handle
+ The text item iterator.
+
+ [out] NW_DOM_TextItem_t* textItem
+ Next text item.
+
+ @description: Iterates to the next text item.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_WBXML_ITERATE_MORE]
+ More to be returned.
+
+ [NW_STAT_WBXML_ITERATE_DONE]
+ Last item returned.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_TextItemIterator_getNextTextItem(NW_DOM_TextItemIterator_t* handle,
+ NW_DOM_TextItem_t* textItem);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextNode_setDataFromTextItem
+
+ @synopsis: Sets new data for the given text node.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_TextNode_t** node
+ The text node.
+
+ [in] NW_DOM_TextItem_t* val
+ Value of the text node.
+
+ @description: Sets new data for the given text node by creating a new
+ TextNode and replaces the previous one.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Data set.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Invalid parameter entered.
+
+ [NW_STAT_DOM_HEIRARCHY_REQUEST_ERR]
+ Internal error.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_TextNode_setDataFromTextItem(NW_DOM_TextNode_t** node,
+ NW_DOM_TextItem_t* val);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_TextNode_addDataFromTextItem
+
+ @synopsis: Adds new data to the given text node.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_TextNode_t* node
+ The text node.
+
+ [in] NW_DOM_TextItem_t* val
+ Value of the text node.
+
+ @description: Adds new data to the given text node.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Data set.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Invalid parameter entered.
+
+ [NW_STAT_DOM_HEIRARCHY_REQUEST_ERR]
+ Internal error.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_DOM_TextNode_addDataFromTextItem(NW_DOM_TextNode_t* node,
+ NW_DOM_TextItem_t* val);
+
+
+/* ----------------------------------------------------------------------- **
+ COMMENT_NODE SPECIFIC METHODS - Unsupported
+ ** ----------------------------------------------------------------------- **/
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_CommentNode_getData
+
+ @synopsis: Gets the data associated with the node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_CommentNode_t* comment
+ The comment node.
+
+ [out] NW_String_t* c
+ Data for the node.
+
+ @description: Gets the data associated with the node.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Data returned.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Invalid parameter entered.
+
+ [NW_STAT_DOM_HEIRARCHY_REQUEST_ERR]
+ Internal error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_CommentNode_getData(NW_DOM_CommentNode_t* comment,
+ NW_String_t* c);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_CommentNode_setData
+
+ @synopsis: Sets text for node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_CommentNode_t* comment
+ The comment node.
+
+ [in] NW_String_t* c
+ Data to set into node.
+
+ @description: Sets text for node.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Data set.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Invalid parameter entered.
+
+ [NW_STAT_DOM_HEIRARCHY_REQUEST_ERR]
+ Internal error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_CommentNode_setData(NW_DOM_CommentNode_t* comment,
+ NW_String_t* c);
+
+
+/* ----------------------------------------------------------------------- **
+ CHARACTER_DATA_NODE SPECIFIC METHODS - Unsupported
+ ** ----------------------------------------------------------------------- **/
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_CDATASectionNode_getData
+
+ @synopsis: Gets the data associated with the node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_DOM_CDATASectionNode_t* cdata
+ The CDATA node.
+
+ [out] NW_String_t* c
+ Data for the node.
+
+ @description: Gets the data associated with the node.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Data returned.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Invalid parameter entered.
+
+ [NW_STAT_DOM_HEIRARCHY_REQUEST_ERR]
+ Internal error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_CDATASectionNode_getData(NW_DOM_CDATASectionNode_t* cdata,
+ NW_String_t* c);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_DOM_CDATASectionNode_setData
+
+ @synopsis: Sets text for node.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_DOM_CDATASectionNode_t* cdata
+ The CDATA node.
+
+ [in] NW_String_t* c
+ Data to set into node.
+
+ @description: Sets text for node.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Data set.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Invalid parameter entered.
+
+ [NW_STAT_DOM_HEIRARCHY_REQUEST_ERR]
+ Internal error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_DOM_CDATASectionNode_setData(NW_DOM_CDATASectionNode_t* cdata,
+ NW_String_t* c);
+
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* NW_DOM_TEXT_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_encoder_domencoder.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,133 @@
+/*
+* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_Encoder
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+#ifndef _NW_ENCODER_WRITER_HEADER_GUARD_
+#define _NW_ENCODER_WRITER_HEADER_GUARD_
+
+#include <xml/cxml/nw_encoder_stringtable.h>
+#include <xml/cxml/nw_encoder_wbxmlwriter.h>
+#include <xml/cxml/nw_dom_attribute.h>
+#include <xml/cxml/nw_dom_element.h>
+#include <xml/cxml/nw_dom_text.h>
+#include <xml/cxml/nw_dom_document.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+#define MEMORY_INCREMENT 100
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_Encoder_Encoder
+
+ @synopsis: Encoder structure.
+
+ @scope: public
+ @variables:
+ NW_WBXML_Writer_t writer
+ The writer.
+
+ NW_Uint32 encoding
+ Current encoding.
+
+ NW_Encoder_StringTable_t* table
+ The string table.
+
+ @description: Encoder structure.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_Encoder_Encoder_s{
+ NW_WBXML_Writer_t writer;
+ NW_Uint32 encoding;
+ NW_Encoder_StringTable_t* stringTable;
+ /* Some servers (for example, Wireless Villiage Oz as of January 2003)
+ don't parse the string table references so this switch controls use of
+ the string table during WBXML generation. Set TRUE for normal WBXML.
+ Set FALSE to prevent building a string table. */
+ NW_Bool enableStringTable;
+} NW_Encoder_Encoder_t;
+
+/* Deprecated - here for backward compatibility */
+typedef struct NW_Encoder_Encoder_s NW_Encoder_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_encodeWBXML
+
+ @synopsis: Encodes the document represented by the given
+ NW_DOM_DocumentNode_t.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Encoder_Encoder_t* encoder
+ The encoder.
+
+ [in] NW_DOM_DocumentNode_t* docNode
+ Document node for the document to be encoded.
+
+ [in] NW_Bool enableStringTableUse
+ Set to TRUE for normal WBXML.
+ Set to FALSE to prevent use of the string table.
+
+ [out] NW_Uint32* length
+ Length of the encoded buffer.
+
+ [out] NW_Byte** buffer
+ The encoded buffer.
+
+ @description: Encodes the document represented by the given
+ NW_DOM_DocumentNode_t.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Document encoded.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Required parameter is NULL.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Memory could not be allocated for buffer.
+
+ [NW_STAT_DOM_NODE_TYPE_ERR]
+ Internal error.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_Encoder_encodeWBXML(NW_Encoder_Encoder_t* encoder,
+ NW_DOM_DocumentNode_t* docNode,
+ NW_Bool enableStringTableUse,
+ NW_Uint32* length,
+ NW_Byte** buffer);
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_encoder_stringtable.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,570 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_Encoder
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef _NW_ENCODER_STRING_TABLE_HEADER_GUARD_
+#define _NW_ENCODER_STRING_TABLE_HEADER_GUARD_
+
+#include <xml/cxml/nw_string_string.h>
+#include <xml/cxml/nw_tinytree.h>
+#include <xml/cxml/nw_wbxml_dictionary.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#define CXML_MAX_STRTBL_ITEMS 150
+
+/** ----------------------------------------------------------------------- **
+ @typedef: NW_DOM_DocumentNode
+
+ @synopsis: default
+
+ @scope: public
+ @type: NW_TinyTree_Node_t
+
+ @description: default
+ ** ----------------------------------------------------------------------- **/
+typedef NW_TinyTree_Node_t NW_DOM_DocumentNode_t;
+
+
+/*
+ * StringItem methods
+ */
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_Encoder_StringTable
+
+ @synopsis: Container for the strings in a document.
+
+ @scope: public
+ @variables:
+ CXML_Vector_t* vector
+ Array of strings.
+
+ @description: Container for the strings in a document.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_Encoder_StringTable_s{
+ CXML_Vector_t* vector;
+}NW_Encoder_StringTable_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_StringTable_new
+
+ @synopsis: Creates a new String Table.
+
+ @scope: public
+
+ @description: Creates a new String Table.
+
+ @returns: NW_Encoder_StringTable_t*
+ POinter to string table or NULL if not successful.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C
+NW_Encoder_StringTable_t*
+NW_Encoder_StringTable_new(void);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_StringTable_delete
+
+ @synopsis: Deletes a String Table.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_Encoder_StringTable_t* strTable
+ Table to delete.
+
+ @description: Deletes a String Table
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C void
+NW_Encoder_StringTable_delete(NW_Encoder_StringTable_t* strTable);
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_Encoder_StringItem
+
+ @synopsis: String item structure.
+
+ @scope: public
+ @variables:
+ NW_String_t data
+ The string data.
+
+ NW_Uint16 frequency
+ Reference count.
+
+ @description: This structures is used to count the frequency of
+ string occurance.
+
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_Encoder_StringItem_s{
+ NW_String_t data;
+ NW_Uint16 frequency;
+} NW_Encoder_StringItem_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_Encoder_StringTableIterator
+
+ @synopsis: Iterator for walking through the string table.
+
+ @scope: public
+ @variables:
+ NW_Encoder_StringTable_t* strTable
+ The string table.
+
+ NW_Uint16 currentIndex
+ Current iterator cursor.
+
+ @description: Iterator for walking through the string table.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_Encoder_StringTableIterator_s{
+ NW_Encoder_StringTable_t* strTable;
+ NW_Uint16 currentIndex;
+} NW_Encoder_StringTableIterator_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_StringTable_new
+
+ @synopsis: Creates a new String Item.
+
+ @scope: public
+
+ @description: Creates a new String Item.
+
+ @returns: NW_Encoder_StringTable_t*
+ The string table or NULL if not success.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C
+NW_Encoder_StringTable_t*
+NW_Encoder_StringTable_new(void);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_StringTable_GetSize
+
+ @synopsis: Returns number of strings in the string table.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Encoder_StringTable_t* table
+ The string table.
+
+ @description: Returns number of strings in the string table.
+
+ @returns: CXML_Vector_Metric_t
+ Number of strings in the table.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C CXML_Vector_Metric_t
+NW_Encoder_StringTable_GetSize(NW_Encoder_StringTable_t* table);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_StringTable_append
+
+ @synopsis: Appends string to list.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Encoder_StringTable_t* table
+ The string table.
+
+ [in] NW_String_t* string
+ String to add.
+
+ [in] NW_Bool literal
+ String literal.
+
+ [out] NW_Uint32* extensionByteOffset
+ byte offset position of inserted or found string
+ in string table
+
+ @description: Appends new found string in the document to the list.
+ If the string was already present in the list, then it
+ increases its frequency (e.g. reference count), otherwise
+ it creates a new StringItem in the list.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Appended or found.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Required parameter is NULL.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_Encoder_StringTable_append(NW_Encoder_StringTable_t* table,
+ NW_String_t* string,
+ NW_Bool literal,
+ NW_Uint32* extensionByteOffset);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_StringTable_find
+
+ @synopsis: Find a string in the table.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Encoder_StringTable_t* strTable
+ The string table.
+
+ [in] NW_String_t* string
+ default
+
+ [out] NW_Uint32* strIndex
+ Index of entry.
+
+ [out] NW_Uint32* byteOffset
+ Offset of text into the table.
+
+ @description: Finds a string in the list and returns the corresponding
+ StringItem, otherwise returns NULL.
+
+ @returns: NW_Encoder_StringItem_t*
+ Poiter to string item or NULL if not in the list.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Encoder_StringItem_t*
+NW_Encoder_StringTable_find(NW_Encoder_StringTable_t* strTable,
+ NW_String_t* string,
+ NW_Uint32* strIndex,
+ NW_Uint32* byteOffset);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_StringTable_get
+
+ @synopsis: Finds the string at a given index.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Encoder_StringTable_t* strTable
+ The string table.
+
+ [in] NW_Uint32 index
+ Index to get from.
+
+ [out] NW_String_t* string
+ Returned string. Check status for validity.
+
+ @description: Finds the string at a given index.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ String found.
+
+ [NW_STAT_FAILURE]
+ String not found.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_Encoder_StringTable_get(NW_Encoder_StringTable_t* strTable,
+ NW_Uint32 index,
+ NW_String_t* string);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_StringTable_getItemAt
+
+ @synopsis: Finds the string at a given index.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Encoder_StringTable_t* strTable
+ The string table.
+
+ [in] NW_Uint32 index
+ Index to get from.
+
+ @description: Finds the string at a given index.
+
+ @returns: NW_Encoder_StringItem_t*
+ String item at index or NULL if not found.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Encoder_StringItem_t*
+NW_Encoder_StringTable_getItemAt(NW_Encoder_StringTable_t* strTable,
+ NW_Uint32 index);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_StringTable_removeAt
+
+ @synopsis: Removes a string item.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Encoder_StringTable_t* strTable
+ The string table.
+
+ [in] CXML_Vector_Metric_t index
+ Index to remove from.
+
+ @description: Removes a string item.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Item removed.
+
+ [NW_STAT_FAILURE]
+ Invalid index.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_Encoder_StringTable_removeAt(NW_Encoder_StringTable_t* strTable,
+ CXML_Vector_Metric_t index);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_StringTable_getTotalBytes
+
+ @synopsis: Returns the total number of bytes used for storing all
+ the strings in the list.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Encoder_StringTable_t* strTable
+ The string table.
+
+ @description: Returns the total number of bytes used for storing all
+ the strings in the list.
+
+ @returns: NW_Uint32
+ Total byte count.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Uint32
+NW_Encoder_StringTable_getTotalBytes(NW_Encoder_StringTable_t* strTable);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_StringTable_createFromDOM
+
+ @synopsis: Creates table for a given document.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Encoder_StringTable_t* strTable
+ The string table.
+
+ [in] NW_DOM_DocumentNode_t* doc
+ Root node of DOM to encode.
+
+ [in] NW_WBXML_Dictionary_t* dictionary
+ The dictionary.
+
+ @description: Creates table for a given document.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Created.
+
+ [NW_STAT_FAILURE]
+ No bytes found.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_Encoder_StringTable_createFromDOM(NW_Encoder_StringTable_t* strTable,
+ NW_DOM_DocumentNode_t* doc,
+ NW_WBXML_Dictionary_t* dictionary);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_StringTable_getStringTableOffset
+
+ @synopsis: Looks for occurrence of a string with the specified content.
+
+ @scope: public
+
+ @parameters:
+ [in] void* pStringTableObject
+ The string table.
+
+ [in] NW_Uint32 byteCount
+ Length of text.
+
+ [in] const NW_Uint8* pString
+ Text.
+
+ [out] NW_Bool* pFound
+ True if found in table.
+
+ [out] NW_Uint32* pTableOffset
+ Offset if found.
+
+ @description: Looks for occurrence of a string with the specified content.
+ Creates a string with the specified storage and byte length.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_Encoder_StringTable_getStringTableOffset(void* pStringTableObject,
+ NW_Uint32 byteCount,
+ const NW_Uint8* pString,
+ NW_Bool* pFound,
+ NW_Uint32* pTableOffset);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_StringTable_addToStringTable
+
+ @synopsis: Add string to string table.
+
+ @scope: public
+
+ @parameters:
+ [in-out] void* pStringTableObject
+ The string table.
+
+ [in] NW_Uint32 byteCount
+ Length of text.
+
+ [in] const NW_Uint8* pString
+ Text to add to table.
+
+ [in] NW_Uint32* pTableOffset
+ Offset installed at.
+
+ @description: Adds the string to the table if it is not already there.
+ Otherwise it increases the reference count.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Added to table.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Required parameter is NULL or invalid.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_Encoder_StringTable_addToStringTable(void* pStringTableObject,
+ NW_Uint32 byteCount,
+ const NW_Uint8* pString,
+ NW_Uint32* pTableOffset);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_StringTable_StringTableIterateInit
+
+ @synopsis: Initializes a string table iterator.
+
+ @scope: public
+
+ @parameters:
+ [in] void* pStringTableObject
+ The string table.
+
+ [in-out] void* pStringTableIterator
+ Initialized iterator.
+
+ @description: Initializes a string table iterator.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_Encoder_StringTable_StringTableIterateInit(void* pStringTableObject,
+ void* pStringTableIterator);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Encoder_StringTable_StringTableIterateNext
+
+ @synopsis: Iterates through the table.
+
+ @scope: public
+
+ @parameters:
+ [in-out] void* pStringTableIterator
+ The iterator.
+
+ [out] NW_Uint32* pByteCount
+ Byte count for returned value or 0.
+
+ [out] NW_Uint8** ppBuf
+ The returned text.
+
+ @description: Iterates through the table. At end of string table
+ return byteCount = 0.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_WBXML_ITERATE_MORE]
+ More to iterate. This value valid.
+
+ [NW_STAT_WBXML_ITERATE_DONE]
+ Nothing more to iterate. This value not valid.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_Encoder_StringTable_StringTableIterateNext(void* pStringTableIterator,
+ NW_Uint32* pByteCount,
+ NW_Uint8** ppBuf);
+
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_encoder_wbxmlwriter.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,982 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_Encoder
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef NW_WBXMLWRITER_H
+#define NW_WBXMLWRITER_H
+
+#include <xml/cxml/nw_wbxml_dictionary.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+struct NW_WBXML_Writer_s;
+
+/* ----------------------------------------------------------------------- **
+ If the string is in the table, set *pFound = NW_TRUE, else set
+ *pFound = NW_FALSE. Return a failure code only if something else goes wrong
+ (e.g., out of memory)
+** ----------------------------------------------------------------------- **/
+typedef
+NW_Status_t (*NW_WBXML_Writer_GetStringTableOffset_t)(void* pStringTableObject,
+ NW_Uint32 byteCount,
+ const NW_Uint8* pString,
+ NW_Bool* pFound,
+ NW_Uint32* pTableOffset);
+
+/* ----------------------------------------------------------------------- **
+ If for some reason the string can't be added to the table,
+ return a failure status code.
+** ----------------------------------------------------------------------- **/
+typedef
+NW_Status_t (*NW_WBXML_Writer_AddToStringTable_t)(void* pStringTableObject,
+ NW_Uint32 byteCount,
+ const NW_Uint8* pString,
+ NW_Uint32* pTableOffset);
+
+/* at end of string table return byteCount = 0 */
+typedef
+NW_Status_t (*NW_WBXML_Writer_StringTableIterateInit_t)(void* pStringTableObject,
+ void* pStringTableIterator);
+
+/* at end of string table return byteCount = 0 */
+typedef
+NW_Status_t (*NW_WBXML_Writer_StringTableIterateNext_t)(void* pStringTableIterator,
+ NW_Uint32* pByteCount,
+ NW_Uint8** ppBuf);
+
+/* the callback is responsible for updating the writer structure
+ byteCount and pBuf */
+typedef
+NW_Status_t (*NW_WBXML_Writer_GrowBuf_t)(struct NW_WBXML_Writer_s*,
+ NW_Uint32 writeLength);
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_WBXML_Writer
+
+ @synopsis: The WBXML writer structure.
+
+ @scope: public
+ @variables:
+ NW_Uint32 index
+ Read/write position.
+
+ NW_Uint32 byteCount
+ Allocated length
+
+ NW_Uint8* pBuf
+ The buffer.
+
+ NW_WBXML_Writer_GrowBuf_t growBufCallback
+ Callback.
+
+ NW_WBXML_Dictionary_t* pTagDictionary
+ The tag dictionary.
+
+ NW_WBXML_Dictionary_t* pAttributeDictionary
+ The attribute dictionary.
+
+ NW_WBXML_Writer_GetStringTableOffset_t getStringTableOffset
+ Callback.
+
+ NW_WBXML_Writer_AddToStringTable_t addToStringTable
+ Callback
+
+ void* pStringTableObject
+ The string table.
+
+ NW_WBXML_Writer_StringTableIterateInit_t stringTableIterateInit
+ llback.
+
+ NW_WBXML_Writer_StringTableIterateNext_t stringTableIterateNext
+ Callback.
+
+ NW_Uint8 tagCodePage
+ The tag code page.
+
+ NW_Uint8 attributeCodePage
+ The attribute code page.
+
+ NW_Bool sizing
+ If sizing != 0 then don't write to buffer. Increment
+ index as though writing so that final value of index
+ indicates the required byteCount for allocating buffer.
+
+ @description: The WBXML writer structure. Contains all the callbacks
+ as well as cursor and dictionary data.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_WBXML_Writer_s {
+ NW_Uint32 index; /* a read/write position */
+ NW_Uint32 byteCount; /* allocated length */
+ NW_Uint8* pBuf;
+ NW_WBXML_Writer_GrowBuf_t growBufCallback;
+
+ NW_WBXML_Dictionary_t* pTagDictionary;
+ NW_WBXML_Dictionary_t* pAttributeDictionary;
+
+ NW_WBXML_Writer_GetStringTableOffset_t getStringTableOffset;
+ NW_WBXML_Writer_AddToStringTable_t addToStringTable;
+ void* pStringTableObject;
+
+ NW_WBXML_Writer_StringTableIterateInit_t stringTableIterateInit;
+ NW_WBXML_Writer_StringTableIterateNext_t stringTableIterateNext;
+
+ NW_Uint8 tagCodePage;
+ NW_Uint8 attributeCodePage;
+
+ /* if sizing != 0 then don't write to buf, increment index as
+ though writing so that final value of index indicates the
+ required byteCount for allocating buf */
+ NW_Bool sizing;
+ // WLIU_DEBUG: NW_Int32 cp_count;
+} NW_WBXML_Writer_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_Initialize
+
+ @synopsis: Initializes the writer for use.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_Uint32 byteCount
+ Allocated length.
+
+ [in] NW_Uint8* pBuf
+ The buffer.
+
+ [in] NW_WBXML_Writer_GrowBuf_t growBufCallback
+ Callback.
+
+ [in] NW_WBXML_Dictionary_t* pTagDictionary
+ Tag dictionary.
+ [in] NW_WBXML_Dictionary_t* pAttributeDictionary
+ Attribute dictionary.
+
+ [in] NW_WBXML_Writer_GetStringTableOffset_t getStringTableOffset
+ Callback.
+
+ [in] NW_WBXML_Writer_AddToStringTable_t addToStringTable
+ Callback.
+
+ [in] void* pStringTableObject
+ The string table.
+
+ [in] NW_WBXML_Writer_StringTableIterateInit_t stringTableIterateStart
+ Callback.
+
+ [in] NW_WBXML_Writer_StringTableIterateNext_t stringTableIterateNext
+ Callback.
+
+ [in] NW_Bool sizing
+ If sizing != 0 then don't write to buffer. Increment
+ index as though writing so that final value of index
+ indicates the required byteCount for allocating buffer.
+
+ @description: It is OK to use byteCount==0 and pBuf==NULL if you
+ have a growBufCallback or if no allocation is needed
+ because sizing==1. If you do a sizing pass and then
+ allocate and set pBuf you can also set
+ growBufCallback==NULL as no additional memory should
+ be required. No malloc's or free's are in the WBXML
+ writer code. If you have no string table then null
+ the various string table related pointers.
+ Client should free the writer object when finished.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C
+void
+NW_WBXML_Writer_Initialize(NW_WBXML_Writer_t* pW,
+ NW_Uint32 byteCount, NW_Uint8* pBuf,
+ NW_WBXML_Writer_GrowBuf_t growBufCallback,
+ NW_WBXML_Dictionary_t* pTagDictionary,
+ NW_WBXML_Dictionary_t* pAttributeDictionary,
+ NW_WBXML_Writer_GetStringTableOffset_t getStringTableOffset,
+ NW_WBXML_Writer_AddToStringTable_t addToStringTable,
+ void* pStringTableObject,
+ NW_WBXML_Writer_StringTableIterateInit_t stringTableIterateStart,
+ NW_WBXML_Writer_StringTableIterateNext_t stringTableIterateNext,
+ NW_Bool sizing);
+
+#define NW_WBXML_Writer_GetSize(pW) ((pW)->index)
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_SetToSizing
+
+ @synopsis: Initialize writer for sizing (no write).
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ @description: Initialize writer for sizing (no write).
+
+ ** ----------------------------------------------------------------------- **/
+void
+NW_WBXML_Writer_SetToSizing(NW_WBXML_Writer_t* pW);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_SetToWrite
+
+ @synopsis: Initialize writer for writing.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_Uint32 byteCount
+ Allocated buffer length
+
+ [in] NW_Uint8* pBuf
+ Allocated buffer.
+
+ @description: Initialize writer for writing.
+
+ ** ----------------------------------------------------------------------- **/
+void
+NW_WBXML_Writer_SetToWrite(NW_WBXML_Writer_t* pW,
+ NW_Uint32 byteCount, NW_Uint8* pBuf);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_Header
+
+ @synopsis: Write the document header.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_Uint8 WBxmlVersion
+ The version.
+
+ [in] NW_Uint32 publicIdentifier
+ The public identifier.
+
+ [in] NW_Uint32 charsetMIBEnum
+ The character set.
+
+ [in] NW_Uint32 stringTableByteCount
+ Size of string table.
+
+ @description: Write the document header. The string table byte count
+ will be 0 if there is no string table.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Header written.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Can't allocate memory to write header.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C
+NW_Status_t
+NW_WBXML_Writer_Header(NW_WBXML_Writer_t* pW, NW_Uint8 WBxmlVersion,
+ NW_Uint32 publicIdentifier, NW_Uint32 charsetMIBEnum,
+ NW_Uint32 stringTableByteCount);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_TagSetContentFlag
+
+ @synopsis: Set content flag.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_Uint32 index
+ Offset into buffer to find tag flag.
+
+ @description: If "index" points to a tag token, then this will
+ set content flags. Capture a tag index through the
+ pTagIndex argument to NW_WBXML_Writer_Tag.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Flag set.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C
+NW_Status_t
+NW_WBXML_Writer_TagSetContentFlag(NW_WBXML_Writer_t* pW, NW_Uint32 index);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_TagClearContentFlag
+
+ @synopsis: Clear content flag.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_Uint32 index
+ Offset into buffer to find tag flag.
+
+ @description: If "index" points to a tag token, then this will
+ clear content flags. Capture a tag index through
+ the pTagIndex argument to NW_WBXML_Writer_Tag.
+
+ @description: Clear content flag.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Flag set.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C
+NW_Status_t
+NW_WBXML_Writer_TagClearContentFlag(NW_WBXML_Writer_t* pW, NW_Uint32 index);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_TagSetAttributesFlag
+
+ @synopsis: Set attribute flag.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_Uint32 index
+ Index into buffer to find flag.
+
+ @description: If "index" points to a tag token, then this will
+ set attribute flags. Capture a tag index through
+ the pTagIndex argument to NW_WBXML_Writer_Tag.
+
+ @description: Set attribute flag.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Flag set.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C
+NW_Status_t
+NW_WBXML_Writer_TagSetAttributesFlag(NW_WBXML_Writer_t* pW, NW_Uint32 index);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_TagClearAttributesFlag
+
+ @synopsis: Clear attributes flag.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ Thw writer.
+
+ [in] NW_Uint32 index
+ Offset into buffer to find flag.
+
+ @description: If "index" points to a tag token, then this will
+ clear attribute flags. Capture a tag index through
+ the pTagIndex argument to NW_WBXML_Writer_Tag.
+
+ @description: Clear attributes flag.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Flag cleared.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Writer_TagClearAttributesFlag(NW_WBXML_Writer_t* pW, NW_Uint32 index);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_TagToken
+
+ @synopsis: Extracts token and writes it to buffer.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_Uint16 fqToken
+ The fully qualified token.
+
+ [in] NW_Uint32* pTagIndex
+ Index of tag into buffer.
+
+ @description: Extracts token and writes it to buffer.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Flag cleared.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Writer_TagToken(NW_WBXML_Writer_t* pW, NW_Uint16 fqToken,
+ NW_Uint32* pTagIndex);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_TagString
+
+ @synopsis: Writes tag string.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_Uint32 encoding
+ The encoding.
+
+ [in] NW_Uint32 charCount
+ Character count. It should not include null termination
+ character if any exists.
+
+ [in] NW_Uint32 byteCount
+ Byte count.
+
+ [in] NW_Uint8* pBuf
+ Buffer containing characters.
+
+ [out] NW_Uint32* pTagIndex
+ Contains the index to the tag token in the WBXML
+
+ @description: This function tries the following in sequence as required:
+ A. look in the dictionary for the string's token
+ B. look in the string table
+ C. look for reserved name "zzzunknown" token in the tag dictionary
+ If all fail, then the function returns NW_STAT_FAILURE.
+ On return, *pTagIndex contains the index to the tag token in the WBXML so
+ you can subsequently toggle the content and attribute flags.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Token found.
+
+ [NW_STAT_FAILURE]
+ Could not find token.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C
+NW_Status_t
+NW_WBXML_Writer_TagString(NW_WBXML_Writer_t* pW, NW_Uint32 encoding,
+ NW_Uint32 charCount, NW_Uint32 byteCount,
+ NW_Uint8* pBuf, NW_Uint32* pTagIndex);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_AttributeAndValue
+
+ @synopsis: Write attrbute and value.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_Uint32 encoding
+ The encoding.
+
+ [in] NW_Uint32 nameCharCount
+ Name character count.
+
+ [in] NW_Uint8* pName
+ Attribute name.
+
+ [in] NW_Uint32 valueCharCount
+ Value character count.
+
+ [in] NW_Uint32 valueByteCount
+ Value byte count.
+
+ [in] NW_Uint8* pValue
+ Value name.
+
+ @description: A convenience function for when attribute name and
+ value are given as text. The character count should not
+ include NULL termination character if any exists If there
+ is an attribute name but no value use valueCharCount==0,
+ valueByteCount==0 and pValue==NULL
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Attribute and value written.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Couldn't allocate memory for write.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C
+NW_Status_t
+NW_WBXML_Writer_AttributeAndValue(NW_WBXML_Writer_t* pW, NW_Uint32 encoding,
+ NW_Uint32 nameCharCount, NW_Uint8* pName,
+ NW_Uint32 valueCharCount,
+ NW_Uint32 valueByteCount,
+ NW_Uint8* pValue);
+
+IMPORT_C
+NW_Status_t
+NW_WBXML_Writer_AttributeAndValue2(NW_WBXML_Writer_t* pW, NW_Uint32 encoding,
+ NW_Uint32 nameCharCount, NW_Uint8* pName,
+ NW_Uint32 valueCharCount,
+ NW_Uint32 valueByteCount,
+ NW_Uint8* pValue,
+ NW_Uint32* cp_count);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_AttributeToken
+
+ @synopsis: Write attribute token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_Uint16 fqToken
+ The fully qualified token.
+
+ @description: Write attribute token.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Attribute and value written.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Couldn't allocate memory for write.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Writer_AttributeToken(NW_WBXML_Writer_t* pW, NW_Uint16 fqToken);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_AttributeNameString
+
+ @synopsis: Write attribute name token using string.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_Uint32 encoding
+ The encoding.
+
+ [in] NW_Uint32 nameCharCount
+ Character count of name. Should not include null termination
+ character if any exists.
+
+ [in] NW_Uint32 nameByteCount
+ Byte count of name.
+
+ [in] NW_Uint8* pName
+ The name.
+
+ @description: Write attribute name token using string.
+ This function tries the following in sequence as required:
+ A. look in the dictionary for the string's token
+ B. look in the string table
+ C. look for reserved name "zzzunknown" token in the attribute dictionary
+ If all fail, then the function returns NW_STAT_FAILURE.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Attribute and value written.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Couldn't allocate memory for write.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Writer_AttributeNameString(NW_WBXML_Writer_t* pW, NW_Uint32 encoding,
+ NW_Uint32 nameCharCount,
+ NW_Uint32 nameByteCount, NW_Uint8* pName);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_Entity
+
+ @synopsis: Writes entity and its token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_Uint32 entity
+ The entity.
+
+ @description: Writes entity and its token.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Attribute and value written.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Couldn't allocate memory for write.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Writer_Entity(NW_WBXML_Writer_t* pW,
+ NW_Uint32 entity);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_ExtensionUseStringTable
+
+ @synopsis: Writes EXT_T_[0,1,2] extension forms only and uses
+ the string table to hold the string.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_Uint16 fqToken
+ The fully qualified token.
+
+ [in] NW_Uint32 byteCount
+ byte count for string buffer including null termination
+
+ [in] NW_Uint8* pBuf
+ pointer to the null terminated string data
+
+ @description: This is a helper function for the basic extension writing
+ function for the particular case of EXT_T_[0,1,2] tokens
+ where the string must be put in the string table.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Entity written.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Couldn't allocate memory for write.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Writer_ExtensionUseStringTable(NW_WBXML_Writer_t* pW,
+ NW_Uint16 fqToken,
+ NW_Uint32 byteCount,
+ NW_Uint8* pBuf);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_Extension
+
+ @synopsis: Writes extension.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_Uint16 fqToken
+ The fully qualified token.
+
+ [in] NW_Uint32 anonymousValue
+ Optional extension value.
+
+ [in] NW_Uint32 byteCount
+ Optional extension byte count.
+
+ [in] NW_Uint8* pBuf
+ Optional extension text.
+
+ @description: There are three type of extensions:
+ 1. one of three possible single byte tokens
+ NW_WBXML_EXT_[0,1,2]
+ 2. an extension token followed by a multibyte encoded NW_Uint32 value
+ NW_WBXML_EXT_T_[0,1,2] multibyte(anonymousValue)
+ 3. an extension token followed by an in-line string
+ NW_WBXML_EXT_I_[0,1,2] null-terminated-string
+
+ This function handles all three cases so you have to pass the
+ appropriate arguments for each case. For each fqToken should be
+ one of NW_WBXML_EXT_[0,1,2] (with any page value):
+
+ 1. anonymousValue, byteCount and pBuf should be 0 or NULL
+
+ 2. anonymousValue should be the value to multibyte encode
+ and byteCount and pBuf should be 0 and NULL
+
+ 3. byteCount should be the byte length of the null terminated string
+ pointed to by pBuf and anonymousValue is ignored
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Entity written.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Couldn't allocate memory for write.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Writer_Extension(NW_WBXML_Writer_t* pW,
+ NW_Uint16 fqToken,
+ NW_Uint32 anonymousValue,
+ NW_Uint32 byteCount,
+ NW_Uint8* pBuf);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_Opaque
+
+ @synopsis: Writes opaque data.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_Uint32 byteCount
+ Length of opaque.
+
+ [in] NW_Uint8* pBuf
+ Opaque data.
+
+ @description: Writes opaque data.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Opaque written.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Couldn't allocate memory for write.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C
+NW_Status_t
+NW_WBXML_Writer_Opaque(NW_WBXML_Writer_t* pW, NW_Uint32 byteCount,
+ NW_Uint8* pBuf);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_Text
+
+ @synopsis: Write text or reference.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ [in] NW_Uint32 encoding
+ The encoding.
+
+ [in] NW_Uint32 byteCount
+ The text byte count.
+
+ [in] const NW_Uint8* pText
+ The text.
+
+ @description: If string is already in the string table, this writes
+ a reference otherwise it writes an in-line string.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Text written.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Couldn't allocate memory for write.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C
+NW_Status_t
+NW_WBXML_Writer_Text(NW_WBXML_Writer_t* pW, NW_Uint32 encoding,
+ NW_Uint32 byteCount, const NW_Uint8* pText);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_PI
+
+ @synopsis: Writes the beginning PI token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ The writer.
+
+ @description: Just writes the beginning PI token. The remainder of
+ the PI must be written just like an attribute.
+ The grammar is:
+ PI attributeName [attributeValue...] END
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Process instruction written.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Couldn't allocate memory for write.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C
+NW_Status_t
+NW_WBXML_Writer_PI(NW_WBXML_Writer_t* pW);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Writer_End
+
+ @synopsis: Writes end of element, end of attribute list or end of PI
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Writer_t* pW
+ default
+
+ @description: Writes end of element, end of attribute list or end of PI.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ End written.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Couldn't allocate memory for write.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C
+NW_Status_t
+NW_WBXML_Writer_End(NW_WBXML_Writer_t* pW);
+
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* NW_WBXMLWRITER_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_string_char.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,405 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_String
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef NW_STRING_CHARACTER_H
+#define NW_STRING_CHARACTER_H
+
+#include <xml/cxml/cxml_proj.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#define HTTP_iso_10646_ucs_2 0x03E8
+#define HTTP_iso_8859_1 0x04
+#define HTTP_us_ascii 0x03
+#define HTTP_utf_8 0x6A
+#define HTTP_utf_16 1015
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_String_UCS2Buff
+
+ @synopsis: A ucs2 character as stored in a ucs2 string.
+
+ @scope: public
+ @variables:
+ NW_Byte bytes[2]
+ default
+
+ @description: A ucs2 character as stored in a ucs2 string. This is
+ different from a NW_Ucs2 which is a 16 bit unsigned
+ quantity stored in the platform's native integer
+ representation. NW_UCS2Buff_t stores bytes in
+ native-endian format.
+
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_String_UCS2Buff_s {
+ NW_Byte bytes[2];
+} NW_String_UCS2Buff_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_charsetValid
+
+ @synopsis: Checks if charset is valid.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Uint32 encoding
+ default
+
+ @description: Checks if charset is valid.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Valid charset.
+
+ [NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED]
+ Invalid charset.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_String_charsetValid (NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_valid
+
+ @synopsis: Validate string storage.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Byte* storage
+ The storage.
+
+ [in] NW_Uint32 length
+ The length.
+
+ [in] NW_Uint32 encoding
+ The encoding.
+
+ @description: Validate string storage.
+
+ @returns: NW_Int32
+ 1 if storage is specified encoding, otherwise 0.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Int32
+NW_String_valid(NW_Byte* storage, NW_Uint32 length, NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_writeUTF8Char
+
+ @synopsis: Write chars to storage in UTF8 format.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Ucs2 c
+ Character to write.
+
+ [in-out] NW_Byte* buff
+ Buffer to write into.default
+
+ @description: Write a NW_Ucs2 into a buffer as UTF8. Returns number of
+ bytes written.
+
+ @returns: NW_Uint32
+ Number of bytes written.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Uint32
+NW_String_writeUTF8Char (NW_Ucs2 c, NW_Byte* buff);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_readChar
+
+ @synopsis: Read chars from storage.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Byte* buff
+ default
+
+ [out] NW_Ucs2* c
+ default
+
+ [in] NW_Uint32 encoding
+ default
+
+ @description: Read one character of some encoding, returning the
+ NW_Ucs2 equivalent and the count of raw bytes read.
+
+ @returns: NW_Int32
+ Number of characters read or -1 if invalid encoding.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Int32
+NW_String_readChar (NW_Byte* buff, NW_Ucs2* c, NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_charBuffGetLength
+
+ @synopsis: String length of input character buffer.
+
+ @scope: public
+
+ @parameters:
+ [in] void* buffer
+ default
+
+ [in] NW_Uint32 encoding
+ default
+
+ [out] NW_Uint32* byte_count
+ default
+
+ @description: Get the length of a character string in some
+ encoding. Returns the number of characters (less the
+ terminating char). The out param byte_count returns
+ the number of bytes of storage scanned (including the
+ terminating char). Note that there is NO validity
+ check here. This should be done first if needed.
+
+ @returns: NW_Int32
+ Returns number of characters read.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Int32
+NW_String_charBuffGetLength (void* buffer, NW_Uint32 encoding, NW_Uint32* byte_count);
+
+
+/* ----------------------------------------------------------------------- **
+ Conversions
+** ----------------------------------------------------------------------- **/
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_charToUCS2Buff
+
+ @synopsis: Convert to UCS2 buffer.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Byte* s
+ Characters to convert.
+
+ [in] NW_Uint32 encoding
+ Initial encoding.
+
+ @description: Conversions among character strings of various types
+ and ucs2. These functions assume that the length in
+ characters of the input buffer has been
+ pre-calculated, so that this operation doesn't have to
+ be performed for every conversion. This works well for
+ String_t which store the character count.
+
+ @returns: NW_String_UCS2Buff_t*
+ New UCS2 buffer or NULL if failed.
+
+ ** ----------------------------------------------------------------------- **/
+NW_String_UCS2Buff_t*
+NW_String_charToUCS2Buff (NW_Byte* s, NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_UTF8ToUCS2Buff
+
+ @synopsis: Convert UTF8 to UCS2 buffer.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Byte* s
+ Characters to convert.
+
+ @description: Convert UTF8 to UCS2 buffer.
+
+ @returns: NW_String_UCS2Buff_t*
+ Converted buffer or NULL if failed.
+
+ ** ----------------------------------------------------------------------- **/
+NW_String_UCS2Buff_t*
+NW_String_UTF8ToUCS2Buff (NW_Byte* s);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_ISO88591ToUCS2Buff
+
+ @synopsis: Convert ISO88591 to UCS2 buffer.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Byte* s
+ Characters to convert.
+
+ @description: Convert ISO88591 to UCS2 buffer.
+
+ @returns: NW_String_UCS2Buff_t*
+ Converted buffer or NULL if failed.
+
+ ** ----------------------------------------------------------------------- **/
+NW_String_UCS2Buff_t*
+NW_String_ISO88591ToUCS2Buff (NW_Byte* s);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_UCS2ToUTF8
+
+ @synopsis: Convert UCS2 to UTF8.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_String_UCS2Buff_t* s
+ Characters to convert.
+
+ [in] NW_Uint32 length
+ Number of characters.
+
+ @description: Convert UCS2 to UTF8.
+
+ @returns: NW_Byte*
+ Converted buffer or NULL if failed.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Byte*
+NW_String_UCS2ToUTF8 (NW_String_UCS2Buff_t* s, NW_Uint32 length);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_UCS2ToISO88591
+
+ @synopsis: Convert UCS2 to ISO88591.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_String_UCS2Buff_t* s
+ Characters to convert.
+
+ [in] NW_Uint32 length
+ Number of characters.
+
+ @description: Convert UCS2 to ISO88591.
+
+ @returns: NW_Byte*
+ Converted buffer or NULL if failed.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Byte*
+NW_String_UCS2ToISO88591 (NW_String_UCS2Buff_t* s, NW_Uint32 length);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_UCS2BuffCmp
+
+ @synopsis: Ordered comparison of ucs2 strings.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_String_UCS2Buff_t* s1
+ The character buffer.
+
+ [in] NW_String_UCS2Buff_t* s2
+ The other character buffer.
+
+ [in] NW_Bool matchCase
+ If NW_TRUE then case sensitive comparison.
+
+ @description: Ordered comparison of ucs2 strings.
+
+ @returns: NW_Int32
+ Return 0 if equal, -1 if s1 comes before s2 otherwise 1.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Int32
+NW_String_UCS2BuffCmp (NW_String_UCS2Buff_t* s1,
+ NW_String_UCS2Buff_t* s2,
+ NW_Bool matchCase);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_CmpToNativeAlignedUCS2
+
+ @synopsis: Compare to native aligned UCS2.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Uint32 encoding
+ The encoding.
+
+ [in] NW_Uint32 charCount
+ The charcount.
+
+ [in] NW_Uint8* s1
+ The character buffer.
+
+ [in] NW_Uint16* s2
+ The other character buffer.
+
+ [out] NW_Int32* r
+ Result of comparison.
+
+ @description: Compare to native aligned UCS2. Assumes s2 is null
+ terminated, native byte order and aligned for
+ 16-bit access.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Valid string.
+
+ [NW_STAT_FAILURE]
+ Invalid string.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_String_CmpToNativeAlignedUCS2 (NW_Uint32 encoding, NW_Uint32 charCount,
+ NW_Uint8* s1, NW_Uint16* s2,
+ NW_Int32* r);
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* NW_STRING_CHARACTER_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_string_string.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,909 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_String
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef NW_STRING_STRING_H
+#define NW_STRING_STRING_H
+
+#include <xml/cxml/cxml_proj.h>
+#include <xml/cxml/nw_string_char.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_String_String
+
+ @synopsis: The basic wbxml string type.
+
+ @scope: public
+ @variables:
+ NW_Uint32 length
+ In bytes.
+
+ NW_Byte* storage
+ default
+
+ @description: The basic wbxml string type.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_String_String_s{
+ NW_Uint32 length;
+ NW_Byte* storage;
+}NW_String_String_t;
+
+/* Deprecated - Left in for backward compatibility */
+typedef struct NW_String_String_s NW_String_t;
+
+typedef struct NW_String_String_s NW_String_UCS2String_t;
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_new
+
+ @synopsis: Consructor.
+
+ @scope: public
+
+ @description: Constructor.
+
+ @returns: NW_String_t*
+ New string or NULL if out of memory.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_String_t*
+NW_String_new (void);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_initialize
+
+ @synopsis: Initialize.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_String_t* string
+ The string.
+
+ [in] void* storage
+ The storage.
+
+ [in] NW_Uint32 encoding
+ The encoding.
+
+ @description: Initialize the string by assigning length, encoding
+ and storage. Note that the length is calculated.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ String initialized.
+
+ [NW_STAT_FAILURE]
+ String not initialized.
+
+ [NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED]
+ Unsupported charset.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_String_initialize (NW_String_t* string, void *storage, NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_delete
+
+ @synopsis: Delete.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_String_t* string
+ The string.
+
+ @description: Freeing a string may not free the storage. String storage
+ is complicated by the fact that it can be allocated outside
+ the bounds of the parser. If so, it is not freed here.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C void
+NW_String_delete(NW_String_t* string);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_getByteCount
+
+ @synopsis: Returns number of bytes in the string including NULL
+ terminator.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_String_t* string
+ The string.
+
+ @description: Returns number of bytes in the string including NULL
+ terminator.
+
+ @returns: NW_Uint16
+ Length in bytes.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Uint32
+NW_String_getByteCount (NW_String_t* string);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_getCharCount
+
+ @synopsis: Returns number of characters in the string excluding NULL
+ terminator.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_String_t* string
+ The string.
+
+ [in] NW_Uint32 encoding
+ The encoding.
+
+ @description: Returns number of characters in the string excluding NULL
+ terminator.
+
+ @returns: NW_Uint16
+ Length of string in characters.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Uint16
+NW_String_getCharCount(NW_String_t* string, NW_Uint32 encoding);
+
+/*
+ * The following function is a duplication of NW_String_getByteCount to
+ * handle big files. For not affecting the components other than
+ * browser, this function is only called inside the browser.).
+ *
+ * INSTEAD OF CALLING NW_String_getByteCount, ALL THE BROWSER CODES SHOULD
+ * CALL THIS DUPLICATE FUNCTION TO GET CHARACTER COUNTS.
+ *
+ */
+IMPORT_C NW_Uint32
+NW_String_getCharCount32(NW_String_t* string, NW_Uint32 encoding);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_getStorage
+
+ @synopsis: Returns NULL or valid storage.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_String_t* str
+ The string.
+
+ @description: Returns the storage occupied by the string (in bytes).
+
+ @returns: NW_Byte*
+ String storage.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Byte*
+NW_String_getStorage(NW_String_t* str);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_equals
+
+ @synopsis: Determines if strings are equal.
+
+ @scope: public
+
+ @parameters:
+ [in] const NW_String_t* string1
+ The string.
+
+ [in] const NW_String_t* string2
+ The other string.
+
+ @description: This function assumes the encoding of each string is
+ the same. It does not attempt to convert strings of
+ different encodings because encoding is regarded as
+ implicit for XML strings. NOte that if both string
+ pointers are NULL thay are considered unequal.
+
+ @returns: NW_Int32
+ 1 if the strings are equal; otherwise 0.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Int32
+NW_String_equals(const NW_String_t* string1, const NW_String_t* string2);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_getUserOwnsStorage
+
+ @synopsis: Get user owns storage flag.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_String_t* s
+ The string.
+
+ @description: Get user owns storage flag. If the user owns the storage
+ it means that this string is the sole user of the storage
+ and can delete it when done.
+
+ @returns: NW_Bool
+ NW_TRUE if user owns storage, otherwise NW_FALSE.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Bool
+NW_String_getUserOwnsStorage(NW_String_t* s);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_setUserOwnsStorage
+
+ @synopsis: Set user owns storage flag.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_String_t* s
+ The string.
+
+ @description: Set user owns storage flag. (see NW_String_getUserOwnsStorage)
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_String_setUserOwnsStorage(NW_String_t* s);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_clearUserOwnsStorage
+
+ @synopsis: Clear user owns storage flag.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_String_t* s
+ The string.
+
+ @description: Clear user owns storage flag. This means that someone
+ else may own the storage.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_String_clearUserOwnsStorage(NW_String_t* s);
+
+/* ----------------------------------------------------------------------- **
+ Conversion routines
+** ----------------------------------------------------------------------- **/
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_stringToUCS2
+
+ @synopsis: Convert string to UCS2.
+
+ @scope: public
+
+ @parameters:
+ [out] NW_String_UCS2String_t** u
+ The converted string.
+
+ [in] NW_String_t* string
+ The string to convert.
+
+ [in] NW_Uint32 encoding
+ The encoding of the string to be converted
+
+ @description: Converts a string of a given encoding to ucs2_char.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ String converted.
+
+ [NW_STAT_FAILURE]
+ String not converted.
+
+ [NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED]
+ Unsupported charset.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_String_stringToUCS2(NW_String_UCS2String_t** u, NW_String_t* string, NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_UCS2BuffToString
+
+ @synopsis: Convert UCS2 buffer to string.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_String_UCS2Buff_t* u
+ Source of data to convert.
+
+ [out] NW_String_t* string
+ The converted string.
+
+ [in] NW_Uint32 encoding
+ default
+
+ @description: Convert UCS2 buffer to string.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ String converted.
+
+ [NW_STAT_OUT_OFMEMORY]
+ Out of memory.
+
+ [NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED]
+ Unsupported charset.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_String_UCS2BuffToString(NW_String_UCS2Buff_t* u, NW_String_t* string, NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_stringToUCS2Buff
+
+ @synopsis: Convert string to UCS2 buffer.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_String_t* string
+ The string.
+
+ [in] NW_Uint32 encoding
+ Initial encoding.
+
+ @description: Convert a NW_String_t (in any of the supported character
+ set encodings) to a UCS2Buff string. Caller is responsible
+ for freeing the pointer returned by this function. Returned
+ array is null-terminated.
+
+ @returns: NW_String_UCS2Buff_t*
+ USC2 buffer or NULL if it fails.
+
+ ** ----------------------------------------------------------------------- **/
+NW_String_UCS2Buff_t*
+NW_String_stringToUCS2Buff(NW_String_t* string, NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_ucs2CharToString
+
+ @synopsis: Convert UCS2 characters to string.
+ @scope: public
+
+ @parameters:
+ [in-out] NW_String_t* string
+ The string.
+
+ [in] NW_Ucs2* u
+ The characters to convert.
+
+ [in] NW_Uint32 encoding
+ Target encoding.
+
+ @description: Convert UCS2 characters to string.
+
+ @returns: NW_Status_t
+ The status of the operation.
+
+ [NW_STAT_SUCCESS]
+ String filled with chars.
+
+ [NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED]
+ Unsupported encoding.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ String storage could not be allocated.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_String_ucs2CharToString (NW_String_t* string, NW_Ucs2* u, NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_entityToString
+
+ @synopsis: Convert entity to string.
+ @scope: public
+
+ @parameters:
+ [in] NW_Uint32 entity
+ default
+
+ [in-out] NW_String_t* str
+ The string.
+
+ [in] NW_Uint32 encoding
+ Target encoding.
+
+ @description: Convert entity to string.
+
+ @returns: NW_Status_t
+ The status of the operation.
+
+ [NW_STAT_SUCCESS]
+ String initialized from entity.
+
+ [NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED]
+ Unsupported encoding.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ String storage could not be allocated.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_String_entityToString(NW_Uint32 entity, NW_String_t* str, NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_byteToString
+
+ @synopsis: Convert byte array to string.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Byte* s
+ Bytes to initialize string with.
+
+ [in-out] NW_String_t* str
+ The string.
+
+ [in] NW_Uint32 encoding
+ The encoding.
+
+ @description: Convert byte to string.
+
+ @returns: NW_Status_t
+ The status of the operation.
+
+ [NW_STAT_SUCCESS]
+ String initialized from bytes.
+
+ [NW_STAT_FAILURE]
+ String not initialized.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_String_byteToString(NW_Byte* s, NW_String_t* str, NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_tokenToString
+
+ @synopsis: Token to string.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Uint32 token
+ default
+
+ [in-out] NW_String_t* str
+ The string.
+
+ [in] NW_Uint32 encoding
+ default
+
+ @description: Token to string.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ String converted.
+
+ [NW_STAT_FAILURE]
+ Token not found in current dictionary.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Out of memory.
+
+ [NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED]
+ Unsupported charset.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_String_tokenToString(NW_Uint32 token, NW_String_t* str, NW_Uint32 encoding);
+
+/* ----------------------------------------------------------------------- **
+ String manipulation functions
+** ----------------------------------------------------------------------- **/
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_copy
+
+ @synopsis: Copy string duplicating storage.
+
+ @scope: public
+
+ @parameters:
+ [out] NW_String_t* dest
+ The destination string.
+
+ [in] NW_String_t* source
+ The source string.
+
+ @description: If the source owns the storage (i.e. it can modify and/or
+ delete it) than performs a deep copy. This duplicates the
+ storage. Otherwise it performs a shallow copy.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ String copied.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Ran out of memory.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_String_copy(NW_String_t* dest, NW_String_t* source);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_shallowCopy
+
+ @synopsis: Copies without duplicating storage.
+
+ @scope: public
+
+ @parameters:
+ [out] NW_String_t* dest
+ The destination string.
+
+ [in] NW_String_t* source
+ The source string.
+
+ @description: Performs a shallow copy. The storage is shared with
+ the copy, not duplicated.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_String_shallowCopy(NW_String_t* dest, NW_String_t* source);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_deepCopy
+
+ @synopsis: Copy string duplicating storage.
+
+ @scope: public
+
+ @parameters:
+ [out] NW_String_t* dest
+ The destination string.
+
+ [in] NW_String_t* source
+ The source string.
+
+ @description: Performs a deep copy. The storage is duplicated so it
+ is not shared with the original.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ String copied.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Ran out of memory.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_String_deepCopy(NW_String_t* dest, NW_String_t* source);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_concatenate
+
+ @synopsis: Concatenates two strings together.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_String_t* dest
+ The destination string.
+
+ [in] NW_String_t* source
+ The source string.
+
+ [in] NW_Uint32 encoding
+ Encoding both strings are assumed to have.
+
+ @description: Concatenated two strings together.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ String copied.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Ran out of memory.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_String_concatenate(NW_String_t* dest, NW_String_t* source, NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_findChar
+
+ @synopsis: Finds char in string.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_String_t* string
+ The string.
+
+ [in] NW_Int32 character
+ Character to find.
+
+ @description: Find char in string.
+
+ @returns: NW_Byte*
+ Pointer to character if found, otherwise NULL.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Byte*
+NW_String_findChar(NW_String_t* string, NW_Int32 character, NW_Uint32 encoding);
+
+
+/* ----------------------------------------------------------------------- **
+ Functions
+** ----------------------------------------------------------------------- **/
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_ucs2CharInit
+
+ @synopsis: Initialize UCS2 characters.
+
+ @scope: public
+
+ @parameters:
+ [out] NW_Ucs2** data
+ Allocated storage.
+
+ [in] NW_Uint32 length
+ The length.
+
+ @description: Allocates enough storage to hold the specified number
+ of characters.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ String copied.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Ran out of memory.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_String_ucs2CharInit(NW_Ucs2** data, NW_Uint32 length);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_ucs2CharLength
+
+ @synopsis: Get character length.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Ucs2* data
+ Buffer to count.
+
+ @description: Get character length.
+
+ @returns: NW_Int32
+ Length of buffer in characters.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Int32
+NW_String_ucs2CharLength (NW_Ucs2* data);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_byteToUCS2Char
+
+ @synopsis: Convert byte to UCS2 characters.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Byte* b
+ default
+
+ [in] NW_Uint32 length
+ default
+
+ [out] NW_Ucs2** data
+ default
+
+ @description: Given an arbitrary NW_Byte array with no known character
+ encoding, convert it to a NW_Ucs2 string. Actually it
+ copies the bytes and assumes the source is UCS2 encoding.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Bytes copied.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Ran out of memory.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_String_byteToUCS2Char (NW_Byte* b, NW_Uint32 length, NW_Ucs2** data);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_entityToUCS2Char
+
+ @synopsis: Convert entity to UCS2 character.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Uint32 entity
+ default
+
+ [out] NW_Ucs2** data
+ default
+
+ @description: Convert entity to UCS2 character.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Bytes copied.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Ran out of memory.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_String_entityToUCS2Char(NW_Uint32 entity, NW_Ucs2** data);
+
+/*
+ * Given an arbitrary NW_Byte array with no known character encoding,
+ * convert it to a NW_Ucs2 string.
+ *
+ */
+/* Not used. 8/14/01 */
+/*
+NW_Status_t
+NW_String_tokenToUCS2Char(NW_Uint32 token, NW_Ucs2** data);
+*/
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_stringToUCS2Char
+
+ @synopsis: default
+
+ @scope: public
+
+ @parameters:
+ [in] const string
+ default
+
+ [in] NW_Uint32 encoding
+ default
+
+ [out] NW_Ucs2 **data
+ default
+
+ @description: default
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Bytes copied.
+
+ [NW_STAT_FAILURE]
+ No bytes to copy.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Ran out of memory.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_String_stringToUCS2Char(const NW_String_t* string, NW_Uint32 encoding, NW_Ucs2 **data);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_String_deleteStorage
+
+ @synopsis: Delete storage.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_String_t* s
+ The string.
+
+ @description: Delete storage if user owns it otherwise does nothing.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_String_deleteStorage(NW_String_t* s);
+
+#ifdef __cplusplus
+} /*extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* NW_STRING_STRING_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_tinydom.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,1300 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_TinyDom
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef NW_TINY_DOM_H
+#define NW_TINY_DOM_H
+
+#include <xml/cxml/cxml_proj.h>
+#include <xml/cxml/nw_tinytree.h>
+#include <xml/cxml/nw_wbxml_document.h>
+#include <xml/cxml/nw_wbxml_parse.h>
+#include <xml/cxml/nw_wbxml_opaque.h>
+#include <xml/cxml/nw_encoder_wbxmlwriter.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+
+
+enum NW_TinyDom_ExtensionType_e {
+ NW_TINYDOM_EXTENSION_TYPE_NORMAL,
+ NW_TINYDOM_EXTENSION_TYPE_EXT_T_INTEGER
+};
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_TinyDom_Extension
+
+ @synopsis: Extension structure.
+
+ @scope: public
+ @variables:
+ NW_Uint32 token
+ Token.
+
+ NW_String_t string
+ Extension string.
+
+ @description: Extension structure.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_TinyDom_Extension_s{
+ /* type is either NW_TINYDOM_EXTENSION_TYPE_NORMAL or
+ NW_TINYDOM_EXTENSION_TYPE_EXT_T_INTEGER */
+ NW_Uint8 type;
+ NW_Uint32 token;
+ union {
+ NW_String_t string;
+ NW_Uint32 x;
+ } value;
+} NW_TinyDom_Extension_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @union: NW_TinyDom_AttrValComponent
+
+ @synopsis: Attribute value component union.
+
+ @scope: public
+ @variables:
+ NW_Uint32 value_token
+ token
+
+ NW_String_t string
+ string
+
+ NW_TinyDom_Extension_t ext
+ extension
+
+ NW_Uint32 entity
+ entity.
+
+ NW_WBXML_Opaque_t opaque
+ opaque
+
+ @description: Union of all possible attribute value types.
+ ** ----------------------------------------------------------------------- **/
+typedef union NW_TinyDom_AttrValComponent_u{
+ NW_Uint32 value_token;
+ NW_String_t string;
+ NW_TinyDom_Extension_t ext;
+ NW_Uint32 entity;
+ NW_WBXML_Opaque_t opaque;
+}NW_TinyDom_AttrValComponent_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_TinyDom_AttrVal
+
+ @synopsis: Attribute value.
+
+ @scope: public
+ @variables:
+ NW_Uint32 type
+ type
+
+ NW_TinyDom_AttrValComponent_t component
+ attribute value union of all possible types.
+
+ @description: An attribute value has a type info field and a union of
+ all the possible types. The type info values are defined
+ in NW_WBXML_Attribute.h. This type is designed to be
+ passed as an in/out param to the attribute value iterator.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_TinyDom_AttrVal_s {
+ NW_Uint32 type;
+ NW_TinyDom_AttrValComponent_t component;
+} NW_TinyDom_AttrVal_t;
+
+
+/* Node type bits */
+
+#define T_DOM_NODE_DOC (NW_Uint16)00
+#define T_DOM_NODE_TAG (NW_Uint16)01
+#define T_DOM_NODE_ATTR (NW_Uint16)02
+#define T_DOM_NODE_TEXT (NW_Uint16)03
+#define T_DOM_NODE_PI (NW_Uint16)04
+#define T_DOM_NODE_COMMENT (NW_Uint16)05
+#define T_DOM_NODE_CDATASECTION (NW_Uint16)06
+#define T_DOM_NODE_XML (NW_Uint16)80
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_TinyDom_Tree
+
+ @synopsis: Wrapper for tree components.
+
+ @scope: public
+ @variables:
+ NW_WBXML_Document_t* doc
+ The document.
+
+ NW_TinyTree_t tree
+ The tree.
+
+ NW_WBXML_Parser_t* parser
+ Parser associated with this tree.
+
+ NW_WBXML_Writer_t* writer
+ Writer for this tree.
+
+ NW_TinyTree_Node_t* root_node
+ Root node of tree.
+
+ @description: Wrapper for tree components.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_TinyDom_Tree_s{
+ NW_WBXML_Document_t* doc;
+ NW_TinyTree_t tree;
+ NW_WBXML_Parser_t* parser;
+ NW_WBXML_Writer_t* writer;
+ NW_TinyTree_Node_t* root_node;
+}NW_TinyDom_Tree_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_TinyDom_Parser
+
+ @synopsis: Parser structure.
+
+ @scope: public
+ @variables:
+ NW_Uint32 state
+ State.
+
+ NW_TinyTree_Offset_t node_count
+ default
+
+ NW_TinyTree_Offset_t cp_count
+ Current offset.
+
+ NW_TinyDom_Tree_t* dom_tree
+ The tree.
+
+ NW_TinyTree_Node_t* current_node
+ Present position in tree.
+
+ NW_TinyTree_Offset_t content_offset
+ Present offset into buffer.
+
+ @description: Parser structure.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_TinyDom_Parser_s{
+ NW_Uint32 state;
+ NW_TinyTree_Offset_t node_count;
+ NW_TinyTree_Offset_t cp_count;
+ NW_TinyDom_Tree_t* dom_tree;
+ NW_TinyTree_Node_t* current_node;
+ /* Offset where current content begins */
+ NW_TinyTree_Offset_t content_offset;
+}NW_TinyDom_Parser_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_Tree_construct
+
+ @synopsis: Constructor.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_TinyDom_Tree_t* domTree
+ The tree.
+
+ [in] NW_WBXML_Parser_t* wbxmlParser
+ The parser
+
+ [in] NW_WBXML_Document_t* doc
+ The document.
+
+ [in] NW_WBXML_Writer_t* writer
+ The writer.
+
+ @description: Constructor.
+
+ ** ----------------------------------------------------------------------- **/
+void
+NW_TinyDom_Tree_construct(NW_TinyDom_Tree_t* domTree,
+ NW_WBXML_Parser_t* wbxmlParser,
+ NW_WBXML_Document_t* doc,
+ NW_WBXML_Writer_t* writer);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_Tree_destruct
+
+ @synopsis: Destructor.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_TinyDom_Tree_t* domTree
+ The DOM tree.
+
+ @description: Destructor.
+
+ ** ----------------------------------------------------------------------- **/
+void
+NW_TinyDom_Tree_destruct(NW_TinyDom_Tree_t* domTree);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_Parser_construct
+
+ @synopsis: Constructor.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_Parser_t* domParser
+ The DOM parser.
+
+ [in] NW_TinyDom_Tree_t* domTree
+ The DOM tree.
+
+ @description: Constructor.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C void
+NW_TinyDom_Parser_construct(NW_TinyDom_Parser_t* domParser,
+ NW_TinyDom_Tree_t* domTree);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_Parser_destruct
+
+ @synopsis: Desctructor.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_TinyDom_Parser_t* domParser
+ The DOM parser.
+
+ @description: Destructor.
+
+ ** ----------------------------------------------------------------------- **/
+void
+NW_TinyDom_Parser_destruct(NW_TinyDom_Parser_t* domParser);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_Parser_buildTree
+
+ @synopsis: Build tiny DOM tree.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_Parser_t* domParser
+ The DOM parser.
+
+ [in] char* buffer
+ The buffer containing the document data.
+
+ [in] NW_Uint32 buffsize
+ The size of the document buffer.
+
+ [in] NW_Bool freeBuff
+ Flag
+
+ @description: Builds a DOM tree. The DOM parser must previously have
+ been initialized to use a parser (WBXML or XML) that
+ knows how to parse the contents of the buffer.Build tiny
+ DOM tree. Run Pass1 and Pass 2.
+
+ @returns: NW_Status_t
+ default
+
+ [NW_STAT_SUCCESS]
+ Tree built.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ General error.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Out of memory.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_TinyDom_Parser_buildTree(NW_TinyDom_Parser_t* domParser,
+ char* buffer,
+ NW_Uint32 buffsize,
+ NW_Bool freeBuff);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_Parser_incrementalBuildTree
+
+ @synopsis: build/append tiny DOM tree.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_Parser_t* domParser
+ The DOM parser.
+
+ [in] char* buffer
+ The buffer containing the document data.
+
+ [in] NW_Uint32 buffsize
+ The size of the document buffer.
+
+ [in] NW_Bool freeBuff
+ Flag
+
+ @description: Builds a DOM tree. The DOM parser must previously have
+ been initialized to use a parser (WBXML or XML) that
+ knows how to parse the contents of the buffer.Build tiny
+ DOM tree. Run Pass1 and Pass 2.
+
+ @returns: NW_Status_t
+ default
+
+ [NW_STAT_SUCCESS]
+ Tree built.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ General error.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Out of memory.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_TinyDom_Parser_incrementalBuildTree(NW_TinyDom_Parser_t* domParser,
+ char* buffer,
+ NW_Uint32 buffsize,
+ NW_Bool freeBuff,
+ NW_Int32 lastValid);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_Node_getType
+
+ @synopsis: Get node type.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_Node_t* node
+ The DOM parser.
+
+ @description: Get node type.
+
+ @returns: NW_Uint16
+ Node flag.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Uint16
+NW_TinyDom_Node_getType(NW_TinyTree_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_TinyDom_ListIterator
+
+ @synopsis: ListIterator structure.
+
+ @scope: public
+ @variables:
+ NW_Uint32 state
+ Iterator state.
+
+ void* segment
+ Segment
+
+ NW_TinyTree_Offset_t segSize
+ Segment size
+
+ NW_TinyTree_Offset_t offset
+ Offset into document.
+
+ NW_TinyDom_Parser_t* tiny_parser
+ Parser used for iteration.
+
+ void* context
+ Context.
+
+ @description: ListIterator structure.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_TinyDom_ListIterator_s {
+ NW_Uint32 state;
+ void* segment;
+ NW_TinyTree_Offset_t segSize;
+ NW_TinyTree_Offset_t offset;
+ NW_TinyDom_Parser_t* tiny_parser;
+ void* context;
+}NW_TinyDom_ListIterator_t;
+
+
+/* Tiny dom routines to support tags */
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_TinyDom_Tag
+
+ @synopsis: Tag structure.
+
+ @scope: public
+ @variables:
+ NW_TinyDom_Parser_t* tiny_parser
+ This parser.
+
+ NW_Uint32 fq_token
+ Token with codepage and attribute/element tag.
+
+ NW_Uint32 name_index
+ Index of first character of name into string table.
+
+ @description: Tag structure.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_TinyDom_Tag_s {
+ NW_TinyDom_Parser_t* tiny_parser;
+ NW_Uint32 fq_token;
+ NW_Uint32 name_index;
+}NW_TinyDom_Tag_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_getTagToken
+
+ @synopsis: Get tag token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_Parser_t* parser
+ The parser.
+
+ [in] NW_TinyTree_Node_t* node
+ Node to use.
+
+ @description: Get tag token.
+
+ @returns: NW_Uint32
+ Tag token.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Uint32
+NW_TinyDom_getTagToken(NW_TinyDom_Parser_t* parser,
+ NW_TinyTree_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_getTagName
+
+ @synopsis: Get tag name.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_Parser_t* parser
+ This parser.
+
+ [in] NW_TinyTree_Node_t* node
+ This node.
+
+ [out] NW_String_t* name
+ Name of tag.
+
+ @description: Get tag name.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Name found.
+
+ [NW_STAT_WBXML_NO_NAME]
+ No name found.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ No name found.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_TinyDom_getTagName(NW_TinyDom_Parser_t* parser,
+ NW_TinyTree_Node_t* node,
+ NW_String_t* name);
+
+/* Tiny dom routines to support attributes */
+
+/** ----------------------------------------------------------------------- **
+ @typedef: NW_TinyDom_AttrListHandle
+
+ @synopsis: Attribute list handle.
+
+ @scope: public
+ @type: NW_TinyDom_ListIterator_t
+
+ @description: Attribute list handle.
+ ** ----------------------------------------------------------------------- **/
+typedef NW_TinyDom_ListIterator_t NW_TinyDom_AttrListHandle_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_AttrListHandle_init
+
+ @synopsis: Initialize attribute list handle.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_AttrListHandle_t* handle
+ This handle.
+
+ [in] NW_TinyDom_Parser_t* parser
+ This parser.
+
+ [in] NW_TinyTree_Node_t* node
+ This node.
+
+ @description: Initialize attribute list handle.
+
+ ** ----------------------------------------------------------------------- **/
+void
+NW_TinyDom_AttrListHandle_init(NW_TinyDom_AttrListHandle_t* handle,
+ NW_TinyDom_Parser_t* parser,
+ NW_TinyTree_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_AttrListHandle_iterate
+
+ @synopsis: Iterate through a list of attributes.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_TinyDom_AttrListHandle_t* handle
+ The handle.
+
+ @description: Iterate through a list of attributes. There are no
+ attribute list callbacks since we just want to iterate
+ the attribute list, returning the start of each attribute.
+
+ @returns: NW_TinyTree_Offset_t
+ Tree offset or NULL if at end of iteration.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Offset_t
+NW_TinyDom_AttrListHandle_iterate(NW_TinyDom_AttrListHandle_t* handle);
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_TinyDom_AttributeHandle
+
+ @synopsis: An attribute handle, for iteration over values.
+
+ @scope: public
+ @variables:
+ NW_TinyDom_ListIterator_t tlit
+ The iterator structure.
+
+ void* value
+ The current value.
+
+ NW_Uint32 fq_token
+ Fully qualified token. That is: token, codepage and
+ attribute flag.
+
+ NW_Uint32 name_index
+ Index into string table.
+
+ @description: An attribute handle, for iteration over values.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_TinyDom_AttributeHandle_s {
+ NW_TinyDom_ListIterator_t tlit;
+ /* field value is a pointer to the struct to fill in by parsing */
+ NW_TinyDom_AttrVal_t* value;
+ NW_Uint32 fq_token;
+ NW_Uint32 name_index;
+} NW_TinyDom_AttributeHandle_t;
+
+
+/* ----------------------------------------------------------------------- **
+ Attribute values are made up of components of several types. These are
+ defined in WBXML/types.h
+** ----------------------------------------------------------------------- **/
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_AttributeHandle_init
+
+ @synopsis: Initialize an attribute handle.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_TinyDom_AttributeHandle_t* handle
+ The handle.
+
+ [in-out] NW_TinyDom_Parser_t* parser
+ The parser.
+
+ [in] NW_TinyTree_Offset_t offset
+ Offset into buffer.
+
+ @description: Initialize an attribute handle by parsing an attribute's
+ start token and values, calling the attribute handlers.
+
+ ** ----------------------------------------------------------------------- **/
+void
+NW_TinyDom_AttributeHandle_init(NW_TinyDom_AttributeHandle_t* handle,
+ NW_TinyDom_Parser_t* parser,
+ NW_TinyTree_Offset_t offset);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_AttributeHandle_valsIterate
+
+ @synopsis: Iterate over attribute values.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_TinyDom_ListIterator_t *it
+ The iterator.
+
+ @description: Initialize an attribute handle by parsing an attribute's
+ start token and values, calling the attribute handlers.
+
+ @returns: NW_TinyTree_Offset_t
+ Offset. If offset is 0, then at end of iteration.
+
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Offset_t
+NW_TinyDom_AttributeHandle_valsIterate(NW_TinyDom_ListIterator_t *it);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_AttributeHandle_getToken
+
+ @synopsis: Get the token from the handle.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_AttributeHandle_t* handle
+ dThe handle.
+
+ @description: Get the fully qualified token.
+
+ @returns: NW_Uint32
+ Token in handle structure.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Uint32
+NW_TinyDom_AttributeHandle_getToken(NW_TinyDom_AttributeHandle_t* handle);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_AttributeHandle_getName
+
+ @synopsis: Get the name from the handle.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_AttributeHandle_t* handle
+ The handle.
+
+ [out] NW_String_t* name
+ The name.
+
+ @description: Get the name, if any, from the handle.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Name found.
+
+ [NW_STAT_WBXML_NO_NAME]
+ Name not found.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ Invalid string in table.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_TinyDom_AttributeHandle_getName(NW_TinyDom_AttributeHandle_t* handle,
+ NW_String_t* name);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_AttributeHandle_iterateValues
+
+ @synopsis: Iterate the values.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_AttributeHandle_t* handle
+ The handle.
+
+ [out] NW_TinyDom_AttrVal_t* value
+ Attribute value.
+
+ @description: Iterate the values.
+
+ @returns: NW_TinyTree_Offset_t
+ Buffer offset or zero if done.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Offset_t
+NW_TinyDom_AttributeHandle_iterateValues(NW_TinyDom_AttributeHandle_t* handle,
+ NW_TinyDom_AttrVal_t* value);
+
+
+/* TODO: Add method to get values as a string */
+
+
+/** ----------------------------------------------------------------------- **
+ @typedef: NW_TinyDom_TextHandle
+
+ @synopsis: A text handle, for iteration over text components.
+
+ @scope: public
+ @type: NW_TinyDom_AttributeHandle_t
+
+ @description: A text handle, for iteration over text components.
+ ** ----------------------------------------------------------------------- **/
+typedef NW_TinyDom_AttributeHandle_t NW_TinyDom_TextHandle_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_TextHandle_init
+
+ @synopsis: Initialize a text handle.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_TextHandle_t* handle
+ The handle.
+
+ [in] NW_TinyDom_Parser_t* parser
+ The parser.
+
+ [in] NW_TinyTree_Offset_t offset
+ The offset.
+
+ @description: Initialize a text handle.
+
+ ** ----------------------------------------------------------------------- **/
+void
+NW_TinyDom_TextHandle_init(NW_TinyDom_TextHandle_t* handle,
+ NW_TinyDom_Parser_t* parser,
+ NW_TinyTree_Offset_t offset);
+
+
+/** ----------------------------------------------------------------------- **
+ @typedef: NW_TinyDom_Text
+
+ @synopsis: Text item types are a subset of attribute value types.
+
+ @scope: public
+ @type: NW_TinyDom_AttrVal_t
+
+ @description: Text item types are a subset of attribute value types.
+ ** ----------------------------------------------------------------------- **/
+typedef NW_TinyDom_AttrVal_t NW_TinyDom_Text_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_TextHandle_iterate
+
+ @synopsis: Text item iterator.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_TextHandle_t* handle
+ The handle.
+
+ [out] NW_TinyDom_Text_t* item
+ The returned text item.
+ @description: Iterate through the text items in a text element, calling
+ the text handlers
+
+ @returns: NW_TinyTree_Offset_t
+ Offset into buffer or zero if no item returned.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Offset_t
+NW_TinyDom_TextHandle_iterate(NW_TinyDom_TextHandle_t* handle,
+ NW_TinyDom_Text_t* item);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_getDocHeader
+
+ @synopsis: Get the doc header from the tiny tree.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tree.
+
+ @description: Get the doc header from the tiny tree.
+
+ @returns: NW_WBXML_Document_t*
+ Doc header or NULL if NULL tree.
+
+ ** ----------------------------------------------------------------------- **/
+NW_WBXML_Document_t*
+NW_TinyDom_getDocHeader(NW_TinyTree_t* tree);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_getParser
+
+ @synopsis: Get a pointer to the dom parser from the tiny_tree.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tree.
+
+ @description: Get a pointer to the dom parser from the tiny_tree.
+
+ @returns: NW_TinyDom_Parser_t*
+ default
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_TinyDom_Parser_t*
+NW_TinyDom_getParser(NW_TinyTree_t* tree);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_getTree
+
+ @synopsis: Get a pointer to the dom tree from a tiny tree.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tree.
+
+ @description: Get a pointer to the dom tree from a tiny tree.
+
+ @returns: NW_TinyDom_Tree_t*
+ POinter to the DOM tree or NULL if not found.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_TinyDom_Tree_t*
+NW_TinyDom_getTree(NW_TinyTree_t* tree);
+
+/* ----------------------------------------------------------------------- **
+ Dom write support methods: These are created as orphan nodes that
+ then need to be attached to the tree.
+** ----------------------------------------------------------------------- **/
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_createAttributeByToken
+
+ @synopsis: Create attribute by token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_Tree_t* dom_tree
+ The DOM tree.
+
+ [in] NW_Uint16 token
+ The token.
+
+ [in] NW_TinyDom_AttrVal_t* value
+ The new attribute.
+
+ @description: Create attribute by token as an orphan node that
+ then need to be attached to the tree.
+
+ @returns: NW_TinyTree_Node_t*
+ Pointer to the new node or NULL if not successful.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyDom_createAttributeByToken(NW_TinyDom_Tree_t* dom_tree,
+ NW_Uint16 token,
+ NW_TinyDom_AttrVal_t* value);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_createAttributeByName
+
+ @synopsis: Create attribute by name.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_Tree_t* dom_tree
+ The tree.
+
+ [in] NW_String_t* name
+ The name.
+
+ [in] NW_TinyDom_AttrVal_t* value
+ The new attribute.
+
+ @description: Create attribute by name as an orphan node that
+ then need to be attached to the tree.
+
+ @returns: NW_TinyTree_Node_t*
+ Pointer to the new node or NULL if not successful.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyDom_createAttributeByName(NW_TinyDom_Tree_t* dom_tree,
+ NW_String_t* name,
+ NW_TinyDom_AttrVal_t* value);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_AttributeHandle_initWithStartToken
+
+ @synopsis: Initialize the handle with a start token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_AttributeHandle_t* tinyHandle
+ The handle.
+
+ [out] NW_TinyTree_Node_t** ppNode
+ The tree node.
+
+ [in] NW_TinyDom_Parser_t* parser
+ The parser.
+
+ [in] NW_Uint16 fqToken
+ The token with page.
+
+ @description: Initialize the handle with a start token.
+
+ @returns: NW_Status_t
+
+ [NW_STAT_SUCCESS]
+ Success
+
+ [NW_STAT_FAILURE]
+ A failure other than out-of-memory.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Out of memory.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_TinyDom_AttributeHandle_initWithStartToken(NW_TinyDom_AttributeHandle_t* tinyHandle,
+ NW_TinyTree_Node_t** ppNode,
+ NW_TinyDom_Parser_t* parser,
+ NW_Uint16 fqToken);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_AttributeHandle_addVal
+
+ @synopsis: Append the attribute value to the attribute handle.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_AttributeHandle_t* tinyHandle
+ The handle.
+
+ [in] NW_TinyTree_Node_t* node
+ The tree node.
+
+ [in] NW_DOM_AttrVal_t* value
+ The attribute value to append to handle
+
+ @description: Append the attribute value to the attribute handle.
+
+ @returns: NW_Status_t
+
+ [NW_STAT_SUCCESS]
+ Success
+
+ [NW_STAT_FAILURE]
+ A failure other than out-of-memory.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Out of memory.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_TinyDom_AttributeHandle_addVal(NW_TinyDom_AttributeHandle_t* tinyHandle,
+ NW_TinyTree_Node_t* node,
+ NW_TinyDom_AttrVal_t* val);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_createElementByToken
+
+ @synopsis: Create element by token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_Tree_t* dom_tree
+ The tree.
+
+ [in] NW_Uint16 token
+ The token.
+
+ @description: Create element by token as an orphan node that
+ then need to be attached to the tree.
+
+ @returns: NW_TinyTree_Node_t*
+ Pointer to the new node or NULL if not successful.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyDom_createElementByToken(NW_TinyDom_Tree_t* dom_tree,
+ NW_Uint16 token);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_createElementByName
+
+ @synopsis: Create element by name.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_Tree_t* dom_tree
+ The tree.
+
+ [in] NW_String_t* name
+ The name.
+
+ @description: Create element by name as an orphan node that
+ then need to be attached to the tree.
+
+ @returns: NW_TinyTree_Node_t*
+ Pointer to the new node or NULL if not successful.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyDom_createElementByName(NW_TinyDom_Tree_t* dom_tree,
+ NW_String_t* name);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_createTextNode
+
+ @synopsis: Create text node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_Tree_t* dom_tree
+ The tree.
+
+ [in] NW_TinyDom_Text_t* text
+ The value.
+
+ @description: Create element by name as an orphan node that
+ then needs to be attached to the tree.
+
+ @returns: NW_TinyTree_Node_t*
+ Pointer to the new node or NULL if not successful.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyDom_createTextNode(NW_TinyDom_Tree_t* dom_tree,
+ NW_TinyDom_Text_t* text);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_addDataFromTextItem
+
+ @synopsis: Adds data to a text node from a text item.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tinyTree
+ The tree.
+
+ [in] NW_TinyDom_Tree_t* tinyDomTree
+ The DOM tree.
+
+ [in] NW_TinyTree_Node_t* node
+ The text node.
+
+ [in] NW_TinyTree_Text_t text
+ The value.
+
+ [in] NW_Uint32 encoding
+ The IANA MIBenum for the character encoding.
+
+ @description: Adds data to a text node from a text item.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Data added.
+
+ [NW_STAT_FAILURE]
+ Data not added.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_TinyDom_addDataFromTextItem(NW_TinyTree_t* tinyTree,
+ NW_TinyDom_Tree_t* tinyDomTree,
+ NW_TinyTree_Node_t* node,
+ NW_TinyDom_Text_t* val,
+ NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_Tree_create
+
+ @synopsis: Create a new tree.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_Tree_t* dom_tree
+ The DOM tree.
+
+ [in] NW_TinyDom_Parser_t* dom_parser
+ The parser to associate with this tree.
+
+ [in] NW_WBXML_Document_t* doc
+ The source document.
+
+ [in] NW_WBXML_Parser_t* parser
+ The WBXML parser.
+
+ [in] NW_WBXML_Writer_t* writer
+ Tree writer.
+
+ [in] NW_Uint16 init_node_count
+ Initial allocation.
+
+ [in] NW_Bool enableStringTable
+ Set to true for normal WBXML. Set to false to disable
+ writing from using a string table.
+
+ @description: Create a new tree.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Tree created.
+
+ [NW_STAT_FAILURE]
+ Dictionary not found or root node not created.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_TinyDom_Tree_create(NW_TinyDom_Tree_t* dom_tree,
+ NW_TinyDom_Parser_t* dom_parser,
+ NW_WBXML_Document_t* doc,
+ NW_WBXML_Parser_t* parser,
+ NW_WBXML_Writer_t* writer,
+ NW_Uint16 init_node_count,
+ NW_Bool enableStringTable);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_writeDocHeader
+
+ @synopsis: Write doc header.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_Tree_t* dom_tree
+ The tree.
+
+ [in] NW_Uint8 version
+ The version.
+
+ [in] NW_Uint32 publicid
+ The dictionary public ID.
+
+ [in] NW_Uint32 encoding
+ Character encoding.
+
+ @description: Write doc header.
+
+ @returns: NW_TinyTree_Node_t*
+ New node or NULL if not successful.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyDom_writeDocHeader(NW_TinyDom_Tree_t* dom_tree,
+ NW_Uint8 version,
+ NW_Uint32 publicid,
+ NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_removeAttrFromListNode
+
+ @synopsis: Remove attribute from list node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyDom_AttrListHandle_t* h
+ The handle.
+
+ [in] NW_Uint32 length
+ Length of attribute.
+
+ @description: Remove attribute from list node.
+
+ @returns: NW_Status_t
+ Success of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_TinyDom_removeAttrFromListNode(NW_TinyDom_AttrListHandle_t* h,
+ NW_Uint32 length);
+
+void
+NW_TinyDom_setLastValid(NW_TinyDom_Tree_t* dom_tree, NW_Int32 lastValid);
+
+NW_Int32
+NW_TinyDom_getLastValid(NW_TinyDom_Tree_t* dom_tree);
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+
+#endif /* NW_TINY_DOM_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_tinydom_utils.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,227 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_TinyDom
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef TINY_DOM_UTILS_H
+#define TINY_DOM_UTILS_H
+
+#include <xml/cxml/nw_wbxml_parse.h>
+#include <xml/cxml/nw_tinydom.h>
+#include <xml/cxml/nw_encoder_wbxmlwriter.h>
+#include <xml/cxml/nw_dom_document.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_TinyDom_Parser_Wrapper
+
+ @synopsis: A wrapper to conceal messy parsing details.
+
+ @scope: public
+ @variables:
+ NW_WBXML_Parser_t wbxmlParser
+ The WBXMl Parser.
+
+ NW_TinyDom_Parser_t tinyParser
+ The tiny parser.
+
+ NW_TinyDom_Tree_t tinyDOMTree
+ The DOM Tree.
+
+ NW_WBXML_Writer_t writer
+ The writer.
+
+ NW_WBXML_Document_t document
+ The source document.
+
+ @description: A wrapper to conceal messy parsing details.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_TinyDom_Parser_Wrapper_s{
+ NW_WBXML_Parser_t wbxmlParser;
+ NW_TinyDom_Parser_t tinyParser;
+ NW_TinyDom_Tree_t tinyDOMTree;
+ NW_WBXML_Writer_t writer;
+ NW_WBXML_Document_t document;
+} NW_TinyDom_Parser_Wrapper_t;
+
+/* Deprecated - Left in for backwards copatibility */
+typedef struct NW_TinyDom_Parser_Wrapper_s Parser_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_ParserInitialize
+
+ @synopsis: Helper function to initialize the parser.
+
+ @scope: public
+
+ @parameters:
+ [in] Parser_t* p
+ Pointer to a Parser_t struct
+
+ [in] NW_WBXML_Dictionary_t* dictionaries[]
+ Pointer to the WBXML dictionaries.
+
+ [in] NW_Int32 dictionaryCount
+ Number of dictionaries.
+
+ [in] NW_Uint32 default_public_id
+ Default public (i.e.dictionary) ID.
+
+ @description: Helper function to initialize the parser.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Parser initialized.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Out of memory.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t NW_TinyDom_ParserInitialize(Parser_t* p,
+ NW_WBXML_Dictionary_t* dictionaries[],
+ NW_Int32 dictionaryCount,
+ NW_Uint32 default_public_id);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_MakeDOMTree
+
+ @synopsis: Helper function to parse the buffer, creating a tree.
+
+ @scope: public
+
+ @parameters:
+ [in] Parser_t* p
+ Pointer to parser struct.
+
+ [in] NW_Byte* buffer
+ Pointer to content.
+
+ [in] NW_Uint32 length
+ Number of bytes in buffer.
+
+ [out] NW_DOM_DocumentNode_t** root
+ Pointer to document root node
+
+ @description: Helper function to parse the buffer, creating a tree.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Made DOM tree.
+
+ [NW_STAT_FAILURE]
+ Failed to make tree.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Out of memory.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t NW_TinyDom_MakeDOMTree (Parser_t* p,
+ NW_Byte* buffer,
+ NW_Uint32 length,
+ NW_DOM_DocumentNode_t** root);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_AppendDOMTree
+
+ @synopsis: Helper function to parse the buffer, appending new nodes to the tree.
+
+ @scope: public
+
+ @parameters:
+ [in] Parser_t* p
+ Pointer to parser struct.
+
+ [in] NW_Byte* buffer
+ Pointer to content.
+
+ [in] NW_Uint32 length
+ Number of bytes in buffer.
+
+ [in] NW_Uint32 cp_count
+ Number of code page switch count
+
+ [in] NW_Int32 lastValid
+ Index pointing to the position in buffer where last valid parse stopped at.
+
+ [out] NW_DOM_DocumentNode_t** root
+ Pointer to document root node
+
+ @description: Helper function to parse the buffer, appending new nodes to the tree.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Made DOM tree.
+
+ [NW_STAT_FAILURE]
+ Failed to make tree.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Out of memory.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t NW_TinyDom_AppendDOMTree (Parser_t* p,
+ NW_Byte* buffer,
+ NW_Uint32 length,
+ NW_Uint32 cp_count,
+ NW_Int32 lastValid,
+ NW_DOM_DocumentNode_t** root);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyDom_ParserDelete
+
+ @synopsis: Free the internal memory in allocated in
+ NW_TinyDom_MakeDOMTree.
+
+ @scope: public
+
+ @parameters:
+ [in] Parser_t* p
+ Pointer to parser struct.
+
+ @description: Free the internal memory in allocated in
+ NW_TinyDom_MakeDOMTree.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C void NW_TinyDom_ParserDelete(Parser_t* p);
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* TINY_DOM_UTILS_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_tinytree.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,1092 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_TinyTree
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef NW_TINY_TREE_H
+#define NW_TINY_TREE_H
+
+#include <xml/cxml/cxml_proj.h>
+#include <xml/cxml/nw_tinytree_treevector.h>
+#include <xml/cxml/nw_tinytree_ebuffer.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/* ----------------------------------------------------------------------- **
+ Tiny tree definitions
+** ----------------------------------------------------------------------- **/
+
+
+
+/** ----------------------------------------------------------------------- **
+ @typedef: NW_TinyTree_Index
+
+ @synopsis: An index into the node array.
+
+ @scope: public
+ @type: CXML_Vector_Metric_t
+
+ @description: An index into the node array.
+ ** ----------------------------------------------------------------------- **/
+typedef CXML_Vector_Metric_t NW_TinyTree_Index_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @typedef: NW_TinyTree_Offset
+
+ @synopsis: An offset into the source buffer.
+
+ @scope: public
+ @type: NW_Uint32
+
+ @description: An offset into the source buffer.
+ ** ----------------------------------------------------------------------- **/
+/*
+typedef NW_Uint32 NW_TinyTree_Offset_t;
+*/
+
+/*----------------------------------------------------------------------- **
+ Node flags
+** ----------------------------------------------------------------------- **/
+
+#define TNODE_FLAG_LASTSIBLING 0x8000 /* My next_sibling points to parent */
+
+#define TNODE_FLAG_ROOT 0x4000 /* I'm the tree root */
+
+#define TNODE_FLAG_TREE 0x2000 /* I'm a special sentinel node marking
+ the beginning of a segment */
+
+#define TNODE_FLAG_ORPHAN 0x1000 /* A node not part of a tree */
+
+#define TNODE_USR_FLAGS 0x0FFF /* 12 bits available to tree user */
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_TinyTree_Node
+
+ @synopsis: Tiny tree node structure.
+
+ @scope: public
+ @variables:
+ NW_Uint16 flags
+ Node description flags.
+
+ NW_TinyTree_Offset_t source_offset
+ Offset of node data into original buffer.
+
+ NW_TinyTree_Index_t first_child
+ Index of first child of this node.
+
+ NW_TinyTree_Index_t next_sibling
+ Index of next sibling of this node.
+
+ @description: Tiny tree node structure.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_TinyTree_Node_s NW_TinyTree_Node_t;
+
+struct NW_TinyTree_Node_s {
+ NW_Uint16 flags;
+ NW_TinyTree_Offset_t source_offset;
+ NW_TinyTree_Node_t* first_child;
+ NW_TinyTree_Node_t* next_sibling;
+ NW_TinyTree_t* tree;
+ NW_Uint16 token;
+};
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_TinyTree_TinyTree
+
+ @synopsis: Tree structure.
+
+ @scope: public
+ @variables:
+ NW_TinyTree_TreeVector_t* tree
+ Node data.
+
+ NW_TinyTree_Index_t root_index
+ Node data.
+
+ NW_TinyTree_EBuffer_t* ebuffer
+ Buffer data.
+
+ void* context
+ Context accessible from tree (typically the parser that
+ builds and reads the tree).
+
+ @description: Tree structure. Provides access points for root
+ and buffer data.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_TinyTree_TinyTree_s {
+ /* Node data */
+ NW_TinyTree_TreeVector_t* tree;
+ NW_TinyTree_Index_t root_index;
+ /* Buffer data */
+ NW_TinyTree_EBuffer_t* ebuffer;
+ /* Context accessible from tree (typically the parser that builds and reads the tree) */
+ void* context;
+}NW_TinyTree_TinyTree_t;
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_TinyTree_TreeNode
+
+ @synopsis: A sentinel node that resides at the start of
+ every tree vector segment.
+
+ @scope: public
+ @variables:
+ NW_Uint16 flags
+ Node description flags.
+
+ NW_TinyTree_t* tree
+ The tree.
+
+ @description: A special sentinel node that resides at the start of
+ every tree vector segment, pointing to the tree itself.
+ This is used by applications like the DOM api that do
+ not have a reference to the tree when operating on nodes.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_TinyTree_TreeNode_s{
+ NW_Uint16 flags;
+ NW_TinyTree_t* tree;
+}NW_TinyTree_TreeNode_t;
+
+
+ /* ----------------------------------------------------------------------- **
+ Public tiny tree API
+ ** ----------------------------------------------------------------------- **/
+
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_new
+
+ @synopsis: Initialize a tree.
+
+ @scope: public
+
+ @description: Initialize a tree.Allocates memory and initializes variables.
+
+ @returns: NW_TinyTree_TinyTree_t*
+ The new tree.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_t*
+NW_TinyTree_new();
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_construct
+
+ @synopsis: Constructor.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_TinyTree_t* tree
+ The tiny tree.
+
+ [in] CXML_Vector_Metric_t initialNodeCount
+ Initiali size of vector of nodes.
+
+ [in] void* buffer
+ Link buffer into ebuffer.
+
+ [in] NW_TinyTree_Offset_t buffsz
+ Size of block of data.
+
+ [in] void* context
+ Context (i.e. parser).
+
+ [in] NW_Bool freeBuff
+ Buffer deallocation flag.
+
+ @description: Constructor. Adds data to the structure returned
+ by NW_TinyTree_new.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Tree created.
+
+ [NW_STAT_FAILURE]
+ Out of memory or general error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_TinyTree_construct(NW_TinyTree_t* tree,
+ CXML_Vector_Metric_t initialNodeCount,
+ void* buffer,
+ NW_TinyTree_Offset_t buffsz,
+ void* context,
+ NW_Bool freeBuff);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_destruct
+
+ @synopsis: Clean up tree resources.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ default
+
+ @description: Clean up tree resources.
+
+ ** ----------------------------------------------------------------------- **/
+void
+NW_TinyTree_destruct(NW_TinyTree_t* tree);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_createNode
+
+ @synopsis: Create an unattached node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_TinyTree_Offset_t offset
+ Offset into buffer.
+
+ @description: Create an unattached node which references the source
+ buffer at offset.
+
+ @returns: NW_TinyTree_Node_t*
+ Node or NULL if memory could not be allocated.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyTree_createNode(NW_TinyTree_t* tree,
+ NW_TinyTree_Offset_t offset);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_setRoot
+
+ @synopsis: Create a root node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_TinyTree_Offset_t offset
+ Offset into buffer.
+
+ @description: Create a root node which references the source buffer
+ at offset. Returns a pointer to the root node.
+
+ @returns: NW_TinyTree_Node_t*
+ Pointer to the root node.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyTree_setRoot(NW_TinyTree_t* tree,
+ NW_TinyTree_Offset_t offset);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_getRoot
+
+ @synopsis: Get the root node of the tree.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ @description: Get the root node of the tree.
+
+ @returns: NW_TinyTree_Node_t*
+ The root node or NULL if it is not valid.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyTree_getRoot(NW_TinyTree_t* tree);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_findNextSibling
+
+ @synopsis: Find the next sibling of a node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_TinyTree_Node_t* node
+ The reference node.
+
+ @description: Find the next sibling of a node.
+
+ @returns: NW_TinyTree_Node_t*
+ The next sibling node or NULL if it is not valid.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyTree_findNextSibling(NW_TinyTree_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_findLastSibling
+
+ @synopsis: Find last sibling of a node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_TinyTree_Node_t* node
+ The reference node.
+
+ @description: Find last sibling of a node.
+
+ @returns: NW_TinyTree_Node_t*
+ The last sibling node or NULL if it is not valid.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyTree_findLastSibling(NW_TinyTree_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_findPreviousSibling
+
+ @synopsis: Find the previous sibling of a node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_TinyTree_Node_t* node
+ The reference node.
+
+ @description: Find the previous sibling of a node.
+
+ @returns: NW_TinyTree_Node_t*
+ The previous sibling node or NULL if it is not valid.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyTree_findPreviousSibling(NW_TinyTree_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_findFirstChild
+
+ @synopsis: Find the first child of a node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_TinyTree_Node_t* node
+ The reference node.
+
+ @description: Find the first child of a node.
+
+ @returns: NW_TinyTree_Node_t*
+ The first child node or NULL if it is not valid.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyTree_findFirstChild(NW_TinyTree_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_findLastChild
+
+ @synopsis: Find a node's last child.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_TinyTree_Node_t* node
+ The reference node.
+
+ @description: Find a node's last child.
+
+ @returns: NW_TinyTree_Node_t*
+ The last child node or NULL if it is not valid.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyTree_findLastChild(NW_TinyTree_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_findParent
+
+ @synopsis: Find a node's parent.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_TinyTree_Node_t* node
+ The reference node.
+
+ @description: Find a node's parent.
+
+ @returns: NW_TinyTree_Node_t*
+ The parent node of this node or NULL if it is not valid.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyTree_findParent(NW_TinyTree_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_attachAfter
+
+ @synopsis: Attach a sibling after a node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_TinyTree_Node_t* node
+ The reference node.
+
+ [in] NW_TinyTree_Node_t* sibling
+ Sibling node to attach.
+
+ @description: Attach a sibling after a node.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_TinyTree_attachAfter(NW_TinyTree_Node_t* node,
+ NW_TinyTree_Node_t* sibling);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_attachBefore
+
+ @synopsis: Attach a sibling before another node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_TinyTree_Node_t* node
+ The reference node.
+
+ [in] NW_TinyTree_Node_t* sibling
+ default
+
+ @description: Attach a sibling before another node.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Node attached.
+
+ [NW_STAT_FAILURE]
+ Could not attach node.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_TinyTree_attachBefore(NW_TinyTree_Node_t* node,
+ NW_TinyTree_Node_t* sibling);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_attachChild
+
+ @synopsis: Attach a child to a node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_TinyTree_Node_t* node
+ The reference node.
+
+ [in] NW_TinyTree_Node_t* child
+ The child to attach.
+
+ @description: Attach a child to a node as last child.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Node attached.
+
+ [NW_STAT_FAILURE]
+ Could not attach node.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_TinyTree_attachChild(NW_TinyTree_Node_t* node,
+ NW_TinyTree_Node_t* child);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_deleteNode
+
+ @synopsis: Delete a node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_TinyTree_Node_t* node
+ The node to delete.
+
+ @description: Delete a node, deleting any subtree below the node as well.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_TinyTree_deleteNode(NW_TinyTree_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_setContext
+
+ @synopsis: Set context.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] void* context
+ Context to set.
+
+ @description: Set context.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_TinyTree_setContext(NW_TinyTree_t* tree,
+ void* context);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_getContext
+
+ @synopsis: Get context.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ @description: Get context.
+
+ @returns: void*
+ The context.
+
+ ** ----------------------------------------------------------------------- **/
+void*
+NW_TinyTree_getContext(NW_TinyTree_t* tree);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_Node_getFlags
+
+ @synopsis: Get flags.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_Node_t* node
+ The tiny tree.
+
+ @description: Get flags.
+
+ @returns: NW_Uint16
+ The node flags.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Uint16
+NW_TinyTree_Node_getFlags(NW_TinyTree_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_Node_setUserFlags
+
+ @synopsis: Set user flags.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_Node_t* node
+ The tiny tree.
+
+ [in] NW_Uint16 flags
+ The flags.
+
+ @description: Set user flags.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_TinyTree_Node_setUserFlags(NW_TinyTree_Node_t* node,
+ NW_Uint16 flags);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_Node_getSourceOffset
+
+ @synopsis: Get source offset.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_Node_t* node
+ The tiny tree.
+
+ @description: Get source offset.
+
+ @returns: NW_TinyTree_Offset_t
+ The offset.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Offset_t
+NW_TinyTree_Node_getSourceOffset(NW_TinyTree_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_Node_getSourceAddress
+
+ @synopsis: Get source address.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_TinyTree_Node_t* node
+ Reference node.
+ @description: Get source address.
+
+ @returns: void*
+ The address.
+
+ ** ----------------------------------------------------------------------- **/
+void*
+NW_TinyTree_Node_getSourceAddress(NW_TinyTree_t* tree,
+ NW_TinyTree_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_Node_GetSegmentAndOffset
+
+ @synopsis: Get segment and offset.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_TinyTree_Node_t* node
+ default
+
+ [out] NW_Uint8** segment
+ default
+
+ [out] NW_Uint32* segSize
+ default
+
+ [out] NW_Uint32* offset
+ default
+
+ @description: Get segment and offset.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Segment and offset returned.
+
+ [NW_STAT_FAILURE]
+ Could not get segment and offset.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_TinyTree_Node_GetSegmentAndOffset(NW_TinyTree_t* tree,
+ NW_TinyTree_Node_t* node,
+ NW_Uint8** segment,
+ NW_Uint32* segSize,
+ NW_Uint32* offset);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_GetSourceOffset
+
+ @synopsis: Get source offset.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_Uint8* segmentAddr
+ default
+
+ [out] NW_Uint32 offset
+ Offset.
+
+ [out] CXML_Vector_Metric_t* index
+ Index of segment.
+
+ @description: Get source offset.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Offset returned.
+
+ [NW_STAT_FAILURE]
+ Could not get offset.
+
+ ** ----------------------------------------------------------------------- **/
+extern
+NW_Status_t
+NW_TinyTree_GetSourceOffset(NW_TinyTree_t* tree,
+ NW_Uint8* segmentAddr,
+ NW_Uint32 offset,
+ NW_Uint32* index);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_Node_findTree
+
+ @synopsis: Find tree.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_Node_t* node
+ The tree node.
+
+ @description: Get a reference to the tree that owns a node. This is
+ not likely to be a very efficient call since it can
+ only find the tree safely by doing a linear search for
+ the sentinel tree node at the beginning of the current
+ segment.
+
+ @returns: NW_TinyTree_t*
+ Tiny tree or NULL if not found.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_TinyTree_t*
+NW_TinyTree_Node_findTree(NW_TinyTree_Node_t* node);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_createChild
+
+ @synopsis: Create child node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_TinyTree_Node_t* parent
+ Parent of new child.
+
+ [in] NW_TinyTree_Offset_t offset
+ Offset.
+
+ @description: Create a new node as a child of an existing node. The
+ child references the source buffer at offset. The new
+ child node is returned.
+
+ @returns: NW_TinyTree_Node_t*
+ The new chold node or NULL if not successful.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyTree_createChild(NW_TinyTree_t* tree,
+ NW_TinyTree_Node_t* parent,
+ NW_TinyTree_Offset_t offset);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_createSibling
+
+ @synopsis: Create sibling node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_TinyTree_Node_t* node
+ Sibling of new node.
+
+ [in] NW_TinyTree_Offset_t offset
+ Offset.
+
+ @description: Create a new node as an immediate sibling to an
+ existing node. The child references the source buffer
+ at offset. The new child node is returned.
+
+ @returns: NW_TinyTree_Node_t*
+ New node or NULL if not successful.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyTree_createSibling(NW_TinyTree_t* tree,
+ NW_TinyTree_Node_t* node,
+ NW_TinyTree_Offset_t offset);
+
+
+ /* RME Documentation tools does not handle function call as parameter */
+/* * ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_recurse
+
+ @synopsis: Recurse through tree using callback.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_TinyTree_Node_t* start_node
+ Node to start to recurse from.
+
+ [in] void (*Node_CB) (NW_TinyTree_t*, NW_TinyTree_Node_t* , void*)
+ Node handling calllback
+
+ [in] void* context
+ Parser context.
+
+ @description: Recurse through tree calling the callback function
+ for each node.
+
+ ** ----------------------------------------------------------------------- **/
+void
+NW_TinyTree_recurse(NW_TinyTree_t* tree,
+ NW_TinyTree_Node_t* start_node,
+ void (*Node_CB) (NW_TinyTree_t*, NW_TinyTree_Node_t* , void*),
+ void* context);
+
+
+/* ----------------------------------------------------------------------- **
+ Node iterator functions. These iterate through nodes one at a time
+ returning NULL when there are no more nodes to iterate.
+** ----------------------------------------------------------------------- **/
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_TinyTree_NodeIterator
+
+ @synopsis: default
+
+ @scope: public
+ @variables:
+ NW_TinyTree_Node_t* start_node
+ The start node.
+
+ NW_TinyTree_Node_t* traversal_node
+ Present node.
+
+ NW_TinyTree_t* tree
+ The tree.
+
+ @description: Node iterator type definition.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_TinyTree_NodeIterator_s{
+ NW_TinyTree_Node_t* start_node;
+ NW_TinyTree_Node_t* traversal_node;
+}NW_TinyTree_NodeIterator_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_NodeIterator_init
+
+ @synopsis: Initialize a node iterator with a start node.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] NW_TinyTree_Node_t* start_node
+ Iterator start point.
+
+ [out] NW_TinyTree_NodeIterator_t* iterator
+ Iterator structure.
+
+ @description: Initialize a node iterator with a start node. Iterate
+ through nodes one at a time returning NULL when there
+ are no more nodes to iterate.
+ ** ----------------------------------------------------------------------- **/
+void
+NW_TinyTree_NodeIterator_init(NW_TinyTree_Node_t* start_node,
+ NW_TinyTree_NodeIterator_t* iterator);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_NodeIterator_iterate
+
+ @synopsis: Iterate through a subtree.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_TinyTree_NodeIterator_t* iterator
+ The iterator.
+
+ @description: Iterate through a subtree returning each node exactly
+ once. The algorithm follows the toplogical ordering of
+ the tree (if there is an edge from v0 to v1, always
+ visit v0 before v1). It's equivalent to solving a
+ labyrinth by keeping your right hand on the wall!
+
+ @returns: NW_TinyTree_Node_t*
+ Next node in iteration or NULL if done.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyTree_NodeIterator_iterate(NW_TinyTree_NodeIterator_t* iterator);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_NodeIterator_iterateSiblings
+
+ @synopsis: Iterate through the siblings of a node.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_TinyTree_NodeIterator_t* iterator
+ The iterator.
+
+ @description: Iterate through the siblings of a node.
+
+ @returns: NW_TinyTree_Node_t*
+ Next node in iteration or NULL if done.
+
+ ** ----------------------------------------------------------------------- **/
+NW_TinyTree_Node_t*
+NW_TinyTree_NodeIterator_iterateSiblings(NW_TinyTree_NodeIterator_t* iterator);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_TinyTree_GetWritableBlock
+
+ @synopsis: Get writable block.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_TinyTree_t* tree
+ The tiny tree.
+
+ [in] CXML_Vector_Metric_t size
+ Requested size.
+
+ [in] CXML_Vector_Metric_t* source_offset
+ Offset.
+
+ @description: Get writable block.
+
+ @returns: NW_Uint8*
+ Writable block.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Uint8*
+NW_TinyTree_GetWritableBlock(NW_TinyTree_t* tree,
+ NW_Uint32 size,
+ NW_Uint32 *source_offset);
+
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* NW_TINY_TREE_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_tinytree_ebuffer.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,170 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_TinyTree
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef NW_TINYTREE_EBUFFER_H
+#define NW_TINYTREE_EBUFFER_H
+
+#include <xml/cxml/cxml_proj.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/* ----------------------------------------------------------------------- **
+ EBuffers (expandable buffers) provide storage blocks of bytes that
+ can be accessed by index. Tiny trees use these to store serialized
+ tree data. Node source offsets are stored as ebuffer indexes. EBuffers
+ are similar to segmented vectors, but with variable segment sizes so
+ that continuous byte blocks of different sizes can be stored efficiently.
+ Unlike vectors, EBuffers store only byte data, so alignment calculations
+ are not needed. Also, EBuffers support appending, but not insertion and
+ deletion. These simplifications make it much easier to deal with
+ variable segment sizes while guaranteeing that continuous blocks remain
+ continuous.
+** ----------------------------------------------------------------------- **/
+
+/* ------------------------------------------------------------------------- */
+
+#define NW_TINY_TREE_BLOCK_SIZE_DEFAULT ((CXML_Vector_Metric_t) 256)
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_TinyTree_Segment
+
+ @synopsis: Tiny tree data segment.
+
+ @scope: public
+ @variables:
+ NW_Uint8* storage
+ Data storage.
+
+ CXML_Vector_Metric_t segmentSize
+ Size of segment.
+
+ CXML_Vector_Metric_t freeOffset
+ Free offset.
+
+ @description: Tiny tree data segment.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_TinyTree_Segment_s {
+ NW_Uint8* storage;
+ NW_TinyTree_Offset_t segmentSize;
+ NW_TinyTree_Offset_t freeOffset;
+} NW_TinyTree_Segment_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_TinyTree_EBuffer
+
+ @synopsis: Tiny tree E buffer.
+
+ @scope: public
+ @variables:
+ NW_Bool ownFirstBlock
+ Ownership flag.
+
+ CXML_Vector_Metric_t blockSize
+ Size of block,
+
+ NW_TinyTree_Segment_t* segmentList
+ List of segments.
+
+ CXML_Vector_Metric_t segmentListSize
+ Size of segment list.
+
+ CXML_Vector_Metric_t numSegments
+ Number of segments.
+
+ @description: EBuffers (expandable buffers) provide storage blocks
+ of bytes that can be accessed by index. Tiny trees use
+ these to store serialized tree data. Node source
+ offsets are stored as ebuffer indexes. EBuffers are
+ similar to segmented vectors, but with variable
+ segment sizes so that continuous byte blocks of
+ different sizes can be stored efficiently. Unlike
+ vectors, EBuffers store only byte data, so alignment
+ calculations are not needed. Also, EBuffers support
+ appending, but not insertion and deletion. These
+ simplifications make it much easier to deal with
+ variable segment sizes while guaranteeing that
+ continuous blocks remain continuous.
+
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_TinyTree_EBuffer_s {
+ NW_Bool ownFirstBlock;
+ CXML_Vector_Metric_t blockSize;
+ NW_TinyTree_Segment_t* segmentList;
+ CXML_Vector_Metric_t segmentListSize;
+ CXML_Vector_Metric_t numSegments;
+} NW_TinyTree_EBuffer_t;
+
+/* ------------------------------------------------------------------------- *
+ public methods
+ * ------------------------------------------------------------------------- */
+
+NW_TinyTree_EBuffer_t*
+NW_TinyTree_EBuffer_Construct (NW_Uint8* initialBuffer,
+ NW_TinyTree_Offset_t initBuffSize,
+ NW_TinyTree_Offset_t blockSize,
+ NW_Bool freeBuff);
+
+void
+NW_TinyTree_EBuffer_Destruct (NW_TinyTree_EBuffer_t* thisObj);
+
+extern
+NW_Uint8*
+NW_TinyTree_EBuffer_GetWritableBlock(NW_TinyTree_EBuffer_t* ebuffer,
+ NW_TinyTree_Offset_t size,
+ NW_TinyTree_Offset_t* index);
+
+
+extern
+NW_Status_t
+NW_TinyTree_EBuffer_GetSegmentAndOffset(NW_TinyTree_EBuffer_t* ebuffer,
+ NW_TinyTree_Offset_t index,
+ NW_Uint8** segment, /* OUT */
+ NW_TinyTree_Offset_t* segSize, /* OUT */
+ NW_TinyTree_Offset_t* offset); /* OUT */
+
+extern
+NW_Status_t
+NW_TinyTree_EBuffer_GetIndex(NW_TinyTree_EBuffer_t* ebuffer,
+ NW_Uint8* segmentAddr,
+ NW_TinyTree_Offset_t offset,
+ NW_TinyTree_Offset_t * index); /* OUT */
+
+extern
+NW_Uint8*
+NW_TinyTree_EBuffer_AddressAt(NW_TinyTree_EBuffer_t* ebuffer,
+ NW_TinyTree_Offset_t index);
+
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* NW_TINYTREE_EBUFFER_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_tinytree_treevector.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_TinyTree
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef NW_TINYTREE_TREEVECTOR_H
+#define NW_TINYTREE_TREEVECTOR_H
+
+#include <xml/cxml/cxml_proj.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+typedef struct NW_TinyTree_TinyTree_s NW_TinyTree_t;
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_TinyTree_TreeVector_t
+
+ @synopsis: default
+
+ @scope: public
+ @variables:
+ NW_TinyTree_t* tree
+ default
+
+ @description: default
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_TinyTree_TreeVector_s {
+ CXML_Vector_t* vector;
+ NW_TinyTree_t* tree; /* Reference back to parent tree */
+ NW_Int32 lastValid; // mark the end of valid wbxml, rest of buffer maybe faked close tags
+ // put this member in this structure to maintain the binary compatibility.
+} NW_TinyTree_TreeVector_t;
+
+extern
+NW_TinyTree_TreeVector_t*
+NW_TinyTree_TreeVector_Construct (CXML_Vector_Metric_t elementSize,
+ CXML_Vector_Metric_t segmentSize,
+ NW_TinyTree_t* tree);
+
+void
+NW_TinyTree_TreeVector_Destruct (NW_TinyTree_TreeVector_t* thisObj);
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* NW_TINYTREE_TREEVECTOR_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_wbxml_dictionary.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,824 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_WBXML
+
+ @synopsis: default
+
+ @description: Wbxml token definitions
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef NW_PARSER_WBXML_DICTIONARY_H
+#define NW_PARSER_WBXML_DICTIONARY_H
+
+#include <xml/cxml/cxml_proj.h>
+#include <xml/cxml/nw_string_string.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+/*Different feature flags for cXML Library internal use only. */
+
+#define CXML_DTD_SUPPORT_ON 0x0000001
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_WBXML_DictEntry
+
+ @synopsis: Entry
+
+ @scope: public
+ @variables:
+ NW_Byte token
+ The token.
+
+ NW_String_UCS2Buff_t* name
+ The name.
+
+ @description: Generic dictionary entry.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_WBXML_DictEntry_s{
+ NW_Byte token;
+ NW_String_UCS2Buff_t* name;
+}NW_WBXML_DictEntry_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_WBXML_Codepage
+
+ @synopsis: Codepage
+
+ @scope: public
+ @variables:
+ NW_Byte count
+ The number of tokens.
+
+ NW_WBXML_DictEntry_t* tokens
+ Ordered by token.
+
+ NW_Byte* names
+ Ordered by name, stored as offsets into the token list.
+
+ @description: Codepages should be small and have efficient access
+ both by token and name. They are currently stored in
+ packed lists of token-string pairs. While this
+ requires one more NW_Byte per entry than a sparse
+ array, they are still guaranteed to be smaller than
+ sparse arrays for tables with less. than ~200
+ entries. Since the biggest table we know about (wbxml
+ attributes) has only 109 entries this seems like a
+ reasonable tradeoff.
+
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_WBXML_Codepage_s{
+ NW_Byte count;
+ NW_WBXML_DictEntry_t* tokens;
+ NW_Byte* names;
+}NW_WBXML_Codepage_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_WBXML_Dictionary
+
+ @synopsis: Dictionary
+
+ @scope: public
+ @variables:
+ NW_Uint32 public_id
+ The public ID.
+
+ NW_Ucs2* doc_type
+ The document type.
+
+ NW_Int32 tag_page_count
+ Number of tag pages.
+
+ NW_WBXML_Codepage_t* tag_pages
+ Array of pages.
+
+ NW_Int32 attr_page_count
+ Number of attribute pages.
+
+ NW_WBXML_Codepage_t* attr_pages
+ Array of pages.
+
+ @description: This structure stores the basic definition of a dictionary.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_WBXML_Dictionary_s {
+ /* Dictionary identifiers */
+ NW_Uint32 public_id;
+ NW_Ucs2* doc_type;
+ /* Tag code pages */
+ NW_Int32 tag_page_count;
+ NW_WBXML_Codepage_t* tag_pages;
+ /* Attribute code pages */
+ NW_Int32 attr_page_count;
+ NW_WBXML_Codepage_t* attr_pages;
+}NW_WBXML_Dictionary_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Dictionary_initialize
+
+ @synopsis: Initialize dictionary.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Int32 n
+ Number of dictionaries.
+
+ [in] NW_WBXML_Dictionary_t* d[]
+ The array of dictionaries.
+
+ @description: Dictionary initialization.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Dictionaries added to active list
+
+ [NW_STAT_FAILURE]
+ List already full.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_WBXML_Dictionary_initialize(NW_Int32 n, NW_WBXML_Dictionary_t* d[]);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Dictionary_add
+
+ @synopsis: add dictionary(s).
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Int32 n
+ Number of dictionaries.
+
+ [in] NW_WBXML_Dictionary_t* d[]
+ The array of dictionaries.
+
+ @description: add an array of dictionaries.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Dictionaries added to active list
+
+ [NW_STAT_FAILURE]
+ List already full.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Dictionary_add(NW_Int32 n, NW_WBXML_Dictionary_t* d[]);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Dictionary_destroy
+
+ @synopsis: Destroy dictionary.
+
+ @scope: public
+
+ @parameters:
+ [in] void
+
+
+ [in-out]
+
+
+ @description: Dictionary destruction.
+
+ @returns: NW_Status_t
+ default
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_WBXML_Dictionary_destroy ();
+
+/* ----------------------------------------------------------------------- **
+ Dictionary lookup
+** ----------------------------------------------------------------------- **/
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Dictionary_getIndexByPublicId
+
+ @synopsis: Get dictionary index using publicID.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Uint32 public_id
+ The publid ID to search for.
+
+ @description: Get dictionary index using publicID.
+
+ @returns: NW_Uint32
+ 1 - based index or 0 if not found.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Uint32
+NW_WBXML_Dictionary_getIndexByPublicId (NW_Uint32 public_id);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Dictionary_getIndexByDocType
+
+ @synopsis: Get dictionary index using docType.
+
+ @scope: public
+
+ @parameters:
+ [out] NW_String_t* doc_type
+ Returned document type.
+
+ [in] NW_Uint32 encoding
+ Requested encoding.
+
+ @description: Get dictionary index using docType.
+
+ @returns: NW_Uint32
+ 1 based index if found, otherwise 0.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Uint32
+NW_WBXML_Dictionary_getIndexByDocType(NW_String_t* doc_type, NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Dictionary_getByPublicId
+
+ @synopsis: Get dictionary using publicId.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Uint32 publicId
+ Public ID.
+
+ @description: Look up a dictionary using the document public ID. The
+ public ID can be gotten from the document header
+ (NMXB_Wbxml_Document_t).
+
+ Documents contain either a public ID or a document type
+ string. Use this function for documents containing a public ID.
+
+ @returns: NW_WBXML_Dictionary_t*
+ Pointer to dictionary or NULL if not found.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_WBXML_Dictionary_t*
+NW_WBXML_Dictionary_getByPublicId (NW_Uint32 publicId);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Dictionary_getByDocType
+
+ @synopsis: Get dictionary using docType.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_String_t* docType
+ A UCS-2 encoded string representing the document type.
+
+ [in] NW_Uint32 encoding
+ The encoding.
+
+ @description: Look up a dictionary using the document type
+ string. The document type can be gotten from the
+ document header (NW_Wbxml_Document_t). The string
+ contained in the header will be encoded in the
+ document encoding. Note that if the encoding is not
+ UCS-2, this string must be converted to a UCS-2 string
+ before being passed to this function. Documents
+ contain either a public ID or a document type
+ string. Use this functions for documents containing a
+ document type string
+
+ @returns: NW_WBXML_Dictionary_t*
+ Pointer to dictionary or NULL if not found.
+
+ ** ----------------------------------------------------------------------- **/
+NW_WBXML_Dictionary_t*
+NW_WBXML_Dictionary_getByDocType (NW_String_t* docType, NW_Uint32 encoding);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Dictionary_getByIndex
+
+ @synopsis: Get dictionary using index.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Uint32 dictIndex
+ The index.
+
+ @description: Get dictionary using index.
+
+ @returns: NW_WBXML_Dictionary_t*
+ Pointer to dictionary or NULL if not found.
+
+ ** ----------------------------------------------------------------------- **/
+NW_WBXML_Dictionary_t*
+NW_WBXML_Dictionary_getByIndex(NW_Uint32 dictIndex);
+
+
+/* ----------------------------------------------------------------------- **
+ Lookups by token
+** ----------------------------------------------------------------------- **/
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Dictionary_getTagByFqToken
+
+ @synopsis: Get tag using fully qualified token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Uint32 fq_token
+ The fully qualified token.
+
+ @description: Gets the string represented by a token. The fq_token
+ parameter is a token that was returned by the parser
+ via the FQToken callback. Such token values are "fully
+ qualified" since they contain not only the token value
+ itself, but also information that specifies the
+ dictionary, the code page, and whether the token is
+ part of the attribute or token code space. Fully
+ qualified token values should be treated as opaque
+ data. Get tag using fully qualified token.
+
+ @returns: NW_String_UCS2Buff_t*
+ Tag name or NULL if not found.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_String_UCS2Buff_t*
+NW_WBXML_Dictionary_getTagByFqToken (NW_Uint32 fq_token);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Dictionary_getElementNameByToken
+
+ @synopsis: Get element name using token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Dictionary_t* dictionary
+ The dictionary to search.
+
+ [in] NW_Uint16 token
+ The token.
+
+ @description: Get element name using token.
+
+ @returns: NW_String_UCS2Buff_t*
+ Element name or NULL if not found.
+
+ ** ----------------------------------------------------------------------- **/
+NW_String_UCS2Buff_t*
+NW_WBXML_Dictionary_getElementNameByToken (NW_WBXML_Dictionary_t* dictionary,
+ NW_Uint16 token);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Dictionary_getAttributeNameByToken
+
+ @synopsis: Get attribute name using token.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Dictionary_t* dictionary
+ The dictionary.
+
+ [in] NW_Uint16 token
+ The token.
+
+ @description: Get attribute name using token.
+
+ @returns: NW_String_UCS2Buff_t*
+ Attribute name or NULL if not found.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_String_UCS2Buff_t*
+NW_WBXML_Dictionary_getAttributeNameByToken (NW_WBXML_Dictionary_t* dictionary,
+ NW_Uint16 token);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Dictionary_resolveLiteralToken
+
+ @synopsis: Returns literal token.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_Uint32* token
+ The token.
+
+ [in] NW_String_t* name
+ Name to lookup.
+
+ [in] NW_Bool is_tag
+ NW_TRUE if tag token otherwise NW_FALSE if attribute .
+
+ [in] NW_Uint32 encoding
+ The encoding of this string.
+
+ [in] NW_Bool matchCase
+ If NW_TRUE do case sensitive compare.
+
+ @description: Given a tag or attribute token, if the token is a literal,
+ use the given name to lookup the tag/attribute's "real"
+ token and return that token.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Token resolved.
+
+ [NW_STAT_FAILURE]
+ Token lookup fails (NOT fatal)
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Out of memory.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_WBXML_Dictionary_resolveLiteralToken(NW_Uint32* token,
+ NW_String_t* name,
+ NW_Bool is_tag,
+ NW_Uint32 encoding,
+ NW_Bool matchCase);
+
+/* ----------------------------------------------------------------------- **
+ Lookups by name
+** ----------------------------------------------------------------------- **/
+
+
+#define NW_WBXML_MASK_CODEPAGE 0x0000FF00
+#define NW_WBXML_MASK_TOKEN 0x000000FF
+/* mask off the page and tag leaving content and attribute bits out */
+#define NW_WBXML_MASK_FQTOKEN_TAG 0x0000FF3F
+
+#define NW_WBXML_Dictionary_extractPage(x) \
+ ((NW_Uint8)(((x) & NW_WBXML_MASK_CODEPAGE) >> 8))
+
+#define NW_WBXML_Dictionary_extractToken(x) \
+ ((NW_Uint8)((x) & NW_WBXML_MASK_TOKEN))
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Dictionary_getAttributeToken
+
+ @synopsis: Get attribute token using name.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Dictionary_t* dictionary
+ The dictionary.
+
+ [in] const NW_String_t* name
+ The attribute name.
+
+ [in] NW_Uint32 encoding
+ The encoding of the name.
+
+ [in] NW_Bool matchCase
+ Case sensitive comparison if NW_TRUE.
+
+ @description: Look up an attribute token in a dictionary. The lower
+ two bytes of the returned value represent the code
+ page and token. The token value can be calculated as
+ value&0xff ; the code page can be calculated as
+ (value>>8)&0xff.)
+
+ A fully qualified token constructed from the return
+ value violates the goal that fully qualified tokens be
+ opaque. Attribute tokens can either be attribute start
+ tokens or attribute value tokens. Attribute start
+ tokens may contain both a name and a value or a name
+ alone. To look up an attribute start token containing
+ a name and value, the string argument should be of the
+ form "name=value". Since attributes may be encoded as
+ either a single attribute start token, or an attribute
+ start token and one or more attribute value tokens,
+ dictionaries may contain multiple entries for a
+ particular attribute name. The caller may need to do
+ several lookups to convert a particular attribute
+ string into a set of tokens, especially if the caller
+ wants to find the smallest set of tokens to represent
+ a particular string.
+
+ These return the lower 16 bits of the fully qualified
+ token i.e., the token and code page. The rest of the
+ token can be constructed by the caller if needed. We
+ don't use all 32 bits in order to be able to return a
+ signed quantity to indicate failure.
+
+ @returns: NW_Int16
+ Either the token or -1 if the token is not found.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Int16
+NW_WBXML_Dictionary_getAttributeToken (NW_WBXML_Dictionary_t* dictionary,
+ const NW_String_t* name,
+ NW_Uint32 encoding,
+ NW_Bool matchCase);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Dictionary_getTagToken
+
+ @synopsis: Get tag token using name.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Dictionary_t* dictionary
+ The dictionary to look in.
+
+ [in] NW_String_UCS2Buff_t* name
+ The name to search for.
+
+ [in] NW_Bool matchCase
+ Case sensitive match if NW_TRUE.
+
+ @description: Look up a tag token in a dictionary. The lower two
+ bytes of the returned value represent the code page
+ and token. The token value can be calculated as
+ value&0xff and the code page can be calculated as
+ (value>>8)&0xff.
+
+ A fully qualified token is constructed from the return
+ value. This violates the goal that fully qualified
+ tokens be opaque.
+
+ These return the lower 16 bits of the fully qualified
+ token i.e., the token and code page. The rest of the
+ token can be constructed by the caller if needed. We
+ don't use all 32 bits in order to be able to return a
+ signed quantity to indicate failure.
+
+ @returns: NW_Int16
+ Either the token or -1 if the token is not found.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Int16
+NW_WBXML_Dictionary_getTagToken(NW_WBXML_Dictionary_t* dictionary,
+ NW_String_UCS2Buff_t* name,
+ NW_Bool matchCase);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Dictionary_getAttributeToken2
+
+ @synopsis: Get attribute token using name (alt.)
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Dictionary_t* dictionary
+ The dictionary to look in.
+
+ [in] NW_Uint32 encoding
+ The encoding of name.
+
+ [in] NW_Uint32 charCount
+ Length of name in characters.
+
+ [in] NW_Uint8* pBuf
+ The characters.
+
+ [out] NW_Uint16* pPageToken
+ The token.
+
+ [in] NW_Bool isName
+ NW_TRUE for attribute name, NW_FALSE for attribute value.
+
+ @description: Get attribute token using name (alt.) Boolean flag determines
+ whether to return attribute name (NW_TRUE) or attribute value
+ (NW_FALSE). A cleaner alternative is to use the more specific
+ functions which do not require the boolean argument.
+
+ These return the lower 16 bits of the fully qualified
+ token i.e., the token and code page. The rest of the
+ token can be constructed by the caller if needed. We
+ don't use all 32 bits in order to be able to return a
+ signed quantity to indicate failure.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Token returned.
+
+ [NW_STAT_FAILURE]
+ Token not found or required parameter is NULL.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Dictionary_getAttributeToken2(NW_WBXML_Dictionary_t* dictionary,
+ NW_Uint32 encoding,
+ NW_Uint32 charCount,
+ NW_Uint8* pBuf,
+ NW_Uint16* pPageToken,
+ NW_Bool isName);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Dictionary_getAttributeNameToken
+
+ @synopsis: Get attribute name token using name.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Dictionary_t* dictionary
+ The dictionary.
+
+ [in] NW_Uint32 encoding
+ The encoding.
+
+ [in] NW_Uint32 charCount
+ Length of name in characters.
+
+ [in] NW_Uint8* pBuf
+ The name.
+
+ [out] NW_Uint16* pPageToken
+ Returned token.
+
+ @description: Get attribute name token using name.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Token returned.
+
+ [NW_STAT_FAILURE]
+ Token not found or required parameter is NULL.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Dictionary_getAttributeNameToken(NW_WBXML_Dictionary_t* dictionary,
+ NW_Uint32 encoding,
+ NW_Uint32 charCount,
+ NW_Uint8* pBuf,
+ NW_Uint16* pPageToken);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Dictionary_getAttributeValueToken
+
+ @synopsis: Get attribute value token using name.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Dictionary_t* dictionary
+ The dictionary.
+
+ [in] NW_Uint32 encoding
+ The encoding.
+
+ [in] NW_Uint32 charCount
+ Length of attribute value.
+
+ [in] NW_Uint8* pBuf
+ The attribute value.
+
+ [out] NW_Uint16* pPageToken
+ The returned token.
+
+ @description: Get attribute value token using name.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Token returned.
+
+ [NW_STAT_FAILURE]
+ Token not found or required parameter is NULL.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Dictionary_getAttributeValueToken(NW_WBXML_Dictionary_t* dictionary,
+ NW_Uint32 encoding,
+ NW_Uint32 charCount,
+ NW_Uint8* pBuf,
+ NW_Uint16* pPageToken);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Dictionary_getTagToken2
+
+ @synopsis: Get tag token using name (alt.)
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Dictionary_t* dictionary
+ The dictionary.
+
+ [in] NW_Uint32 encoding
+ The encoding.
+
+ [in] NW_Uint32 charCount
+ Length of value.
+
+ [in] NW_Uint8* pBuf
+ The value.
+
+ [out] NW_Uint16* pPageToken
+ The returned token.
+
+ @description: Get tag token using name (alt.)
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Token returned.
+
+ [NW_STAT_FAILURE]
+ Token not found or required parameter is NULL.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Dictionary_getTagToken2(NW_WBXML_Dictionary_t* dictionary,
+ NW_Uint32 encoding,
+ NW_Uint32 charCount,
+ NW_Uint8* pBuf,
+ NW_Uint16* pPageToken);
+
+/* 1. returns success, oom, or failure
+ 2. if oom or failure, no leaks and no residual memory allocations
+ 3. if oom or failure on return *ppDocType is NULL
+ 4 if success on return *ppDocType is a valid string or NULL if
+ no matching dictionary or dictionary did not have a doc_type string. */
+NW_Status_t
+NW_WBXML_Dictionary_publicId_to_doctypeString(NW_Uint32 publicId,
+ NW_String_t** ppDocType);
+
+
+
+/** ----------------------------------------------------------------------- **
+ @function: CXML_Additional_Feature_Supprted
+
+ @synopsis: To decide about differnt. This helps in the debugging the
+ cXML Library. It is not for any client. So, this function
+ may not be used.
+
+ @scope: public
+
+ @parameters:
+
+ @description: There are bit masks defined for different features and for
+ internal use only.
+
+ @returns:
+
+ Bit mask of features supported. If not feature is supported
+ then this function returns zero.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C
+CXML_Int32 CXML_Additional_Feature_Supprted();
+
+
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* NW_PARSER_WBXML_DICTIONARY_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_wbxml_document.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,347 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_WBXML
+
+ @synopsis: default
+
+ @description: Definitions for WBXML document header
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef NW_PARSER_WBXML_DOCUMENT_H
+#define NW_PARSER_WBXML_DOCUMENT_H
+
+#include <xml/cxml/cxml_proj.h>
+#include <xml/cxml/nw_string_string.h>
+#include <xml/cxml/nw_encoder_stringtable.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_WBXML_StringTable
+
+ @synopsis: WBXML document string table.
+
+ @scope: public
+ @variables:
+ NW_Uint32 length
+ Length of table.
+
+ NW_Byte* data
+ The table.
+
+ @description: WBXML document string table.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_WBXML_StringTable_s {
+ NW_Uint32 length;
+ NW_Byte* data;
+}NW_WBXML_StringTable_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_WBXML_Document
+
+ @synopsis: The document structure that describes the header of the
+ current document.
+
+ @scope: public
+ @variables:
+ NW_Uint8 version
+ The version.
+
+ NW_Uint32 publicid
+ The public ID.
+
+ NW_String_t* doc_type
+ The document type.
+
+ NW_Uint32 default_public_id
+ The public ID.
+
+ NW_Uint32 charset
+ The charset (i.e. encoding)
+
+ struct strtbl
+ WBXML document string table.
+
+ NW_Uint32 body_len
+ Length of document.
+
+ NW_Encoder_StringTable_t* strtbl_extension
+ Extension string table.
+
+ @description: The document structure.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_WBXML_Document_s {
+ NW_Uint8 version;
+ NW_Uint32 publicid;
+ NW_String_t* doc_type;
+ NW_Uint32 default_public_id;
+ NW_Uint32 charset;
+ struct NW_WBXML_StringTable_s strtbl;
+ NW_Uint32 body_len;
+ /* When a document is modified, the extended table is created. */
+ /* check what its being used for */
+ NW_Encoder_StringTable_t* strtbl_extension;
+} NW_WBXML_Document_t;
+
+
+
+/* ----------------------------------------------------------------------- **
+ Document methods
+** ----------------------------------------------------------------------- **/
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Document_construct
+
+ @synopsis: Constructor.
+
+ @scope: public
+
+ @parameters:
+ [out] NW_WBXML_Document_t* doc
+ The document
+
+ [in] NW_Uint32 default_public_id
+ The public ID.
+
+ @description: Constructor.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Document constructed.
+
+ [NW_STAT_FAILURE]
+ Document not constructed.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_WBXML_Document_construct(NW_WBXML_Document_t* doc,
+ NW_Uint32 default_public_id);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Document_destruct
+
+ @synopsis: Destructor.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Document_t* doc
+ The document.
+
+ @description: Destructor.
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C void
+NW_WBXML_Document_destruct (NW_WBXML_Document_t* doc);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Document_getTableString
+
+ @synopsis: Get table string using index.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Document_t* doc
+ default
+
+ [in] NW_Uint32 index
+ default
+
+ [out] NW_String_t* s
+ default
+
+ @description: Get table string using index.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Table returned.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ Can't find table.
+
+ [NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED]
+ Encoding not supported.
+
+ [NW_STAT_FAILURE]
+ General error.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_WBXML_Document_getTableString(NW_WBXML_Document_t* doc,
+ NW_Uint32 index, NW_String_t* s);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Document_putTableString
+
+ @synopsis: Store table string returning index.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Document_t* doc
+ The document.
+
+ [in] NW_String_t* string
+ Addition to table.
+
+ [out] NW_Uint32* index
+ Index of last entry in table after addition.
+
+ @description: String table write method. Writing a dom tree may
+ require adding strings to the string table, if one
+ exists, or creating a string table if none exists.
+ We create an extended table using the encoder
+ string table write methods if this is
+ necessary. Unfortunately, there can be some
+ duplication of strings between the two tables, because
+ there is no efficient way to look up a string by name
+ in the real string table. Therefore, any string that
+ gets added to the table gets added to the extension
+ table. The encoder takes care of rationalizing the
+ two tables if the document gets rewritten as wbxml.
+ If the string is not already in the table, this method
+ adds it. The out parameter index returns the index of
+ the string in the extension table, offset by the size
+ of the real string table so that extension table
+ strings always have indexes bigger than real table
+ strings.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Table added.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Required parameter is NULL.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Out of memory.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_WBXML_Document_putTableString(NW_WBXML_Document_t* doc,
+ NW_String_t* string,
+ NW_Uint32* index);
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Document_getVersion
+
+ @synopsis: Get document version.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Document_t* document
+ The document.
+
+ @description: Gets the WBXML version number.
+
+ @returns: NW_Uint8
+ The WBXML version number.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Uint8
+NW_WBXML_Document_getVersion(NW_WBXML_Document_t* document);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Document_getPublicID
+
+ @synopsis: Get document publicID.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Document_t* document
+ The document.
+
+ @description: Gets the WBXML public ID.
+
+ @returns: NW_Uint32
+ The WBXML public ID.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Uint32
+NW_WBXML_Document_getPublicID(NW_WBXML_Document_t* document);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Document_getDocType
+
+ @synopsis: Get document type.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Document_t* document
+ The document.
+
+ @description: Get document type.
+
+ @returns: NW_String_t*
+ The address of the document type string stored in the
+ document header. The caller must not free this string.
+
+ ** ----------------------------------------------------------------------- **/
+NW_String_t*
+NW_WBXML_Document_getDocType(NW_WBXML_Document_t* document);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Document_getEncoding
+
+ @synopsis: Get document encoding.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Document_t* document
+ The document.
+
+ @description: Gets the string encoding used in a document.
+
+ @returns: NW_Uint32
+ One of the string encoding constants defined in the
+ WBXML specification. The XML engine defines the following
+ constants.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Uint32
+NW_WBXML_Document_getEncoding(NW_WBXML_Document_t* document);
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* NW_PARSER_WBXML_DOCUMENT_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_wbxml_event.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,174 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_WBXML
+
+ @synopsis: default
+
+ @description: Definitions for WBXML low-level event handling.
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef NW_PARSER_WBXML_EVENT_H
+#define NW_PARSER_WBXML_EVENT_H
+
+#include <xml/cxml/nw_wbxml_document.h>
+#include <xml/cxml/cxml_proj.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+typedef struct NW_WBXML_Parser_s NW_WBXML_Parser_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @typedef: NW_WBXML_Exception
+
+ @synopsis: Exception identifier.
+
+ @scope: public
+ @type: NW_Int32
+
+ @description: Exception identifier.
+ ** ----------------------------------------------------------------------- **/
+typedef NW_Int32 NW_WBXML_Exception_t;
+
+/* No RME doc support for function calls as variables */
+
+struct NW_WBXML_EventHandler_s {
+
+ /* State change events */
+
+ NW_Status_t (*StartDocument_CB) (NW_WBXML_Parser_t *,
+ NW_WBXML_Document_t *,
+ void *);
+
+ NW_Status_t (*EndDocument_CB) (NW_WBXML_Parser_t *,
+ void *);
+
+ NW_Status_t (*Pi_CB) (NW_WBXML_Parser_t *,
+ void *);
+
+ NW_Status_t (*Pi_End_CB) (NW_WBXML_Parser_t *,
+ void *);
+
+ NW_Status_t (*Tag_Start_CB) (NW_WBXML_Parser_t *,
+ void *);
+
+ NW_Status_t (*Tag_End_CB) (NW_WBXML_Parser_t *,
+ void *);
+
+ NW_Status_t (*Attr_Start_CB) (NW_WBXML_Parser_t *,
+ void *);
+
+ NW_Status_t (*Attr_Val_CB) (NW_WBXML_Parser_t *,
+ void *);
+
+ NW_Status_t (*Content_CB) (NW_WBXML_Parser_t *,
+ void *);
+
+ NW_Status_t (*CodePage_CB) (NW_WBXML_Parser_t *,
+ void *);
+
+ NW_Status_t (*Extension_CB) (NW_WBXML_Parser_t *,
+ void *);
+
+ /* Handle data types */
+
+ NW_Status_t (*Token_CB) (NW_WBXML_Parser_t *,
+ NW_Uint8,
+ void *);
+
+ NW_Status_t (*FQToken_CB)(NW_WBXML_Parser_t *,
+ NW_Uint32,
+ void *);
+
+ NW_Status_t (*InlineString_CB) (NW_WBXML_Parser_t *,
+ NW_Uint32,
+ void *);
+
+ NW_Status_t (*TableString_CB) (NW_WBXML_Parser_t *,
+ NW_Uint32,
+ void *);
+
+ NW_Status_t (*Binary_CB) (NW_WBXML_Parser_t *,
+ NW_Uint32,
+ void *);
+
+ NW_Status_t (*Opaque_CB) (NW_WBXML_Parser_t *,
+ NW_Uint32,
+ void *);
+
+ NW_Status_t (*Entity_CB) (NW_WBXML_Parser_t *,
+ NW_Uint32,
+ void *);
+
+ /* For parse errors */
+
+ NW_Status_t (*Exception_CB) (NW_WBXML_Parser_t *,
+ NW_WBXML_Exception_t,
+ void *);
+};
+
+
+/** ----------------------------------------------------------------------- **
+ @typedef: NW_WBXML_EventHandler
+
+ @synopsis: Parsing event handler structure.
+
+ @scope: public
+ @type: NW_WBXML_EventHandler_s
+
+ @description: Parsing events are generated as the parser parses a
+ document. The interface is currently implemented by
+ the WBXML parser, but the XML parser will use the same
+ event interface, although not all of the events will
+ be generated by both parsers. To create an event
+ handler, an application implements a set of event
+ handler functions and creates an
+ NMXB_Parse_EventHandler_t structure that contains the
+ addresses of these functions. Not all of the events
+ need to be handled; an application need only provide
+ handlers for those events it is interested in
+ Addresses of the other handlers should be set to
+ NULL.
+ This data type contains addresses of the parser
+ callback functions. To use the parser event interface,
+ the caller must implement a set of handlers and
+ initialize a NMXB_Parser_EventHandler_t to point to
+ them. Addresses must be set to NULL for any handlers
+ not implemented. The caller then registers the handler
+ with the parser by calling the appropriate handler
+ registration function. The callbacks are divided
+ between "state" callbacks and "data" callbacks. The
+ state callbacks indicate the current parser state:
+ that is, what type of element it is currently
+ parsing. The data callbacks indicate a specific data
+ type for the currently parsed element.
+
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_WBXML_EventHandler_s NW_WBXML_EventHandler_t;
+
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* NW_PARSER_WBXML_EVENT_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_wbxml_opaque.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,131 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_WBXML
+
+ @synopsis: default
+
+ @description: Wbxml token definitions
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef NW_PARSER_WBXML_OPAQUE_H
+#define NW_PARSER_WBXML_OPAQUE_H
+
+#include <xml/cxml/cxml_proj.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_WBXML_Opaque
+
+ @synopsis: WBXML opaque data.
+
+ @scope: public
+ @variables:
+ NW_Uint32 length
+ Data length.
+
+ NW_Byte* data
+ Data.
+
+ @description: WBXML opaque data.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_WBXML_Opaque_s {
+ NW_Uint32 length;
+ NW_Byte* data;
+} NW_WBXML_Opaque_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Opaque_new
+
+ @synopsis: Constructor.
+
+ @scope: public
+
+ @description: Constructor.
+
+ @returns: NW_WBXML_Opaque_t*
+ Pointer to empty structure.
+
+ ** ----------------------------------------------------------------------- **/
+NW_WBXML_Opaque_t* NW_WBXML_Opaque_new (void);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Opaque_delete
+
+ @synopsis: Destructor.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Opaque_t* opaque
+ The opaque data.
+
+ @description: Destructor. Deletes the opaque structure. The referenced
+ memory is not deleted.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t NW_WBXML_Opaque_delete (NW_WBXML_Opaque_t* opaque);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Opaque_construct
+
+ @synopsis: Constructor.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Opaque_t* opaque
+ Structure created with the "New".
+
+ [in] NW_Byte* data
+ Opaque data.
+
+ [in] NW_Uint32 length
+ Length of data.
+
+ @description: Constructor. Initializes a structure created with the "New".
+ This is really an initializer, not a constructor in the C++
+ or Java sense.
+
+ @returns: NW_Status_t
+ default
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t NW_WBXML_Opaque_construct (NW_WBXML_Opaque_t* opaque,
+ NW_Byte* data,
+ NW_Uint32 length);
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* NW_PARSER_WBXML_OPAQUE_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_wbxml_parse.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,971 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_WBXML
+
+ @synopsis: default
+
+ @description: Wbxml token definitions
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef NW_PARSER_WBXML_PARSE_H
+#define NW_PARSER_WBXML_PARSE_H
+
+#include <xml/cxml/cxml_proj.h>
+#include <xml/cxml/nw_wbxml_token.h>
+#include <xml/cxml/nw_wbxml_event.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_WBXML_CP_Registry_Entry
+
+ @synopsis: Registry entry.
+
+ @scope: public
+ @variables:
+ NW_Uint8 code_page
+ The code page.
+
+ NW_Uint32 start_offset
+ Start offset.
+
+ @description: Each entry must record if it is for tokens or attributes.
+ A trick to encode this without extra memory relies on the
+ use of two bytes in WBXML to encode a page switch. With two
+ bytes one has an even offset and one an odd offset. We pick
+ the even if it is a tag page and the odd offset if it is an
+ attribute page.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_WBXML_CP_Registry_Entry_s{
+ NW_Uint8 code_page;
+ NW_Uint32 start_offset;
+}NW_WBXML_CP_Registry_Entry_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_WBXML_CP_Registry
+
+ @synopsis: The code page registry.
+
+ @scope: public
+ @variables:
+ NW_WBXML_CP_Registry_Entry_t* storage
+ Storage array.
+
+ NW_WBXML_CP_Registry_Entry_t* current
+ Current entry.
+
+ NW_Int32 count
+ Entry count.
+
+ @description: The code page registry.
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_WBXML_CP_Registry_s {
+ NW_WBXML_CP_Registry_Entry_t* storage;
+ NW_WBXML_CP_Registry_Entry_t* current;
+ NW_Int32 count;
+ // WLIU_DEBUG:NW_Int32 realcount;
+} NW_WBXML_CP_Registry_t;
+
+/* ----------------------------------------------------------------------- **
+ TO DO: the NW_Byte code pointer needs to be removed and put into a
+ derived class in the buffer implementation
+** ----------------------------------------------------------------------- **/
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_WBXML_Parser
+
+ @synopsis: The parser.
+
+ @scope: public
+ @variables:
+ const struct NW_WBXML_EventHandler_s* handler
+ Event handlers.
+
+ void* context
+ Context to pass to event handlers.
+
+ NW_Uint32 flags
+ The flags.
+
+ NW_Uint32 state
+ The state.
+
+ NW_Uint8 tag_code_page
+ The tag code page.
+
+ NW_Uint8 attribute_code_page
+ The attribute code page.
+
+ NW_WBXML_CP_Registry_t cp_registry
+ The code page registry.
+
+ NW_Uint32 dictionary
+ 1-based index into dictionary table.
+
+ NW_WBXML_Document_t* doc
+ The document.
+
+ NW_Uint32 offset
+ Offset into bytecode.
+
+ NW_Uint32 left
+ Byte code left after current pointer.
+
+ NW_Status_t status
+ Parser status from CallBacks.
+
+ NW_Byte* p
+ Byte code pointer.
+
+ NW_Uint8 ext_t_not_table_index
+ A boolean: whether the associated index with
+ EXT_T_[0,1,2] refs a string table or not, defaults
+ to 0 meaning use string table, 1 means associated
+ integer with EXT_T_[0,1,2] is not a string table
+ index
+
+ @description: The parser.
+ ** ----------------------------------------------------------------------- **/
+struct NW_WBXML_Parser_s {
+ const struct NW_WBXML_EventHandler_s* handler; /* Event handlers */
+ void* context; /* Context to pass to event handlers */
+ NW_Uint32 flags;
+ NW_Uint32 state;
+ NW_Uint8 tag_code_page;
+ NW_Uint8 attribute_code_page;
+ NW_WBXML_CP_Registry_t cp_registry;
+ NW_Uint32 dictionary; /* 1-based index into dictionary table */
+ NW_WBXML_Document_t* doc;
+ NW_Uint32 offset; /*Offset into bytecode */
+ NW_Uint32 left; /* Byte code left after current pointer */
+ NW_Status_t status; /* Parser status from CallBacks */
+ NW_Byte* p; /*Byte code pointer */
+ NW_Uint32 recursiveCallCnt; /* counts "element parse/content parse" recursive calls*/
+ /* a boolean, whether EXT_T_[0,1,2] refs a string table or not,
+ defaults to 0 meaning use string table, 1 means associated
+ integer with EXT_T_[0,1,2] is not a string table index */
+ NW_Uint8 ext_t_not_table_index;
+// WLIU_DEBUG: NW_Int32 lastValid;
+};
+
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_newInPlace
+
+ @synopsis: Parser initialization
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ @description: Parser initialization
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C void
+NW_WBXML_Parser_newInPlace (NW_WBXML_Parser_t* parser);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_reset
+
+ @synopsis: Reset the parser.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ @description: Reset the parser.
+
+ ** ----------------------------------------------------------------------- **/
+void
+NW_WBXML_Parser_reset (NW_WBXML_Parser_t* parser);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_delete
+
+ @synopsis: Destructor.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ @description: Destructor.
+
+ ** ----------------------------------------------------------------------- **/
+void
+NW_WBXML_Parser_delete (NW_WBXML_Parser_t* parser);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_addCPRegistry
+
+ @synopsis: Add CP registry.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ [in] NW_WBXML_CP_Registry_Entry_t* storage
+ The entries.
+
+ [in] NW_Int32 count
+ The number of entries.
+
+ @description: Create an uninitialized code page registry. As long
+ as the registry is not created, it will be
+ ignored. Once it has been created, the parser will
+ check the REGISTRY_INIT flag. If this is not set, the
+ registry will be initialized as the parser runs. If
+ this is set, then the registry will be consulted when
+ updating the offset.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Parser_addCPRegistry(NW_WBXML_Parser_t* parser,
+ NW_WBXML_CP_Registry_Entry_t* storage,
+ NW_Int32 count);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_registerHandler
+
+ @synopsis: Register handler.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Parser_t* parser
+ The parser.
+
+ [in] const struct NW_WBXML_EventHandler_s* handler
+ The handler.
+
+ [in] void* context
+ The context.
+
+ @description: Cache the parser's event handler and context.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_WBXML_Parser_registerHandler(NW_WBXML_Parser_t* parser,
+ const struct NW_WBXML_EventHandler_s* handler,
+ void* context);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_saveContext
+
+ @synopsis: Save parser context.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Parser_t* parser
+ The parser.
+
+ [out] NW_WBXML_Parser_t* context
+ The context.
+
+ @description: Save/restore context can be used if the parser is to be
+ invoked reentrantly (in a callback). Normally this should
+ be avoided since the only really safe way to do this is to
+ save the whole parser object on the stack.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Parser_saveContext(NW_WBXML_Parser_t* parser,
+ NW_WBXML_Parser_t* context);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_restoreContext
+
+ @synopsis: Restore parser context.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Parser_t* parser
+ The parser.
+
+ [in] NW_WBXML_Parser_t* context
+ The context.
+
+ @description: Restore parser context. See description for saveContext().
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Parser_restoreContext(NW_WBXML_Parser_t* parser,
+ NW_WBXML_Parser_t* context);
+
+/* ----------------------------------------------------------------------- **
+ Get and set methods
+** ----------------------------------------------------------------------- **/
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_getOffset
+
+ @synopsis: Get offset.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Parser_t* parser
+ The parser.
+
+ @description: Get offset.
+
+ @returns: NW_Uint32
+ Read offset.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Uint32
+NW_WBXML_Parser_getOffset(NW_WBXML_Parser_t* parser);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_setOffset
+
+ @synopsis: Set offset.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ [in] NW_Uint32 offset
+ New offset.
+
+ @description: Set offset.
+
+ @returns: NW_Int32
+ Offset or -1 if out of range.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Int32
+NW_WBXML_Parser_setOffset(NW_WBXML_Parser_t* parser,
+ NW_Uint32 offset);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_setTagCodepage
+
+ @synopsis: Set tag codepage.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ [in] NW_Uint8 page
+ The page.
+
+ @description: Set tag codepage.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Parser_setTagCodepage(NW_WBXML_Parser_t* parser,
+ NW_Uint8 page);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_getTagCodepage
+
+ @synopsis: Get tag codepage.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Parser_t* parser
+ The parser.
+
+ @description: Get tag codepage.
+
+ @returns: NW_Uint8
+ The code page.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Uint8
+NW_WBXML_Parser_getTagCodepage(NW_WBXML_Parser_t* parser);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_setAttrCodepage
+
+ @synopsis: Set attribute codepage.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ [in] NW_Uint8 page
+ The code page.
+
+ @description: Set attribute codepage.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Parser_setAttrCodepage(NW_WBXML_Parser_t* parser,
+ NW_Uint8 page);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_getAttrCodepage
+
+ @synopsis: Get attribute codepage.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Parser_t* parser
+ The parser.
+
+ @description: Get attribute codepage.
+
+ @returns: NW_Uint8
+ Code page.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Uint8
+NW_WBXML_Parser_getAttrCodepage(NW_WBXML_Parser_t* parser);
+
+
+/* ----------------------------------------------------------------------- **
+ Parse document elements
+** ----------------------------------------------------------------------- **/
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_tagNameParse
+
+ @synopsis: Tag name parse.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ @description: Parse the token and name part of a tag. This generates a
+ fully qualified token.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Tag name parsed.
+
+ [NW_STAT_WBXML_HAS_ATTRIBUTES]
+ Has attributes.
+
+ [NW_STAT_WBXML_HAS_ATTR_CONTENT]
+ Has attribute content.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ Parse error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Parser_tagNameParse(NW_WBXML_Parser_t* parser);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_attributeListIterate
+
+ @synopsis: Parse an attribute list.
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ @description: Parse an attribute list
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ Parse error.
+
+ [NW_STAT_WBXML_ITERATE_DONE]
+ Done.
+
+ [NW_STAT_WBXML_ITERATE_MORE]
+ More to do.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Parser_attributeListIterate (NW_WBXML_Parser_t* parser);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_attributeValsIterate
+
+ @synopsis: Parse an attribute value list.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ @description: Parse an attribute value list.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ Parse error.
+
+ [NW_STAT_WBXML_ITERATE_DONE]
+ Done.
+
+ [NW_STAT_WBXML_ITERATE_MORE]
+ More to do.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Parser_attributeValsIterate (NW_WBXML_Parser_t* parser);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_attributeNameParse
+
+ @synopsis: Parse an attribute.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ @description: Parse an attribute.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Attribute parsed.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ Parse error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Parser_attributeNameParse (NW_WBXML_Parser_t* parser);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_textIterate
+
+ @synopsis: Parse text.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ @description: Parse text.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ Parse error.
+
+ [NW_STAT_WBXML_ITERATE_DONE]
+ Done.
+
+ [NW_STAT_WBXML_ITERATE_MORE]
+ More to do.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Parser_textIterate(NW_WBXML_Parser_t* parser);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_parser_attributeListIterate
+
+ @synopsis: Parse an attribute list.
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ @description: Parse an attribute list.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ Parse error.
+
+ [NW_STAT_WBXML_ITERATE_DONE]
+ Done.
+
+ [NW_STAT_WBXML_ITERATE_MORE]
+ More to do.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_parser_attributeListIterate(NW_WBXML_Parser_t* parser);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_parser_attributeValsIterate
+
+ @synopsis: Parse attribute values.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ @description: Parse attribute values.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ Parse error.
+
+ [NW_STAT_WBXML_ITERATE_DONE]
+ Done.
+
+ [NW_STAT_WBXML_ITERATE_MORE]
+ More to do.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_parser_attributeValsIterate (NW_WBXML_Parser_t* parser);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_attributeParse
+
+ @synopsis: Attribute parse.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Parser_t* parser
+ The parser.
+
+ @description: Attribute parse.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Done.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ Parse error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Parser_attributeParse(NW_WBXML_Parser_t* parser);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_contentParse
+
+ @synopsis: Parse content.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ @description: Parse content.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Done.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ Parse error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Parser_contentParse (NW_WBXML_Parser_t* parser);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_extensionParse
+
+ @synopsis: Parse extension.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ [in] NW_Int32 token_state
+ Token state.
+
+ @description: Parse extension.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Done.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ Parse error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Parser_extensionParse (NW_WBXML_Parser_t* parser,
+ NW_Int32 token_state);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_opaqueParse
+
+ @synopsis: Parse opaque data.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ [in] NW_Int32 token_state
+ Token state.
+
+ @description: Parse opaque data.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Done.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ Parse error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Parser_opaqueParse (NW_WBXML_Parser_t* parser,
+ NW_Int32 token_state);
+
+/* ----------------------------------------------------------------------- **
+ TODO READ_WRITE only?
+** ----------------------------------------------------------------------- **/
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_setBuffer
+
+ @synopsis: Sets parser to use a buffer without parsing it.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ [in] NW_WBXML_Document_t* doc
+ The document.
+
+ [in] NW_Byte* buf
+ The buffer.
+
+ [in] NW_Uint32 bufsize
+ The size of the buffer.
+
+ @description: This method sets the parser to use a buffer without
+ actually parsing it. This is used by clients who want
+ to create a tree from scratch without parsing a
+ document. This requires that doc be initialized with
+ any document type and charset and that the parser be
+ initialized. This should leave the parser in the same
+ state as NW_WBXML_Parser_parserBuffer() followed by
+ NW_WBXML_Parser_reintialize().
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Parser_setBuffer (NW_WBXML_Parser_t* parser,
+ NW_WBXML_Document_t* doc,
+ NW_Byte* buf,
+ NW_Uint32 bufsize);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_resetBuffer
+
+ @synopsis: Reset buffer.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ [in] NW_Byte* buff
+ The buffer.
+
+ [in] NW_Uint32 buffsize
+ The size of the buffer.
+
+ @description: Reset the parser buffer without resetting the doc.
+ This is more efficient when, for example, the buffer
+ gets resized due to a reallocation.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Parser_resetBuffer(NW_WBXML_Parser_t* parser,
+ NW_Byte* buff,
+ NW_Uint32 buffsize);
+
+/* ----------------------------------------------------------------------- **
+ TODO: Move to parser buffer header?
+** ----------------------------------------------------------------------- **/
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_parseBuffer
+
+ @synopsis: Parse buffer.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ [in] NW_WBXML_Document_t* doc
+ The document.
+
+ [in] NW_Byte* buf
+ The buffer.
+
+ [in] NW_Uint32 bufsize
+ The size of the buffer.
+
+ @description: Parse document from a buffer.
+
+ @returns: NW_Status_t
+ Status of the operation.
+
+ [NW_STAT_SUCCESS]
+ Done.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ Parse error.
+
+ [NW_STAT_OUT_OF_MEMORY]
+ Out of memory.
+
+ [NW_STAT_BAD_INPUT_PARAM]
+ Requird parameter is NULL.
+
+ [NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED]
+ Invalid character set.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_WBXML_Parser_parseBuffer (NW_WBXML_Parser_t* parser,
+ NW_WBXML_Document_t* doc,
+ NW_Byte* buf,
+ NW_Uint32 bufsize);
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* NW_PARSER_WBXML_PARSE_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_wbxml_reader.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,274 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#warning The CXML API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_WBXML
+
+ @synopsis: default
+
+ @description: Wbxml token definitions
+
+ ** ----------------------------------------------------------------------- **/
+
+/* ----------------------------------------------------------------------- **
+ Definitions for the WBXML parser's reader
+** ----------------------------------------------------------------------- **/
+
+#ifndef NW_PARSER_WBXML_READER_H
+#define NW_PARSER_WBXML_READER_H
+
+#include <xml/cxml/cxml_proj.h>
+#include <xml/cxml/nw_wbxml_document.h>
+#include <xml/cxml/nw_wbxml_opaque.h>
+#include <xml/cxml/nw_wbxml_parse.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/* The "parser-reader" interface */
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_advance
+
+ @synopsis: Advance parser.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t parser* parser
+ The parser.
+
+ [in] NW_Int32 count
+ Amount to advance the parser.
+
+ @description: Safely advance the parser through bytecode. The functions
+ which read values from the parser don't advance the parser
+ since this may not be necessary or safe (e.g. when reading
+ the last data item.).
+
+ @returns: NW_Int32
+ Amount advanced or -1 if out of range.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Int32
+NW_WBXML_Parser_advance (NW_WBXML_Parser_t* parser,
+ NW_Int32 count);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_hasMoreBytecode
+
+ @synopsis: Check if there is more NW_Byte code to read.
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Parser_t* parser
+ The parser.
+
+ @description: Check if there is more NW_Byte code to read.
+
+ @returns: NW_Int32
+ 1 if more left otherwise 0.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Int32
+NW_WBXML_Parser_hasMoreBytecode (NW_WBXML_Parser_t* parser);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_readUint8
+
+ @synopsis: Read 8 bit unsigned integer.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ @description: Read 8 bit unsigned integer.
+
+ @returns: NW_Uint8
+ The integer.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Uint8
+NW_WBXML_Parser_readUint8 (NW_WBXML_Parser_t* parser);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_readMbUint32
+
+ @synopsis: Read 32 bit unsigned integer.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ [in] NW_Uint32* val
+ The value.
+
+ @description: Read 32 bit unsigned integer.
+
+ @returns: NW_Int32
+ Number of bytes read or -1 if failed..
+
+ ** ----------------------------------------------------------------------- **/
+NW_Int32
+NW_WBXML_Parser_readMbUint32 (NW_WBXML_Parser_t* parser,
+ NW_Uint32* val);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_getInlineStrLen
+
+ @synopsis: Get inline string length.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_WBXML_Parser_t* parser
+ The parser.
+
+ [in] NW_WBXML_Document_t* doc
+ The document.
+
+ @description: Safely get the length of an inline string at current
+ parser position.
+
+ @returns: NW_Int32
+ Number of bytes read or -1 if failed.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Int32
+NW_WBXML_Parser_getInlineStrLen (NW_WBXML_Parser_t* parser,
+ NW_WBXML_Document_t* doc);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_getStringInline
+
+ @synopsis: Get inline string.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ [in] NW_WBXML_Document_t* doc
+ The document.
+
+ [out] NW_String_t* s
+ The returned string.default
+
+ @description: Safely read an inline string at the current parser position.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ String read.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ Read error.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_WBXML_Parser_getStringInline(NW_WBXML_Parser_t* parser,
+ NW_WBXML_Document_t* doc,
+ NW_String_t* s);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_getOpaque
+
+ @synopsis: Get opaque.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ [in] NW_Uint32 length
+ Maximum nuber of bytes to read.
+
+ [out] NW_WBXML_Opaque_t* o
+ Opaque storage.
+
+ @description: Safely get an opaque at the current parser position.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_WBXML_Parser_getOpaque(NW_WBXML_Parser_t* parser,
+ NW_Uint32 length,
+ NW_WBXML_Opaque_t* o);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_WBXML_Parser_readStringTable
+
+ @synopsis: Read string table.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_WBXML_Parser_t* parser
+ The parser.
+
+ [in] NW_WBXML_Document_t* doc
+ The document.
+
+ [out] NW_Byte** table
+ The loaded table.
+
+ @description: Read in the string table.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ String table read.
+
+ [NW_STAT_WBXML_ERROR_BYTECODE]
+ Read error.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_WBXML_Parser_readStringTable(NW_WBXML_Parser_t* parser,
+ NW_WBXML_Document_t* doc,
+ NW_Byte** table);
+
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* NW_PARSER_WBXML_READER_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_wbxml_token.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_WBXML
+
+ @synopsis: default
+
+ @description: Wbxml token definitions
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef NW_PARSER_WBXML_TOKEN_H
+#define NW_PARSER_WBXML_TOKEN_H
+
+#include <xml/cxml/cxml_proj.h>
+#include <xml/cxml/nw_string_string.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+/*
+ * WBXML global tokens, section 7
+ */
+
+#define NW_WBXML_SWITCH_PAGE 0x00
+#define NW_WBXML_END 0x01
+#define NW_WBXML_ENTITY 0x02
+#define NW_WBXML_STR_I 0x03
+#define NW_WBXML_LITERAL 0x04
+
+#define NW_WBXML_EXT_I_0 0x40
+#define NW_WBXML_EXT_I_1 0x41
+#define NW_WBXML_EXT_I_2 0x42
+#define NW_WBXML_PI 0x43
+#define NW_WBXML_LITERAL_C 0x44
+
+#define NW_WBXML_EXT_T_0 0x80
+#define NW_WBXML_EXT_T_1 0x81
+#define NW_WBXML_EXT_T_2 0x82
+#define NW_WBXML_STR_T 0x83
+#define NW_WBXML_LITERAL_A 0x84
+
+#define NW_WBXML_EXT_0 0xC0
+#define NW_WBXML_EXT_1 0xC1
+#define NW_WBXML_EXT_2 0xC2
+#define NW_WBXML_OPAQUE 0xC3
+#define NW_WBXML_LITERAL_AC 0xC4
+
+
+/*
+ * WBXML tag tokens, section 5.8
+ */
+
+#define NW_WBXML_MASK_TAG_ID 0x3F /* Masks off a tag's "has attribute"
+ * and/or "has content" bit(s) */
+#define NW_WBXML_FLAGS_ATTRIBUTES 0x80
+#define NW_WBXML_FLAGS_CONTENT 0x40
+
+
+/* TODO: these defs belong somewhere else */
+/* Attribute component type info */
+
+#define NW_WBXML_ATTR_COMPONENT_TOKEN 0
+#define NW_WBXML_ATTR_COMPONENT_STRING 1
+#define NW_WBXML_ATTR_COMPONENT_EXT 2
+#define NW_WBXML_ATTR_COMPONENT_ENTITY 3
+#define NW_WBXML_ATTR_COMPONENT_OPAQUE 4
+#define NW_WBXML_ATTR_COMPONENT_INVALID 5
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_xmlp_xmlp2wbxml.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,168 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_XML
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef NW_XMLP2WBXML_H
+#define NW_XMLP2WBXML_H
+
+#include <xml/cxml/nw_xmlp_xmlreader.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_Xml_Text2WbxmlEncoder_New
+
+ @synopsis: Constructor.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Uint32 publicID
+ The public ID.
+
+ [in] NW_Uint32 encoding
+ The encoding.
+
+ [out] void** ppV
+ The returned structure.
+
+ @description: Constructor.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_XML_Text2WbxmlEncoder_New(NW_Uint32 publicID, NW_Uint32 encoding, void** ppV);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_XmlpWbxmlEncoder_Delete
+
+ @synopsis: Destructor.
+
+ @scope: public
+
+ @parameters:
+ [in] void* pV
+ The encoder.
+
+ @description: Destructor.
+ ** ----------------------------------------------------------------------- **/
+void
+NW_XML_XmlpWbxmlEncoder_Delete(void* pV);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_ComputeEncoding
+
+ @synopsis: Compute encoding.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Uint32 length
+ Length of buffer.
+
+ [in] const unsigned char* pBuf
+ Buffer.
+
+ [out] NW_Uint32* pEncoding
+ The calculated encoding.
+
+ [out] NW_XML_Endianness_t* pEndianness
+ The calculated endianness.
+
+ @description: Compute encoding.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Endianness and encoding determined.
+
+ [NW_STAT_FAILURE]
+ Invalid length. Must be >= 4 to determine encoding.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C
+NW_Status_t
+NW_XML_ComputeEncoding(NW_Uint32 length, const unsigned char* pBuf,
+ NW_Uint32* pEncoding, NW_XML_Endianness_t* pEndianness);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_XmlToWbxml
+
+ @synopsis: Convert buffer from Xml to Wbxml.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_Buffer_t* pInBuf
+ The input buffer.
+
+ [in] NW_Uint32 encoding
+ The encoding.
+
+ [out] NW_Buffer_t** ppOutBuf
+ Converted data.
+
+ [out] NW_Uint32* line
+ Line count.
+
+ [in] NW_Uint32 publicID
+ The public ID.
+ [out] void** WBXMLEncStrTbl:
+ Stores the string table of WBXML encoder.
+
+ @description: Convert buffer from Xml to Wbxml.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Buffer converted to WBXML.
+
+ [NW_STAT_FAILURE]
+ Required parameter is NULL, doc has odd number of bytes
+ or no data to process.
+
+ ** ----------------------------------------------------------------------- **/
+NW_Status_t
+NW_XML_XmlToWbxml(NW_Buffer_t* pInBuf, NW_Uint32 encoding,
+ NW_Buffer_t** ppOutBuf, NW_Uint32* line,
+ NW_Uint32 publicID, void** WBXMLEncStrTbl);
+
+
+#ifdef __cplusplus
+} // extern "C" {
+#endif /* __cplusplus */
+
+#endif /* NW_XMLP2WBXML_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_xmlp_xmlparser.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,234 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_XML
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef NW_XMLPARSER_H
+#define NW_XMLPARSER_H
+
+#include <xml/cxml/nw_xmlp_xmlreader.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/** ----------------------------------------------------------------------- **
+ @enum: NW_XML_PiFormTypeTag
+
+ @synopsis: Process instruction type definitions.
+
+ @scope: public
+ @names:
+ [UNKNOWFORM]
+ Don't know what type it is.
+
+ [PI]
+ Process instruction.
+
+ [XMLDECL]
+ May be a TextDecl
+
+ [XMLRESERVED]
+ XML reserved.
+
+ @description: Process instruction type definitions.
+ ** ----------------------------------------------------------------------- **/
+typedef enum NW_XML_PiFormTypeTag_e {
+ UNKNOWFORM,
+ PI,
+ XMLDECL,
+ XMLRESERVED
+} NW_XML_PiFormTypeTag_t;
+
+/* Deprecated - Lext in for backward compatibility. */
+typedef enum NW_XML_PiFormTypeTag_e NW_PiFormTypeTag_t;
+
+/* RME documentation tools do not support function calls as variables yet */
+
+/* * ----------------------------------------------------------------------- **
+ @struct: NW_XML_Parser_EventCallbacks
+
+ @synopsis: default
+
+ @scope: public
+ @variables:
+ NW_Status_t (*StartDocument_CB) (NW_XML_Reader_t*, void*)
+ default
+
+ NW_Status_t (*EndDocument_CB) (NW_XML_Reader_t*, void*)
+ default
+
+ NW_Status_t (*PiForm_CB) (NW_XML_Reader_t*,
+ NW_XML_PiFormTypeTag_t piTypeTag,
+ const NW_XML_Reader_Interval_t* pI_name,
+ const NW_XML_Reader_Interval_t* pI_version,
+ const NW_XML_Reader_Interval_t* pI_encoding,
+ const NW_XML_Reader_Interval_t* pI_standalone,
+ const NW_XML_Reader_Interval_t* pI_content,
+ void*)
+ default
+
+ NW_Status_t (*Tag_Start_CB) (NW_XML_Reader_t*,
+ const NW_XML_Reader_Interval_t* pI_name,
+ void*)
+ default
+
+ NW_Status_t (*Tag_End_CB) (NW_XML_Reader_t*,
+ const NW_XML_Reader_Interval_t* pI_name,
+ NW_Uint32 emptyTagFlag,
+ void*)
+ default
+
+ NW_Status_t (*Attr_Start_CB) (NW_XML_Reader_t*,
+ const NW_XML_Reader_Interval_t* pI_name,
+ void*)
+ default
+
+ NW_Status_t (*Attr_VarVal_CB) (NW_XML_Reader_t*,
+ const NW_XML_Reader_Interval_t* pI_name,
+ const NW_XML_Reader_Interval_t* pI_value,
+ void*)
+ default
+
+ NW_Status_t (*Attributes_End_CB) (NW_XML_Reader_t*, NW_Uint32 attributeCount,
+ void*)
+ default
+
+ NW_Status_t (*Cdata_CB) (NW_XML_Reader_t*,
+ const NW_XML_Reader_Interval_t* pI_cdata,
+ void*)
+ default
+
+ NW_Status_t (*Content_CB) (NW_XML_Reader_t*,
+ const NW_XML_Reader_Interval_t* pI_cdata,
+ void*)
+ default
+
+ NW_Status_t (*Comment_CB) (NW_XML_Reader_t*,
+ const NW_XML_Reader_Interval_t* pI_comment,
+ void*)
+ default
+
+ NW_Status_t (*Extension_CB) (NW_XML_Reader_t*, void*)
+ default
+
+ NW_Status_t (*Exception_CB) (NW_XML_Reader_t*, void*)
+ default
+
+ void* pClientPointer
+ Passed back in each callback.
+
+ @description: default
+ ** ----------------------------------------------------------------------- **/
+struct NW_XML_Parser_EventCallbacks_s
+{
+ NW_Status_t (*StartDocument_CB) (NW_XML_Reader_t*, void*);
+ NW_Status_t (*EndDocument_CB) (NW_XML_Reader_t*, void*);
+ NW_Status_t (*PiForm_CB) (NW_XML_Reader_t*,
+ NW_XML_PiFormTypeTag_t piTypeTag,
+ const NW_XML_Reader_Interval_t* pI_name,
+ const NW_XML_Reader_Interval_t* pI_version,
+ const NW_XML_Reader_Interval_t* pI_encoding,
+ const NW_XML_Reader_Interval_t* pI_standalone,
+ const NW_XML_Reader_Interval_t* pI_content,
+ void*);
+ NW_Status_t (*Tag_Start_CB) (NW_XML_Reader_t*,
+ const NW_XML_Reader_Interval_t* pI_name,
+ void*);
+ NW_Status_t (*Tag_End_CB) (NW_XML_Reader_t*,
+ const NW_XML_Reader_Interval_t* pI_name,
+ NW_Uint32 emptyTagFlag,
+ void*);
+ NW_Status_t (*Attr_Start_CB) (NW_XML_Reader_t*,
+ const NW_XML_Reader_Interval_t* pI_name,
+ void*);
+ NW_Status_t (*Attr_VarVal_CB) (NW_XML_Reader_t*,
+ const NW_XML_Reader_Interval_t* pI_name,
+ const NW_XML_Reader_Interval_t* pI_value,
+ void*);
+ NW_Status_t (*Attributes_End_CB) (NW_XML_Reader_t*, NW_Uint32 attributeCount,
+ void*);
+ NW_Status_t (*Cdata_CB) (NW_XML_Reader_t*,
+ const NW_XML_Reader_Interval_t* pI_cdata,
+ void*);
+ NW_Status_t (*Content_CB) (NW_XML_Reader_t*,
+ const NW_XML_Reader_Interval_t* pI_cdata,
+ void*);
+ NW_Status_t (*Comment_CB) (NW_XML_Reader_t*,
+ const NW_XML_Reader_Interval_t* pI_comment,
+ void*);
+ NW_Status_t (*Extension_CB) (NW_XML_Reader_t*, void*);
+
+ NW_Status_t (*Exception_CB) (NW_XML_Reader_t*, void*);
+
+ NW_Status_t (*Entity_CB) (NW_XML_Reader_t*, NW_Uint32 numEntity,void* ,CXML_Uint8* str);
+
+ NW_Status_t (*Attr_Entity_VarVal_CB) (NW_XML_Reader_t* pT,
+ const NW_XML_Reader_Interval_t* pI_name,
+ NW_Uint8* pValue,
+ NW_Uint32 valueByteLength,
+ void* pV);
+
+ void* pClientPointer; /* passed back in each callback*/
+};
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_Parse
+
+ @synopsis: The XML main parser.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_XML_Reader_t* t
+ The XML reader.
+
+ [in] const struct NW_XML_Parser_EventCallbacks_s* pE
+ The callbacks.
+
+ @description: The XML main parser. Parses the entire document.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Parsed the document.
+
+ [NW_STAT_FAILURE]
+ Failed somewhere along the way.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_XML_Parse(NW_XML_Reader_t* t, const struct NW_XML_Parser_EventCallbacks_s* pE);
+
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+
+#endif /* NW_XMLPARSER_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nw_xmlp_xmlreader.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,689 @@
+/*
+* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/** ----------------------------------------------------------------------- **
+ @package: NW_XML
+
+ @synopsis: default
+
+ @description: default
+
+ ** ----------------------------------------------------------------------- **/
+
+#ifndef NW_XML_READER_H
+#define NW_XML_READER_H
+
+#include <xml/cxml/cxml_proj.h>
+/** ----------------------------------------------------------------------- **
+ @enum: NW_XML_Endianness
+
+ @synopsis: Endian indication.
+
+ @scope: public
+ @names:
+ [NW_NATIVE_ENDIAN]
+ Use native endianness.
+
+ [NW_BIG_ENDIAN]
+ The leftmost bytes (those with a lower address) are
+ most significant.
+
+ [NW_LITTLE_ENDIAN]
+ The rightmost bytes (those with a higher address) are
+ most significant
+
+ @description: Endian indication.
+ ** ----------------------------------------------------------------------- **/
+typedef enum NW_XML_Endianness_e {
+ NW_NATIVE_ENDIAN,
+ NW_BIG_ENDIAN,
+ NW_LITTLE_ENDIAN
+} NW_XML_Endianness_t;
+
+/* Remove references to this deprecated typedef */
+typedef NW_XML_Endianness_t NW_Endianness_t;
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_XML_Reader_LineColumn
+
+ @synopsis: Line and column cursor.
+
+ @scope: public
+ @variables:
+ NW_Uint32 crCount
+ Carriage return count.
+
+ NW_Uint32 lfCount
+ Line feed count.
+
+ NW_Uint32 charsSinceLastCR
+ Chars since last CR
+
+ NW_Uint32 charsSinceLastLF
+ Chars since last LF
+
+ @description: Line and column cursor.
+
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_XML_Reader_LineColumn_s{
+ NW_Uint32 crCount;
+ NW_Uint32 lfCount;
+ NW_Uint32 charsSinceLastCR;
+ NW_Uint32 charsSinceLastLF;
+}NW_XML_Reader_LineColumn_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_XML_Reader
+
+ @synopsis: The XML reader structure.
+
+ @scope: public
+ @variables:
+ NW_Uint32 encoding
+ Character set encoding code in force at this index,
+ may change.
+
+ NW_XML_Endianness_t endianness
+ Big, little or native endianness indicator.
+
+ NW_Uint32 index
+ Current read position in pBuf, a byte index moved
+ by character according to the encoding.
+
+ NW_Uint32 charIndex
+ Similar to index but in terms of characters not bytes.
+
+ NW_XML_Reader_LineColumn_t lineColumn
+ Information for giving text position as line and column,
+ useful for reporting parsing failure.
+
+ NW_Uint32 length
+ Length of data.
+
+ NW_Uint8* pBuf
+ Text is stored in pBuf and the Reader functions provide
+ the interface to the characters in pBuf.
+
+ NW_Bool end
+ End (like EOF): 0 = not at end, 1 = at end.
+
+ @description: Users of Reader should not look directly inside the structure.
+ Instead, use access functions and macros.
+
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_XML_Reader_s{
+ NW_Uint32 encoding;
+ NW_XML_Endianness_t endianness;
+ NW_Uint32 index;
+ NW_Uint32 charIndex;
+ NW_XML_Reader_LineColumn_t lineColumn;
+ NW_Uint32 length;
+ NW_Uint8* pBuf;
+ NW_Bool end;
+} NW_XML_Reader_t;
+
+
+/** ----------------------------------------------------------------------- **
+ @struct: NW_XML_Reader_Interval
+
+ @synopsis: XML reader interval structure.
+
+ @scope: public
+ @variables:
+ NW_Uint32 start
+ Byte index.
+
+ NW_Uint32 stop
+ Byte index.
+
+ NW_Uint32 charStart
+ Character index.
+
+ NW_Uint32 charStop
+ Character index.
+
+ @description: Holds Reader index values defining an interval.
+ Useful to mark a substring in a Reader. If the text
+ is "this is a sample" and the interval has start = 0,
+ stop = 4 then the substring is "this". Length is stop
+ - start. If both values are NW_UINT32_MAX then these
+ are sentinel values meaning an initialized but unset
+ interval, otherwise, if both are the same, it means
+ start has been set but stop hasn't been set. Don't
+ directly set, use appropriate interval functions.
+
+ Note: You may also need to record the encoding that
+ applies to this interval if Reader encoding has changed.
+
+ ** ----------------------------------------------------------------------- **/
+typedef struct NW_XML_Reader_Interval_s{
+ NW_Uint32 start;
+ NW_Uint32 stop;
+ NW_Uint32 charStart;
+ NW_Uint32 charStop;
+} NW_XML_Reader_Interval_t;
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+/* ----------------------------------------------------------------------- **
+Reader Functions
+** ----------------------------------------------------------------------- **/
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_Reader_InitFromBuffer
+
+ @synopsis: Initialize from buffer.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_XML_Reader_t* pT
+ The XML reader.
+
+ [in] NW_Uint32 length
+ Length of buffer.
+
+ [in] unsigned char* pBuf
+ The buffer.
+
+ @description: Pass in pBuf, the pointer (not the data) will be copied
+ into the NW_XML_Reader_t.pBuf.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Always returns success.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_XML_Reader_InitFromBuffer(NW_XML_Reader_t* pT, NW_Uint32 length, unsigned char* pBuf);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_Reader_DataAddressFromBuffer
+
+ @synopsis: Gets pointer into buffer.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_XML_Reader_t* pT
+ The XML reader.
+
+ [in] NW_Uint32 startByteIndex
+ The index.
+
+ [in-out] NW_Uint32* byteLength
+ IN as desired length, OUT as either desired length or
+ remainder of buffer, whichever is less.
+
+ [out] NW_Uint8** ppData
+ Pointer to data.
+
+ @description: Returns a pointer into pBuf in *ppData, clips length
+ to fit in buffer limits.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Address resolved.
+
+ [NW_STAT_FAILURE]
+ Index out of range.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_XML_Reader_DataAddressFromBuffer(NW_XML_Reader_t* pT, NW_Uint32 startByteIndex,
+ NW_Uint32* byteLength, NW_Uint8** ppData);
+
+#define NW_XML_Reader_GetEncoding(pT) (((const NW_XML_Reader_t*)pT)->encoding)
+#define NW_XML_Reader_SetEncoding(pT, e) ((pT)->encoding = (e))
+
+#define NW_XML_Reader_GetEndianness(pT) (((const NW_XML_Reader_t*)pT)->endianness)
+#define NW_XML_Reader_SetEndianness(pT, e) ((pT)->endianness = (e))
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_Reader_GetPosition
+
+ @synopsis: Returns current position.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_XML_Reader_t* pT
+ The XML reader.
+
+ [out] NW_Uint32* pByteIndex
+ Current byte index.
+
+ [out] NW_Uint32* pCharIndex
+ Current character index.
+
+ [out] NW_XML_Reader_LineColumn_t* pLineColumn
+ Current line and column.
+
+ @description: Returns current position.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C
+void NW_XML_Reader_GetPosition(NW_XML_Reader_t* pT, NW_Uint32* pByteIndex,
+ NW_Uint32* pCharIndex,
+ NW_XML_Reader_LineColumn_t* pLineColumn);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_Reader_SetPosition
+
+ @synopsis: Sets position in reader.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_XML_Reader_t* pT
+ The XML reader.
+
+ [in] NW_Uint32 byteIndex
+ The byte index.
+
+ [in] NW_Uint32 charIndex
+ The character index.
+
+ [in] const pLineColumn
+ The line and column.
+
+ @description: Setting the position (similar to seeking in a file) is
+ in general not possible without reading the characters
+ (usually reading forward) because character encoding
+ may use a variable numbers of bytes per character. This
+ is here so that if you have defined a valid interval,
+ then you can reposition to the beginning of the interval.
+ Setting to the position to a bad value will not always be
+ caught immediately.
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C
+void NW_XML_Reader_SetPosition(NW_XML_Reader_t* pT, NW_Uint32 byteIndex,
+ NW_Uint32 charIndex,
+ const NW_XML_Reader_LineColumn_t* pLineColumn);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_Reader_GetLineColumn
+
+ @synopsis: Gets estimate of line and column.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_XML_Reader_t* pT
+ The XML reader.
+
+ [out] NW_Uint32* pLine
+ The current line.
+
+ [out] NW_Uint32* pColumn
+ The current column.
+
+ @description: Returns an estimate of the current line and column
+ position in the text. It is an estimate because it has
+ to guess at what the intended line ending sequence is
+ using a count of CR and LF characters. Line and Column
+ indices are 1-based not 0-based.
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C
+void NW_XML_Reader_GetLineColumn(NW_XML_Reader_t* pT, NW_Uint32* pLine,
+ NW_Uint32* pColumn);
+
+#define NW_XML_Reader_AtEnd(pT) (((const NW_XML_Reader_t*)pT)->end)
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_Reader_PeekOffset
+
+ @synopsis: Peeks at offset.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_XML_Reader_t* pT
+ The XML reader.
+
+ [in] NW_Uint32 nChars
+ Offset in characters.
+
+ [out] NW_Uint32* pC
+ Address of character at offset.
+
+ @description: Fails on encountering illegal char anywhere from current
+ read position to offset position or if position is illegal
+ (e.g., off end). Leaves read position unchanged.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Address returned.
+
+ [NW_STAT_FAILURE]
+ Invalid offset or at end of file.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_XML_Reader_PeekOffset(NW_XML_Reader_t* pT, NW_Uint32 nChars, NW_Uint32* pC);
+
+#define NW_XML_Reader_Peek(pT, pC) NW_XML_Reader_PeekOffset((pT), 0, (pC))
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_Reader_AdvanceOffset
+
+ @synopsis: Advances offset in reader.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_XML_Reader_t* pT
+ The XML reader.
+
+ [in] NW_Uint32 nChars
+ Offset to move in characters.
+
+ @description: Fails on encountering illegal char anywhere from
+ current read position to offset position or if
+ position is illegal (e.g., off end). Moves read
+ position to current + offset.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Read position advanced nChars.
+
+ [NW_STAT_FAILURE]
+ Invalid offset or at end of file, reader not advanced.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_XML_Reader_AdvanceOffset(NW_XML_Reader_t* pT, NW_Uint32 nChars);
+
+#define NW_XML_Reader_Advance(pT) NW_XML_Reader_AdvanceOffset((pT), 1)
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_Reader_AsciiCharMatch
+
+ @synopsis: Tests for character match.
+ @scope: public
+
+ @parameters:
+ [in] NW_XML_Reader_t* pT
+ The XML reader.
+
+ [in] NW_Uint32 c
+ The character to match.
+
+ [out] NW_Uint32* pMatch
+ default
+
+ @description: pMatch is 1 if ASCII character c matches Reader char in its encoding.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Match results are valid.
+
+ [NW_STAT_FAILURE]
+ Match results are not valid. Invalid offset or at end of file.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_XML_Reader_AsciiCharMatch(NW_XML_Reader_t* pT, NW_Uint32 c, NW_Uint32* pMatch);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_Reader_AsciiStringMatch
+
+ @synopsis: Tests for character match.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_XML_Reader_t* pT
+ The XML reader.
+
+ [in] NW_Uint32 length
+ String length.
+
+ [in] const NW_Uint8* pString,
+ String characters.
+
+ [out] NW_Uint32* pMatch
+ 1 if match, otherwise 0.
+
+ @description: pMatch is 1 if ASCII string matches Reader sequence in its encoding.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Match results are valid.
+
+ [NW_STAT_FAILURE]
+ Match results are not valid. Invalid offset or at end of file.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_XML_Reader_AsciiStringMatch(NW_XML_Reader_t* pT, NW_Uint32 length, const NW_Uint8* pString,
+ NW_Uint32* pMatch);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_Reader_SkipSpace
+
+ @synopsis: Skip a space.
+
+ @scope: public
+
+ @parameters:
+ [in-out] NW_XML_Reader_t* pT
+ The XML reader.
+
+ @description: Skip a space. For XML, whitespace is only ASCII
+ 0x20 (space), 0x09 (tab), 0x0d (CR), 0x0a (LF).
+ The base test used here, NW_Str_Isspace(), includes
+ two other forms of whitespace.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Skip successful.
+
+ [NW_STAT_FAILURE]
+ Skip not done. Invalid offset or at end of file.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_XML_Reader_SkipSpace(NW_XML_Reader_t* pT);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_Reader_IsSpace
+
+ @synopsis: Tests for space.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_XML_Reader_t* pT
+ The XML reader.
+
+ [out] NW_Uint32* pMatch
+ 1 if space, otherwise 0.
+
+ @description: Tests for space. For XML, whitespace is only ASCII
+ 0x20 (space), 0x09 (tab), 0x0d (CR), 0x0a (LF). The
+ base test used here, NW_Str_Isspace(), includes two
+ other forms of whitespace.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Test results are valid.
+
+ [NW_STAT_FAILURE]
+ Test results are not valid. Invalid offset or at end of file.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_XML_Reader_IsSpace(NW_XML_Reader_t* pT, NW_Uint32* pMatch);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_Reader_IsLetter
+
+ @synopsis: Tests for letter.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_XML_Reader_t* pT
+ The XML reader.
+
+ [out] NW_Uint32* pMatch
+ 1 if letter, otherwise 0.
+
+ @description: Tests for letter.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Test results are valid.
+
+ [NW_STAT_FAILURE]
+ Test results are not valid. Invalid offset or at end of file.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_XML_Reader_IsLetter(NW_XML_Reader_t* pT, NW_Uint32* pMatch);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_Reader_IsDigit
+
+ @synopsis: Tests for digit.
+
+ @scope: public
+
+ @parameters:
+ [in] NW_XML_Reader_t* pT
+ The XML reader.
+
+ [out] NW_Uint32* pMatch
+ 1 if letter, otherwise 0.
+
+ @description: Tests for digit. Digits include not only the ASCII
+ digits but other language forms of digits. The base
+ test used here, NW_Str_Isdigit() only tests for ASCII
+ digits.
+
+ @returns: NW_Status_t
+ Status of operation.
+
+ [NW_STAT_SUCCESS]
+ Test results are valid.
+
+ [NW_STAT_FAILURE]
+ Test results are not valid. Invalid offset or at end of file.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C NW_Status_t
+NW_XML_Reader_IsDigit(NW_XML_Reader_t* pT, NW_Uint32* pMatch);
+
+
+/* ----------------------------------------------------------------------- **
+ Reader Interval Functions
+** ----------------------------------------------------------------------- **/
+
+
+/* Always initialize the interval. */
+#define NW_XML_Reader_Interval_Init(pI) \
+ ((pI)->start = (pI)->stop = (pI)->charStart = (pI)->charStop = NW_UINT32_MAX)
+
+/* Useful in error tests and asserts. */
+#define NW_XML_Reader_Interval_IsWellFormed(pI) \
+ (((pI)->stop > (pI)->start) && ((pI)->charStop > (pI)->charStart))
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_Reader_Interval_Start
+
+ @synopsis: Initializes interval to current position.
+
+ @scope: public
+
+ @parameters:
+ [out] NW_XML_Reader_Interval_t* pI
+ The XML reader interval.
+
+ [in] NW_XML_Reader_t* pT
+ The XML reader.
+
+ @description: Sets start, stop, charStart, charStop to current
+ Reader position.
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C void
+NW_XML_Reader_Interval_Start(NW_XML_Reader_Interval_t* pI, NW_XML_Reader_t* pT);
+
+
+/** ----------------------------------------------------------------------- **
+ @function: NW_XML_Reader_Interval_Stop
+
+ @synopsis: Sets stop to Reader read index.
+
+ @scope: public
+
+ @parameters:
+ [out] NW_XML_Reader_Interval_t* pI
+ The XML reader interval.
+
+ [in] NW_XML_Reader_t* pT
+ The XML reader.
+
+ @description: Sets stop to Reader read index.
+
+ ** ----------------------------------------------------------------------- **/
+IMPORT_C void
+NW_XML_Reader_Interval_Stop(NW_XML_Reader_Interval_t* pI, NW_XML_Reader_t* pT);
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* NW_XML_READER_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/cxml_library_api/inc/nwx_status.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,414 @@
+/*
+* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+/***************************************************************************
+** File: nwx_status.h
+** Purpose: Contains definitions of status values common throughout
+** all of rainbow
+**************************************************************************/
+#ifndef NWX_STATUS_H
+#define NWX_STATUS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Includes
+*/
+
+#define NW_STAT_IS_SUCCESS(a) ((a) == NW_STAT_SUCCESS)
+#define NW_STAT_IS_FAILURE(a) ((a) != NW_STAT_SUCCESS)
+
+/* Used by NW_HED_DocumentNode_HandleError to specify the error "class" */
+#define NW_STAT_CLASS_NONE 0
+#define NW_STAT_CLASS_GENERAL 1
+#define NW_STAT_CLASS_HTTP 2
+
+typedef enum {
+
+ /* General Rainbow status codes */
+ NW_STAT_FAILURE,
+ NW_STAT_SUCCESS,
+ NW_STAT_NODESTINATION,
+ NW_STAT_FILE_NOT_FOUND,
+ NW_STAT_FILE_NOT_OPEN,
+ NW_STAT_FILE_EOF,
+ NW_STAT_FILE_NOT_CREATED,
+ NW_STAT_FILE_READ_ERROR,
+ NW_STAT_FILE_WRITE_ERROR,
+ NW_STAT_FILE_DISK_FULL_ERROR,
+ NW_STAT_FILE_FOUND,
+ NW_STAT_OUT_OF_MEMORY,
+ NW_STAT_UNEXPECTED_ERROR,
+ NW_STAT_NOT_IMPLEMENTED,
+ NW_STAT_WAIT_TIMEOUT,
+ NW_STAT_BUFFER_TOO_SMALL,
+ NW_STAT_BAD_INPUT_PARAM,
+ NW_STAT_MISSING_INPUT_PARAM,
+ NW_STAT_MALFORMED_URL,
+ NW_STAT_MISSING_SCRIPT_REFERER,
+ NW_STAT_DUPLICATE,
+ NW_STAT_NOT_FOUND,
+ NW_STAT_BUFFER_END,
+ NW_STAT_ITERATE_MORE,
+ NW_STAT_ITERATE_DONE,
+ NW_STAT_NOAUTHREDIRUI_AVAIL,
+
+ /* Status codes for Url and Http Loaders */
+ NW_STAT_UNKNOWN_SCHEME,
+ NW_STAT_BAD_REDIRECT,
+ NW_STAT_TOO_MANY_REDIRECTS,
+ NW_STAT_BAD_REDIRECT_URL,
+ NW_STAT_MISSING_LOCATION_HEADER,
+ NW_STAT_BAD_CONTENT_LOC_HEADER,
+ NW_STAT_BAD_HEADER,
+ NW_STAT_BAD_RFC1123_TIME,
+ NW_STAT_UNHANDLED_WSP_STATUS,
+ NW_STAT_WSP_STATUS,
+ NW_STAT_NOAUTH_DATA,
+ NW_STAT_MISSING_AUTH_HEADER,
+ NW_STAT_CANCELLED,
+ NW_STAT_NAVIGATION_CANCELLED,
+ NW_STAT_NOCONTENT,
+
+ /* Status codes for WPS (Protocol Stack) */
+ NW_STAT_WPS_ERROR,
+ NW_STAT_WPS_STARTUP_ERROR,
+ NW_STAT_WPS_GATEWAY_CONNECT_ERROR,
+ NW_STAT_WPS_GATEWAY_UNSET,
+ NW_STAT_WPS_DISCONNECTED,
+ NW_STAT_WPS_ABORTED,
+ NW_STAT_WPS_SECURITY_ERROR,
+ NW_STAT_WPS_SECURITY_ALERT,
+ NW_STAT_WPS_SECURITY_ESTABLISHED,
+ NW_STAT_WPS_IGNORE_UI,
+
+/*
+** Note: the following new Rainbow WPS codes have
+** been added for Spectrum to support dialup
+** (CSD) and packet switched (GPRS) connections.
+*/
+ NW_STAT_WPS_SERVICE_CONNECT_ERROR,
+ NW_STAT_WPS_BEARER_NOT_AVAILABLE,
+ NW_STAT_WPS_GPRS_CONNECTION_FAILED,
+ NW_STAT_WPS_CONNECTION_NOT_RESUMED,
+ NW_STAT_WPS_CONNECTION_SUSPENDED,
+ NW_STAT_WPS_DIALUP_CONNECT_ERROR,
+ NW_STAT_WPS_BUSY_CONNECT_ERROR,
+
+/*
+** Note: the following new Rainbow WPS codes have
+** been added for Spectrum to support WDP,
+** WSP, and WTP layer errors.
+*/
+ NW_STAT_WPS_NETWORK_CONNECT_ERROR,
+ NW_STAT_WPS_WDPSEND_FAILED,
+ NW_STAT_WPS_PACKET_TOO_LARGE,
+ NW_STAT_WPS_SESSION_CONNECT_ERROR,
+
+
+ /* Status codes for WPSA (WPS Adapter) */
+ NW_STAT_WPSA_MAX_REACHED,
+ NW_STAT_WPSA_NOT_FOUND,
+ NW_STAT_WPSA_DOS,
+ NW_STAT_WPSA_MAX_TRANSACTIONS_REACHED,
+ NW_STAT_WPSA_MAX_SESSIONS_REACHED,
+ NW_STAT_WPSA_NO_ACTIVE_TRANSACTIONS,
+ NW_STAT_WPSA_NO_TMS, /* We dont have total message size */
+ NW_STAT_WPSA_TRANSACTION_COMPLETE,
+
+/*
+** Note: the follow block of WIM status codes has
+** been superseded by the new combined
+** Spectrum values
+*/
+ /* Status codes for WIM / Security */
+#if 0
+ NW_STAT_WIM_NO_MATCHING_CERTIFICATE, /* New code: NW_STAT_WIMI_NOCERT */
+ NW_STAT_WIM_PIN_BLOCKED, /* New code: NW_STAT_WIMI_PINBLOCKED */
+ NW_STAT_INVALID_CERTIFICATE, /* New code: NW_STAT_WIMI_BADCERT */
+ NW_STAT_WIM_ERR, /* New code: NW_STAT_WIMI_WIM_ERR */
+ NW_STAT_SEC_HANDSHAKE_FAILED, /* New code: NW_STAT_WTLS_HANDSHAKEFAIL */
+ NW_STAT_WIM_SESSION_NOT_SET, /* New code: NW_STAT_WIMI_SESSION_NOT_SET */
+ NW_STAT_WIM_DECODE_ERR, /* New code: NW_STAT_WTLS_DECODE_FAIL */
+ NW_STAT_CERT_NOT_YET_VALID, /* New code: NW_STAT_WTLS_UC_NOT_YET_VALID */
+ NW_STAT_CERT_EXPIRED, /* New code: NW_STAT_WTLS_UC_EXPIRED */
+ NW_STAT_UNKNOWN_CA, /* New code: NW_STAT_WTLS_UNKNOW_CERT_AUTH */
+ NW_STAT_UNSUPPORTED_CERTIFICATE_TYPE, /* New code: NW_STAT_WTLS_UNSUPCERT */
+ NW_STAT_WIM_NO_WIM, /* New code: NW_STAT_WIMI_NOCARD */
+ NW_STAT_WIM_INIT_FAILED, /* New code: NW_STAT_WIMI_NOINIT */
+ NW_STAT_WIM_ITEM_NOT_FOUND, /* New code: NW_STAT_WIMI_CERTNOTFOUND or NW_STAT_WIMI_KEYNOTFOUND */
+ NW_STAT_WIM_BAD_PIN, /* New code: NW_STAT_WIMI_INVALIDPIN */
+ NW_STAT_CERTIFICATE_REVOKED, /* New code: NW_STAT_WTLS_UC_REVOKED */
+ NW_STAT_CLIENT_AUTH_NOT_SUPPORTED, /* New code: NW_STAT_WTLS_CLIENT_AUTH_NOT_SUPPORTED */
+ NW_STAT_WIM_KEY_NOT_FOUND, /* New code: NW_STAT_WIMI_KEYNOTFOUND */
+ NW_STAT_WIM_DUPLICATE_CERTIFICATE, /* New code: NW_STAT_WIMI_DUPLICATECERT */
+
+#endif /* 0 */
+
+ /* End of deprecated status codes */
+
+
+/*
+** Note: the following block of new WIM status codes has
+** superseded the old Rainbow status codes above
+*/
+ /* Status codes for WIM / Security */
+ NW_STAT_WIMI_OK,
+ NW_STAT_WIMI_OKASYN,
+ NW_STAT_WIMI_INVALIDPIN,
+ NW_STAT_WIMI_PINBLOCKED,
+ NW_STAT_WIMI_WIMCLOSED,
+ NW_STAT_WIMI_NOCARD,
+ NW_STAT_WIMI_IOERROR,
+ NW_STAT_WIMI_INVALIDREF,
+ NW_STAT_WIMI_NOCERT,
+ NW_STAT_WIMI_NOTALLOWED,
+ NW_STAT_WIMI_NOROOM,
+ NW_STAT_WIMI_BADARGS,
+ NW_STAT_WIMI_NOMEM,
+ NW_STAT_WIMI_CERTEXISTS,
+ NW_STAT_WIMI_NOINIT,
+ NW_STAT_WIMI_BADCERT,
+ NW_STAT_WIMI_FAIL,
+ NW_STAT_WIMI_NOKES,
+ NW_STAT_WIMI_NOKEY,
+ NW_STAT_WIMI_WIM_ERR,
+ NW_STAT_WIMI_SESSION_NOT_SET,
+ NW_STAT_WIMI_CERTNOTFOUND,
+ NW_STAT_WIMI_KEYNOTFOUND,
+ NW_STAT_WIMI_DUPLICATECERT,
+
+/*
+** Note: the follow block of WTLS status codes has
+** been superseded by the new combined
+** Spectrum values
+*/
+ /*Status codes for WTLS*/
+#if 0
+ NW_STAT_WTLS_DECRYPTION_FAILED, /* New code: NW_STAT_WTLS_DECRYPTERR */
+ NW_STAT_WTLS_DECOMPRESSION_FAILED, /* New code: NW_STAT_WTLS_DECOMPESSERR */
+ NW_STAT_UNKNOWN_CERT, /* New code: NW_STAT_WTLS_UNSUPCERT */
+ NW_STAT_WTLS_ACCESS_DENIED, /* New code: NW_STAT_WTLS_NOACCESS */
+ NW_STAT_INSUFFIC_SECURITY, /* New code: NW_STAT_WTLS_INSUFFICIENT_SECURITY */
+ NW_STAT_WTLS_USER_CANCELLED, /* New code: NW_STAT_WTLS_USER_CANCELLED */
+#endif /* 0 */
+
+/* End of deprecated status codes */
+
+
+/*
+** Note: the following block of new WTLS status codes has
+** superseded the old Rainbow status codes above
+*/
+
+ /*Status codes for WTLS*/
+ NW_STAT_WTLS_TIMEOUT,
+ NW_STAT_WTLS_ILLEGALPARAM,
+ NW_STAT_WTLS_SERVERCLOSED,
+ NW_STAT_WTLS_CONNCLOSED,
+ NW_STAT_WTLS_UNEXPMESS,
+ NW_STAT_WTLS_BADMAC,
+ NW_STAT_WTLS_DECOMPESSERR,
+ NW_STAT_WTLS_DECRYPTERR,
+ NW_STAT_WTLS_HANDSHAKEFAIL,
+ NW_STAT_WTLS_BADCERT,
+ NW_STAT_WTLS_PROTOCOL,
+ NW_STAT_WTLS_NOACCESS,
+ NW_STAT_WTLS_EXPORTRESTRICTION,
+ NW_STAT_WTLS_PMMSTORE,
+ NW_STAT_WTLS_BADHANDLE,
+ NW_STAT_WTLS_BEARERSUSP,
+ NW_STAT_WTLS_UNKNOW_CERT_AUTH,
+ NW_STAT_WTLS_UC_NOT_YET_VALID,
+ NW_STAT_WTLS_UC_EXPIRED,
+ NW_STAT_WTLS_UC_REVOKED,
+ NW_STAT_WTLS_UNSUPCERT,
+ NW_STAT_WTLS_BADUSERCERT,
+ NW_STAT_WTLS_DECODE_FAIL,
+ NW_STAT_WTLS_CLIENT_AUTH_NOT_SUPPORTED,
+ NW_STAT_WTLS_INSUFFICIENT_SECURITY,
+ NW_STAT_WTLS_USER_CANCELLED,
+
+ /* Status codes for Cache */
+ NW_STAT_CACHE_ITEM_NOT_FOUND,
+ NW_STAT_CACHE_ITEM_FOUND,
+ NW_STAT_CACHE_URL_FOUND,
+ NW_STAT_CACHE_ITEM_COPIED,
+ NW_STAT_CACHE_DISABLED,
+ NW_STAT_CACHE_ENABLE,
+ NW_STAT_CACHE_NOT_CONFIGURED,
+ NW_STAT_CACHE_ITEM_TOO_BIG,
+ NW_STAT_CACHE_SPACE_AVAILABLE,
+ NW_STAT_CACHE_SPACE_NOT_AVAILABLE,
+
+ /* Status Codes for Cookies */
+ NW_STAT_CJ_NOCOOKIE,
+
+ /* Status codes used by the Wml Script */
+ NW_STAT_SCRIPT_CARD_NOT_IN_DECK,
+ NW_STAT_SCRIPT_NO_ACCESS,
+ NW_STAT_SCRIPT_BAD_CONTENT,
+ NW_STAT_SCRIPT_ERROR_USER_EXIT,
+ NW_STAT_SCRIPT_ERROR_USER_ABORT,
+ NW_STAT_SCRIPT_ERROR_STACK_UNDERFLOW,
+ NW_STAT_SCRIPT_ERROR_STACK_OVERFLOW,
+ NW_STAT_SCRIPT_FATAL_LIB_FUNC_ERROR,
+ NW_STAT_SCRIPT_INVALID_FUNC_ARGS,
+ NW_STAT_SCRIPT_VERIFICATION_FAILED,
+ NW_STAT_SCRIPT_EXTERNAL_FUNCTION_NOT_FOUND,
+ NW_STAT_SCRIPT_UNABLE_TO_LOAD_COMPILATION_UNIT,
+ NW_STAT_SCRIPT_ACCESS_VIOLATION,
+
+ /* Status codes used by the WML Browser*/
+ NW_STAT_WMLBROWSER_CARD_NOT_IN_DECK,
+ NW_STAT_WMLBROWSER_NO_ACCESS,
+ NW_STAT_WMLBROWSER_BAD_CONTENT,
+ NW_STAT_WMLBROWSER_INVALID_URL_SCHEMA,
+ NW_STAT_WMLBROWSER_BAD_CONTENT_TYPE,
+ NW_STAT_WMLBROWSER_INPUT_NONCONFORMING_TO_MASK,
+ NW_STAT_WMLBROWSER_ONPICK_EX,
+
+ /* Status codes used by the XML(thus XHTML) parser*/
+ NW_STAT_XHTML_BAD_CONTENT,
+
+ /* Status codes used by the WML Script Crypto */
+ NW_STAT_CRYPTO_USERCANCEL,
+ NW_STAT_CRYPTO_NOCERT,
+
+ /* WML Interpreter content validation errors */
+ NW_STAT_WMLBROWSER_UNSUPPORTED_VERSION_NUMBER,
+ NW_STAT_WMLBROWSER_UNSUPPORTED_PUBLIC_ID,
+ NW_STAT_WMLBROWSER_UNSUPPORTED_CHARSET,
+ NW_STAT_WMLBROWSER_BAD_OPAQUE_DATA,
+ NW_STAT_WMLBROWSER_BAD_PI,
+ NW_STAT_WMLBROWSER_BAD_SWITCHPAGE_TOKEN,
+ NW_STAT_WMLBROWSER_BAD_TEXT,
+ NW_STAT_WMLBROWSER_BAD_ELEMENT,
+ NW_STAT_WMLBROWSER_MISSING_LITERALTAG,
+
+ /* Status codes for the script proxy */
+ NW_STAT_SCRPROXY_SCRABORT,
+ NW_STAT_SCRPROXY_SCRBUSY,
+ NW_STAT_SCRPROXY_SCRNOTRESPONDING,
+
+ /* status codes for the image loader */
+ NW_STAT_IMGLOADER_HTTP_ERROR,
+
+ /* Status codes for the wae browser */
+ NW_STAT_WAE_NAVIGATION_CANCELLED,
+
+ /* Status codes for SI */
+ NW_STAT_SI_DONE,
+
+ /* Connectivity failure status codes used by gateway navigation.
+ Refer to WAP End-to-End Security specification */
+ NW_STAT_CONN_SECINFO_EXPIRED,
+ NW_STAT_CONN_URL_NONSECURE,
+ NW_STAT_CONN_NAVDOC_INVALID,
+
+ /* Connectivity failure status codes used by
+ NW_Http_ConnNeeded() call prior to WPSA requests. */
+ NW_STAT_CONN_CANCELLED,
+ NW_STAT_CONN_FAILED,
+
+ /* Status codes for WTAI loader */
+ NW_STAT_WTAI_UNSPECIFIED_ERROR,
+ NW_STAT_WTAI_INVALID_RESPONSE,
+ NW_STAT_WTAI_INVALID_URI,
+ NW_STAT_WTAI_INVALID_ARGUMENT,
+ NW_STAT_WTAI_UNSUPPORTED_FUNCTION,
+ NW_STAT_WTAI_UNSUPPORTED_LIBRARY,
+ NW_STAT_WTAI_INVOCATIONERROR,
+ NW_STAT_WTAI_NOCALLACTIVE,
+ NW_STAT_WTAI_NOANSWER,
+ NW_STAT_WTAI_NOSERVICE,
+ NW_STAT_WTAI_USERBUSY,
+ NW_STAT_WTAI_PHONEBOOKFULL,
+ NW_STAT_WTAI_PBWRITEERROR,
+ NW_STAT_WTAI_PBNUMBERTOOLONG,
+ NW_STAT_WTAI_PBNAMETOOLONG,
+
+ /* Status codes for the layout manager */
+ NW_STAT_LMGR_CONSTRAINT_TOO_SMALL,
+ NW_STAT_LMGR_NOT_CONSTRAINED,
+ NW_STAT_LMGR_FORMAT_OVERFLOW,
+ NW_STAT_LMGR_SPLIT_OK,
+ NW_STAT_LMGR_SPLIT_EOL,
+ NW_STAT_LMGR_NO_SPLIT,
+ NW_STAT_LMGR_DRAW_COMPLETE,
+ NW_STAT_LMGR_NOT_CLEAR,
+
+ /* Status codes used by cXML DOM module */
+ NW_STAT_DOM_HEIRARCHY_REQUEST_ERR,
+ NW_STAT_DOM_WRONG_DOC_ERR,
+ NW_STAT_DOM_NO_STRING_RETURNED,
+ NW_STAT_DOM_NODE_TYPE_ERR,
+ NW_STAT_DOM_NO_VALUE_PREFIX,
+
+/* Status codes used by the WBXML parser: */
+ NW_STAT_WBXML_ERROR_BYTECODE,
+ NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED,
+ NW_STAT_WBXML_ITERATE_MORE,
+ NW_STAT_WBXML_ITERATE_DONE,
+ NW_STAT_WBXML_DID_NOT_ITERATE,
+ NW_STAT_WBXML_NO_NAME,
+ NW_STAT_WBXML_HAS_ATTRIBUTES,
+ NW_STAT_WBXML_HAS_CONTENT,
+ NW_STAT_WBXML_HAS_ATTR_CONTENT, /* HAS_CONTENT | HAS_ATTRIBUTES */
+
+/* Status codes for History Entries */
+ NW_STAT_HED_NO_CURRENT_HISTENTRY,
+ NW_STAT_HED_NO_PREVIOUS_HISTENTRY,
+ NW_STAT_HED_NO_NEXT_HISTENTRY,
+
+/* Status codes for Mailto loader */
+ NW_STAT_MAILTO_COMPLETE,
+
+/* Status code to indicate that contents have been dispatched to content dispatcher server */
+ NW_STAT_HED_CONTENT_DISPATCHED,
+
+/* Status codes for connection */
+ NW_STAT_CONN_NEW_CONNECTION,
+
+/* Status codes for HTTP stack */
+ NW_STAT_UNSUPPORTED_AUTH_TYPE,
+ NW_STAT_TCP_TIMEOUT,
+ NW_STAT_TCP_COMM_LINE_FAIL,
+ NW_STAT_TCP_NOT_READY,
+ NW_STAT_TCP_DNS_ERROR,
+ NW_STAT_TCP_HOST_UNREACHABLE,
+
+/* For string tables */
+
+ NW_STAT_STR_TBL_OVERFLOW,
+
+ NW_STAT_BAD_FORMAT,
+
+/* Base for WPS status codes. This insures that status codes are 32 bits wide */
+ NW_STAT_WPS_START = (signed long) 0x80000000
+
+
+} NW_Status_t;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* NWX_STATUS_H */
--- a/xmlsrv_plat/group/bld.inf Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsrv_plat/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -20,6 +20,8 @@
#include "../../inc/xmlsrv.hrh"
+#include "../cxml_library_api/group/bld.inf"
+#include "../xml_parser_api/group/bld.inf"
#include "../xml_encryption_api/group/bld.inf"
#include "../xml_signature_api/group/bld.inf"
#include "../xml_security_engine_utils_api/group/bld.inf"
\ No newline at end of file
--- a/xmlsrv_plat/xml_encryption_api/inc/xmlsecwencrypt.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsrv_plat/xml_encryption_api/inc/xmlsecwencrypt.h Thu Jul 22 16:49:54 2010 +0100
@@ -27,7 +27,7 @@
#include <e32base.h>
#include <f32file.h>
-#include <xmlengdocument.h>
+#include <xml/dom/xmlengdocument.h>
class CXmlSecKeyManager;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/xml_parser_api/group/bld.inf Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: File that exports the files belonging to
+: XML Parser API
+*
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+../inc/MXMLContentHandler.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/MXMLContentHandler.h)
+../inc/RXMLReader.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/RXMLReader.h)
+../inc/MWBXMLContentHandler.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/MWBXMLContentHandler.h)
+../inc/MXMLAttributes.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/MXMLAttributes.h)
+../inc/XMLUtils.h OS_LAYER_PLATFORM_EXPORT_PATH(xml/XMLUtils.h)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/xml_parser_api/inc/MWBXMLContentHandler.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,213 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+
+
+/**
+ * DO NOT USE THIS API. DEPRECATED AND REMOVED IN S60 5.0. USE SYMBIAN XML FRAMEWORK INSTEAD.
+ */
+
+
+
+
+
+
+
+#ifndef __MWBXMLCONTENTHANDLER_H
+#define __MWBXMLCONTENTHANDLER_H
+
+#warning The XML API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information
+
+// INCLUDES
+#include <e32std.h>
+
+// CLASS DECLARATION
+
+/**
+* Interface for SAX wbxml Parser Callback events.
+* If an application (client) needs to be informed of basic parsing events,
+* it implements this interface and registers an instance with the SAX parser using the SetContentHandler() method.
+* The parser uses the instance to report basic document-related events like the start and end of elements.
+*
+* @lib XMLInterface.dll
+* @since ?Series60_version
+*/
+class MWBXMLContentHandler
+{
+public:
+/**
+* Receive notification of the beginning of a wbxml document.
+* @since ?Series60_version
+* @param none
+* @return 1 if sucess.
+*/
+ virtual TInt StartDocument() = 0;
+
+/**
+* Receive notification of the end of a wbxml document.
+* @since ?Series60_version
+* @param none
+* @return 1 if sucess.
+*/
+ virtual TInt EndDocument() = 0;
+
+/**
+* Receive notification of the beginning of an element.
+* @since ?Series60_version
+* @return 1 if sucess.
+*/
+ inline virtual TInt TagStart(){return 1;}
+
+/**
+* Receive notification of the end of an element.
+* @since ?Series60_version
+* @param none
+* @return 1 if sucess.
+*/
+ inline virtual TInt TagEnd(){return 1;}
+
+/**
+* Receive notification of the beginning of a processing instruction.
+* @since ?Series60_version
+* @param none
+* @return 1 if sucess.
+*/
+ inline virtual TInt ProcessingInstruction(){return 1;}
+
+/**
+* Receive notification of the end of a processing instruction.
+* @since ?Series60_version
+* @param none
+* @return 1 if sucess.
+*/
+ inline virtual TInt ProcessingInstructionEnd(){return 1;}
+
+/**
+* Receive notification of a attribute.
+* @since ?Series60_version
+* @param none
+* @return 1 if sucess.
+*/
+ inline virtual TInt AttributeStart(){return 1;}
+
+/**
+* Receive notification of a attribute value.
+* @since ?Series60_version
+* @param none
+* @return 1 if sucess.
+*/
+ inline virtual TInt AttributeValue(){return 1;}
+/**
+* Receive notification of content.
+* @since ?Series60_version
+* @param none
+* @return 1 if sucess.
+*/
+ inline virtual TInt Content(){return 1;}
+
+/**
+* Receive notification of a code page switch in the document.
+* @since ?Series60_version
+* @param none
+* @return 1 if sucess.
+*/
+ inline virtual TInt CodePageSwitch(){return 1;}
+
+/**
+* Receive notification of a extencion.
+* @since ?Series60_version
+* @param none
+* @return 1 if sucess.
+*/
+ inline virtual TInt Extension(){return 1;}
+
+ // Handle data types
+
+/**
+* Receive notification of a Token.
+* @since ?Series60_version
+* @param aToken: binary token
+* @param aString: string representation of aToken
+* @return 1 if sucess.
+*/
+ inline virtual TInt Token(TUint8 /*aToken*/, TDesC& /*aString*/){return 1;}
+/**
+* Receive notification of a Fully Qualifyed Token.
+* @since ?Series60_version
+* @param aToken: binary token
+* @param aString: string representation of aToken
+* @return 1 if sucess.
+*/
+ inline virtual TInt FQToken(TUint32 /*aToken*/, TDesC& /*aString*/){return 1;}
+
+/**
+* Receive notification of a inline string.
+* @since ?Series60_version
+* @param aString: the inline string.
+* @return 1 if sucess.
+*/
+ inline virtual TInt InlineString(TDesC& /*aString*/){return 1;}
+
+/**
+* Receive notification of a table string.
+* @since ?Series60_version
+* @param aString: the table string.
+* @return 1 if sucess.
+*/
+ inline virtual TInt TableString(TDesC& /*aString*/){return 1;}
+/**
+* Receive notification of binary data.
+* @since ?Series60_version
+* @param aToken: binary data
+* @return 1 if sucess.
+*/
+ inline virtual TInt Binary(TUint32 /*aToken*/){return 1;}
+
+/**
+* Receive notification of opaque data.
+* @since ?Series60_version
+* @param aToken: binary data
+* @param aString: the string representation of aToken
+* @return 1 if sucess.
+*/
+ inline virtual TInt Opaque(TUint32 /*aToken*/, TDesC& /*aString*/){return 1;}
+
+/**
+* Receive notification of entity.
+* @since ?Series60_version
+* @param aToken: the entity
+* @param aString: the string representation of aToken.
+* @return 1 if sucess.
+*/
+ inline virtual TInt Entity(TUint32 /*aToken*/, TDesC& /*aString*/){return 1;}
+
+/**
+* Receive notification of parse error.
+* @since ?Series60_version
+* @param
+* @return 1 if sucess.
+*/
+ inline virtual TInt Exception(){return 1;}
+
+};
+
+
+#endif // __MXMLCONTENTHANDLER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/xml_parser_api/inc/MXMLAttributes.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,122 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+
+
+
+/**
+ * DO NOT USE THIS API. DEPRECATED AND REMOVED IN S60 5.0. USE SYMBIAN XML FRAMEWORK INSTEAD.
+ */
+
+
+
+
+
+
+
+
+
+#ifndef __MXMLATTRIBUTES_H
+#define __MXMLATTRIBUTES_H
+
+#warning The XML API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information
+
+
+// INCLUDES
+#include <e32std.h>
+
+// CLASS DECLARATION
+
+/**
+* Interface for a list of XML elemnet attributes.
+* Contains a list of attributes belonging to a certain element and is returned in the
+* MXMLContentHandler::StartElement() callback.
+*
+* @lib XMLInterface.dll
+* @since ?Series60_version
+*
+*/
+
+class MXMLAttributes
+{
+public:
+
+/**
+* Look up the index of an attribute by name.
+* @since ?Series60_version
+* @param aName: Name of attribute to look up
+* @return Index of aName
+*/
+ virtual TInt GetIndex(TDesC& aName) = 0;
+
+/**
+* Get the number of attributes in the list.
+* @since ?Series60_version
+* @param none
+* @return The number of attributes in the list.
+*/
+ virtual TInt GetLength() = 0;
+
+/**
+* Look up the name of an attribute by index.
+* @since ?Series60_version
+* @param aIndex: Index of attribute to look up.
+* @return Name of attribute at index aIndex.
+*/
+ virtual TPtrC GetName(TInt aIndex) = 0;
+
+/**
+* Look up an attribute's value by name.
+* @since ?Series60_version
+* @param aName: Name of attribute to look up
+* @return Value of attribute aName.
+*/
+ virtual TPtrC GetValue(TDesC& aName) = 0;
+
+/**
+* Look up an attribute's value by index.
+* @since ?Series60_version
+* @param aIndex: Index of attribute to look up.
+* @return Value of attribute at aIndex.
+*/
+ virtual TPtrC GetValue(TInt& aIndex) = 0;
+
+/**
+* Look up an attribute's type by index.
+* @since ?Series60_version
+* @param aIndex: Index of attribute to look up.
+* @return Type of attribute at aIndex.
+*/
+// R&D: Feature: GetType missing from Attributes
+ virtual TPtrC GetType(TInt aIndex) = 0;
+
+/**
+* Look up an attribute's type by name.
+* @since ?Series60_version
+* @param aIndex: Index of attribute to look up.
+* @return ?description
+*/
+// R&D: Feature: GetType missing from Attributes
+ virtual TPtrC GetType(TDesC& aName) = 0;
+
+};
+
+#endif // __MXMLATTRIBUTES_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/xml_parser_api/inc/MXMLContentHandler.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,213 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+
+
+
+
+/**
+ * DO NOT USE THIS API. DEPRECATED AND REMOVED IN S60 5.0. USE SYMBIAN XML FRAMEWORK INSTEAD.
+ */
+
+
+
+
+
+
+
+
+
+
+
+#ifndef __MXMLCONTENTHANDLER_H
+#define __MXMLCONTENTHANDLER_H
+
+#warning The XML API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information
+
+
+// INCLUDES
+#include <xml/MXMLAttributes.h>
+#include <xml/cxml/cxml_nw2cxmltypes.h>
+
+// CLASS DECLARATION
+
+/**
+* Interface for SAX Parser Callback events.
+* If an application (client) needs to be informed of basic parsing events,
+* it implements this interface and registers an instance with the SAX parser using the SetContentHandler() method.
+* The parser uses the instance to report basic document-related events like the start and end of elements.
+*
+* @lib XMLInterface.dll
+* @since ?Series60_version
+*/
+class MXMLContentHandler
+{
+public:
+/**
+* Receive notification of the beginning of a document.
+* @since ?Series60_version
+* @param none
+* @return none
+*/
+ virtual TInt StartDocument() = 0;
+
+/**
+* Receive notification of the end of a document.
+* @since ?Series60_version
+* @param none
+* @return none
+*/
+ virtual TInt EndDocument() = 0;
+
+/**
+* Receive notification of the beginning of an element.
+* @since ?Series60_version
+* @param aURI: The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace
+* processing is not being performed.
+* @param aLocalName: The local name (without prefix), or the empty string if Namespace processing is not being
+* performed.
+* @param aName: The qualified name, or the empty string if qualified names are not available.
+* @param aAttributeList: The attributes attached to the element. If there are no attributes, it shall be an
+* empty Attributes object.
+*
+* @return 1 if success 0 if failure.
+*/
+ inline virtual TInt StartElement(TDesC& /*aURI*/, TDesC& /*aLocalName*/, TDesC& /*aName*/, MXMLAttributes* /*aAttributeList*/){return 1;}
+
+/**
+* Receive notification of the end of an element.
+* @since ?Series60_version
+* @param aURI: The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace
+* processing is not being performed.
+* @param aLocalName: The local name (without prefix), or the empty string if Namespace processing is not being
+* performed.
+* @param aName: The qualified name, or the empty string if qualified names are not available.
+* @return 1 if success 0 if failure.
+*/
+ inline virtual TInt EndElement(TDesC& /*aURI*/, TDesC& /*aLocalName*/, TDesC& /*aName*/){return 1;}
+
+/**
+* Receive notification of character data inside an element.
+* @since ?Series60_version
+* @param aBuff: The characters.
+* @param aStart: The start position in the character buffer.
+* @param aLength: The number of characters to use from the character buffer.
+* @return 1 if success 0 if failure.
+*/
+ inline virtual TInt Charecters(TDesC& /*aBuf*/, TInt /*aStart*/, TInt /*aLength*/){return 1;}
+
+/**
+* Receive notification of XML comment.
+* @since ?Series60_version
+* @param aComment: Buffer containing the comment.
+* @return 1 if success 0 if failure.
+*/
+ inline virtual TInt Comment(TDesC& /*aComment*/){return 1;}
+
+/**
+* Receive notification of a processing instruction
+* @since ?Series60_version
+* @param aTarget: The processing instruction target.
+* @param aData: The processing instruction data, or null if none is supplied.
+* @return 1 if success 0 if failure.
+*/
+ inline virtual TInt ProcessingInstructions(TDesC& /*aTarget*/, TDesC& /*aData*/){return 1;}
+
+/**
+* Receive notification of ignorable whitespace in element content.
+* @since ?Series60_version
+* @param aString: The whitespace characters.
+* @return 1 if success 0 if failure.
+*/
+ // R&D: Feature: IgnoreWhiteSpace missing from XMLInterface
+ inline virtual TInt IgnoreWhiteSpace(TDesC& /*aString*/){return 1;};
+
+/**
+* Receive notification of beginning of some internal and external XML entities.
+* @since ?Series60_version
+* @param aName: The name of the entity.
+* @return 1 if success 0 if failure.
+*/
+
+ inline virtual TInt StartEntity(TDesC& /*aName*/){return 1;};
+
+/**
+* Receive notification of end of XML entities.
+* @since ?Series60_version
+* @param aName: The name of the entity.
+* @return 1 if success 0 if failure.
+*/
+
+ inline virtual TInt EndEntity(TDesC& /*aName*/){return 1;}
+
+/**
+* Receive notification of a skipped entity.
+* @since ?Series60_version
+* @param aName: The name of the skipped entity.
+* @return 1 if success 0 if failure.
+*/
+ // R&D: Feature: SkippedEntity missing from XMLInterface
+ inline virtual TInt SkippedEntity(TDesC& /*aName*/){return 1;}
+
+/**
+* Receive notification of beginning of CData section.
+* @since ?Series60_version
+* @param none
+* @return 1 if success 0 if failure.
+*/
+ inline virtual TInt StartCDATA(){return 1;}
+
+/**
+* Receive notification of end of CData section.
+* @since ?Series60_version
+* @param aName: none.
+* @return 1 if success 0 if failure.
+*/
+ inline virtual TInt EndCDATA(){return 1;}
+
+/**
+* Receive notification of error situation during parsing.
+* @since ?Series60_version
+* @param aErrorCode: Error status code.
+* @param aSeverity: Error Severity.
+* @return 1 if success 0 if failure.
+*/
+ inline virtual TInt Error(TInt /*aErrorCode*/, TInt /*aSeverity*/){return 1;}
+
+/**
+* Returns parsed buffer to client.
+* @since Series60 3.1
+* @param aBuf Buffer with parsed data.
+*/
+ inline virtual void DataBuffer(const TDesC16& /*aBuf*/){return;}
+
+/**
+* Returns reader index
+* @since Series60 3.1
+* @param aIndex - reader index
+*/
+ inline virtual void ReaderIndex(NW_Uint32 /*aIndex*/){return;}
+
+
+};
+
+
+#endif // __MXMLCONTENTHANDLER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/xml_parser_api/inc/RXMLReader.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,161 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+
+
+
+
+
+/**
+ * DO NOT USE THIS API. DEPRECATED AND REMOVED IN S60 5.0. USE SYMBIAN XML FRAMEWORK INSTEAD.
+ */
+
+
+
+
+
+
+
+
+
+
+
+
+
+#ifndef __RXMLREADER_H
+#define __RXMLREADER_H
+
+#warning The XML API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information
+
+
+// INCLUDES
+#include <F32File.h>
+
+#include <xml/MXMLContentHandler.h>
+#include <xml/MWBXMLContentHandler.h>
+#include <xml/XMLUtils.h>
+
+
+// CLASS DECLARATION
+class CXMLReader;
+/**
+* Interface for XML Parser.
+*
+* @lib XMLInterface.dll
+* @since ?Series60_version
+*/
+class RXMLReader
+{
+public: // New functions
+
+ inline RXMLReader();
+
+/**
+* Creates the parser.
+* This function leaves with an apropriate code if the create failed.
+*
+*/
+ IMPORT_C void CreateL();
+
+/**
+* Destroys the parser.
+*
+*/
+ IMPORT_C void Destroy();
+
+/**
+* Destroys the parser.
+*
+*/
+ IMPORT_C void Close();
+
+
+/**
+* Enables/Dissables a feature.
+* @since ?Series60_version
+* @param aFeature: The feature to Enable/Dissable.
+* @param aStatus: TRUE Enables the feature, FALSE Dissables.
+* @return KErrNone if OK, KErrNotSupported if feature not supported.
+*/
+ IMPORT_C TInt SetFeature(TXMLFeature aFeature, TBool aStatus);
+
+/**
+* Check if a feature is Enabled.
+* @since ?Series60_version
+* @param aFeature: The feature to check.
+* @param aStatus: TRUE if aFeature is Enabled.
+* @return KErrNone if OK, KErrNotSupported if feature not supported.
+*/
+ IMPORT_C TInt GetFeature(TXMLFeature aFeature, TBool& aStatus);
+
+/**
+* Allow an application to register a content event handler (for XML).
+* @since ?Series60_version
+* @param aContentHandler: The handler.
+* @return Status, KErrNone if OK.
+*/
+ IMPORT_C TInt SetContentHandler(MXMLContentHandler* aContentHandler);
+
+/**
+* Allow an application to register a content event handler (for WBXML).
+* @since ?Series60_version
+* @param aContentHandler: The handler.
+* @return Status, KErrNone if OK.
+*/
+ IMPORT_C TInt SetContentHandler(MWBXMLContentHandler* aContentHandler);
+
+/**
+* Parse an XML document.
+* @since ?Series60_version
+* @param aRFs: An open filesession.
+* @param aFileToParse: Filename of file to parse.
+* @return
+*/
+ IMPORT_C void ParseL(RFs &aRFs, const TDesC& aFileToParse);
+
+/**
+* Parse an XML document.
+* @since ?Series60_version
+* @param aBuff: Buffer containing document to parse.
+* @return
+*/
+ IMPORT_C void ParseL(const TDesC8& aBuff);
+
+/**
+* Parse an XML document.
+* @since ?Series60_version
+* @param aOpenedFile: Opened file containing document to parse.
+* @return
+*/
+ IMPORT_C void ParseL(RFile& aOpenedFile);
+
+private:
+ friend class CXMLReader;
+
+ CXMLReader* iImplementation;
+};
+
+inline RXMLReader::RXMLReader()
+ : iImplementation(0)
+ {
+ }
+
+#endif // __RXMLREADER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/xml_parser_api/inc/XMLUtils.h Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Contains XML datatype definitions
+*
+*/
+
+
+
+
+
+
+
+
+
+/**
+ * DO NOT USE THIS API. DEPRECATED AND REMOVED IN S60 5.0. USE SYMBIAN XML FRAMEWORK INSTEAD.
+ */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#ifndef __XMLUTILS_H
+#define __XMLUTILS_H
+
+#warning The XML API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information
+
+
+// Error Codes
+const TInt KErrDictionaryInitFailed=(-90);
+const TInt KErrParseFailed=(-91);
+enum TXMLErrorCodeSeverity
+ {
+ EXMLFatal,
+ EXMLIndeterminate,
+ EXMLWorkable,
+ EXMLNone
+ };
+
+// Features
+enum TXMLFeature
+ {
+ EXMLValidation,
+ EXMLBinary
+ };
+
+
+#endif // __XMLUTILS_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlsrv_plat/xml_parser_api/xml_parser_api.metaxml Thu Jul 22 16:49:54 2010 +0100
@@ -0,0 +1,18 @@
+<?xml version="1.0" ?>
+<api id="c360553a57d0d7dc1ab5b877d01e46cd" dataversion="1.0">
+ <name>XML Parser API</name>
+ <description>Provides C++ XML (SAX like) parser interface for client applications. Also called XML Interface.</description>
+ <type>c++</type>
+ <subsystem>xmlparser</subsystem>
+ <libs>
+ <lib name="XMLInterface.lib" />
+ </libs>
+ <release category="domain" deprecatedsince="5.0"/>
+ <attributes>
+ <!-- This indicates wether the api provedes separate html documentation -->
+ <!-- or is the additional documentation generated from headers. -->
+ <!-- If you are unsuere then the value is "no" -->
+ <htmldocprovided>yes</htmldocprovided>
+ <adaptation>no</adaptation>
+ </attributes>
+</api>
--- a/xmlsrv_plat/xml_signature_api/inc/xmlsecwsign.h Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsrv_plat/xml_signature_api/inc/xmlsecwsign.h Thu Jul 22 16:49:54 2010 +0100
@@ -27,7 +27,7 @@
#include <e32base.h>
#include <f32file.h>
-#include <xmlengdocument.h>
+#include <xml/dom/xmlengdocument.h>
class CXmlSecKeyManager;
class TXmlEngElement;
--- a/xmlsrv_plat/xml_signature_api/tsrc/src/xmlsecsigntesterblocks.cpp Fri Jun 11 16:29:19 2010 +0100
+++ b/xmlsrv_plat/xml_signature_api/tsrc/src/xmlsecsigntesterblocks.cpp Thu Jul 22 16:49:54 2010 +0100
@@ -33,8 +33,8 @@
#include "xmlsecwerrors.h"
#include "inetprottextutils.h"
-#include <xmlengelement.h>
-#include <xmlengdomimplementation.h>
+#include <xml/dom/xmlengelement.h>
+#include <xml/dom/xmlengdomimplementation.h>
// MACROS